Compare commits
31 Commits
Author | SHA1 | Date | |
---|---|---|---|
019b42c738 | |||
d3c26c12b4 | |||
70e9111474 | |||
7982e786e6 | |||
96014b329d | |||
79fb40b8c9 | |||
cc23a58866 | |||
8542ea8de5 | |||
74b260a33e | |||
0d7df37f74 | |||
0eea7cc4d8 | |||
2ab103016e | |||
f8743b9d97 | |||
97cdfa9838 | |||
2f2051273d | |||
257b470083 | |||
e857052715 | |||
e2cba423e2 | |||
296aa65c9a | |||
d67397c1d3 | |||
7d68f939e4 | |||
ccadb06314 | |||
5543b732e9 | |||
044b3c1d2f | |||
c2afd241fc | |||
1bbe0db68d | |||
2f5b6668e6 | |||
e2632e48f7 | |||
08af2286be | |||
8620cecd47 | |||
963b774c0a |
161
.cproject
@@ -1,80 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="0.1353761552">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1353761552" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1353761552" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||
<folderInfo id="0.1353761552." name="/" resourcePath="">
|
||||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1359385240" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1359385240.2064614940" name=""/>
|
||||
<builder command="${NDKROOT}/ndk-build.cmd" enableAutoBuild="true" enableCleanBuild="true" id="org.eclipse.cdt.build.core.settings.default.builder.1504609501" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder">
|
||||
<outputEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name=""/>
|
||||
</outputEntries>
|
||||
</builder>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.979977589" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.743530782" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1231978083" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\platforms\android-9\arch-arm\usr\include""/>
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\sources\cxx-stl\gnu-libstdc++\4.6\include""/>
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\sources\cxx-stl\gnu-libstdc++\4.6\libs\armeabi-v7a\include""/>
|
||||
<listOptionValue builtIn="false" value=""C:\Users\miguel.astor\Documents\OpenCV-2.4.8-android-sdk\sdk\native\jni\include""/>
|
||||
<listOptionValue builtIn="false" value=""../${NDKROOT]\toolchains\arm-linux-androideabi-4.8\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.8\include""/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1450614296" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.2086329912" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.915443128" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\platforms\android-9\arch-arm\usr\include""/>
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\sources\cxx-stl\gnu-libstdc++\4.6\include""/>
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\sources\cxx-stl\gnu-libstdc++\4.6\libs\armeabi-v7a\include""/>
|
||||
<listOptionValue builtIn="false" value=""C:\Users\miguel.astor\Documents\OpenCV-2.4.8-android-sdk\sdk\native\jni\include""/>
|
||||
<listOptionValue builtIn="false" value=""C:\android-ndk-r9c\toolchains\arm-linux-androideabi-4.8\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.8\include""/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1750170923" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1705205854" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1859743695" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\platforms\android-9\arch-arm\usr\include""/>
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\sources\cxx-stl\gnu-libstdc++\4.6\include""/>
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\sources\cxx-stl\gnu-libstdc++\4.6\libs\armeabi-v7a\include""/>
|
||||
<listOptionValue builtIn="false" value=""C:\Users\miguel.astor\Documents\OpenCV-2.4.8-android-sdk\sdk\native\jni\include""/>
|
||||
<listOptionValue builtIn="false" value=""../${NDKROOT]\toolchains\arm-linux-androideabi-4.8\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.8\include""/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.343342792" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="NxtAR-android.null.1875632970" name="NxtAR-android"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="0.1353761552">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.pathentry"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Default">
|
||||
<resource resourceType="PROJECT" workspacePath="/NxtAR-android"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="0.1353761552">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1353761552" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1353761552" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||
<folderInfo id="0.1353761552." name="/" resourcePath="">
|
||||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1359385240" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1359385240.2064614940" name=""/>
|
||||
<builder command="${NDKROOT}/ndk-build.cmd" enableAutoBuild="true" enableCleanBuild="true" id="org.eclipse.cdt.build.core.settings.default.builder.1504609501" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder">
|
||||
<outputEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name=""/>
|
||||
</outputEntries>
|
||||
</builder>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.979977589" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.743530782" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1231978083" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\platforms\android-9\arch-arm\usr\include""/>
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\sources\cxx-stl\gnu-libstdc++\4.6\include""/>
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\sources\cxx-stl\gnu-libstdc++\4.6\libs\armeabi-v7a\include""/>
|
||||
<listOptionValue builtIn="false" value=""C:\Users\miguel.astor\Documents\OpenCV-2.4.8-android-sdk\sdk\native\jni\include""/>
|
||||
<listOptionValue builtIn="false" value=""C:\android-ndk-r9c\toolchains\arm-linux-androideabi-4.8\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.8\include""/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1450614296" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.2086329912" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.915443128" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\platforms\android-9\arch-arm\usr\include""/>
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\sources\cxx-stl\gnu-libstdc++\4.6\include""/>
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\sources\cxx-stl\gnu-libstdc++\4.6\libs\armeabi-v7a\include""/>
|
||||
<listOptionValue builtIn="false" value=""C:\Users\miguel.astor\Documents\OpenCV-2.4.8-android-sdk\sdk\native\jni\include""/>
|
||||
<listOptionValue builtIn="false" value=""C:\android-ndk-r9c\toolchains\arm-linux-androideabi-4.8\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.8\include""/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1750170923" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1705205854" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1859743695" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\platforms\android-9\arch-arm\usr\include""/>
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\sources\cxx-stl\gnu-libstdc++\4.6\include""/>
|
||||
<listOptionValue builtIn="false" value=""${NDKROOT}\sources\cxx-stl\gnu-libstdc++\4.6\libs\armeabi-v7a\include""/>
|
||||
<listOptionValue builtIn="false" value=""C:\Users\miguel.astor\Documents\OpenCV-2.4.8-android-sdk\sdk\native\jni\include""/>
|
||||
<listOptionValue builtIn="false" value=""C:\android-ndk-r9c\toolchains\arm-linux-androideabi-4.8\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.8\include""/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.343342792" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="NxtAR-android.null.1875632970" name="NxtAR-android"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="0.1353761552">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.pathentry"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Default">
|
||||
<resource resourceType="PROJECT" workspacePath="/NxtAR-android"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
</cproject>
|
||||
|
@@ -14,11 +14,10 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
-->
|
||||
<!-- android:screenOrientation="portrait" -->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="ve.ucv.ciens.ccg.nxtar"
|
||||
android:versionCode="140404"
|
||||
android:versionName="14.04.04" >
|
||||
android:versionCode="140716"
|
||||
android:versionName="14.07.16" >
|
||||
|
||||
<uses-sdk android:minSdkVersion="12" android:targetSdkVersion="19" />
|
||||
|
||||
@@ -33,7 +32,7 @@
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
|
||||
|
||||
<application
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:icon="@drawable/ic_nxtar_core_launcher"
|
||||
android:label="@string/app_name" android:allowBackup="true">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
|
45
README.md
@@ -1,4 +1,43 @@
|
||||
NxtAR-android
|
||||
=============
|
||||
NxtAR: A generic software architecture for Augmented Reality based mobile robot control.
|
||||
========================================================================================
|
||||
|
||||
Modulo 2 de mi trabajo especial de grado.
|
||||
Android backend module
|
||||
----------------------
|
||||
|
||||
### Abstract ###
|
||||
|
||||
NxtAR is a generic software architecture for the development of Augmented Reality games
|
||||
and applications centered around mobile robot control. This is a reference implementation
|
||||
with support for [LEGO Mindstorms NXT][1] mobile robots.
|
||||
|
||||
### Module description ###
|
||||
|
||||
The Android backend module is a concrete [LibGDX][2] application that implements the operating
|
||||
system dependent parts of the NxtAR reference implementation. It is based around the [OpenCV][3]
|
||||
Computer Vision and Machine Learning library. Currently this module supports Android (>= 3.1)
|
||||
devices though it has been tested only on Android (>= 4.0). The module includes direct support for
|
||||
the [OUYA][4] gaming console and other devices using OUYA gamepads.
|
||||
|
||||
### Module installation and usage. ###
|
||||
|
||||
Install the NxtAR-core_XXXXXX.apk file on your device. To use you need additionally an Android (>= 3.0)
|
||||
phone and a LEGO Mindstorms NXT robot with the [LejOS][5] firmware installed. The [NxtAR-cam][6] module must be
|
||||
installed on the device and the [NxtAR-bot][7] module must be installed on the robot. Then, to start the compiled
|
||||
scenario follow these steps:
|
||||
|
||||
* Start the NxtAR-core application.
|
||||
* Start the NxtAR-bot program on the robot.
|
||||
* Calibrate the robot's light sensor following the on-screen instructions.
|
||||
* When the robot displays *"Waiting for connection"* start the NxtAR-cam application and connect it with the robot.
|
||||
* Press the *"Start video streaming"* button on the NxtAR-cam application.
|
||||
* Press the *"Calibrate camera"* button on the NxtAR-core application and point the camera of the device running NxtAR-cam to an OpenCV checkerboard camera calibration pattern.
|
||||
|
||||
The camera calibration step can be repeated if needed.
|
||||
|
||||
[1]: http://www.lego.com/en-us/mindstorms/?domainredir=mindstorms.lego.com
|
||||
[2]: http://libgdx.badlogicgames.com/
|
||||
[3]: http://opencv.org/
|
||||
[4]: https://www.ouya.tv/
|
||||
[5]: http://www.lejos.org/nxj.php
|
||||
[6]: https://github.com/sagge-miky/NxtAR-cam
|
||||
[7]: https://github.com/sagge-miky/NxtAR-bot
|
||||
|
BIN
assets/data/gfx/bomb_game/Anonymous_heart_1.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
assets/data/gfx/bomb_game/comb_bomb.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/data/gfx/bomb_game/incl_bomb.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
assets/data/gfx/bomb_game/wire_bomb.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
assets/data/gfx/gui/Anonymous_Button_Cyan.png
Normal file
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 6.8 KiB |
BIN
assets/data/gfx/gui/arm.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
assets/data/gfx/gui/down_button.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
assets/data/gfx/gui/help.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
assets/data/gfx/gui/left_button.png
Normal file
After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.3 KiB |
BIN
assets/data/gfx/gui/right_button.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
assets/data/gfx/gui/slider_black.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
assets/data/gfx/gui/up_button.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
assets/data/gfx/gui/wheel.png
Normal file
After Width: | Height: | Size: 20 KiB |
3542
assets/models/Bomb_test_1.g3dj
Normal file
BIN
assets/models/Bomb_test_2.g3db
Normal file
3542
assets/models/Bomb_test_2.g3dj
Normal file
BIN
assets/models/collision_models/bomb_game/big_btn_col.g3db
Normal file
BIN
assets/models/collision_models/bomb_game/bomb_1_body_col.g3db
Normal file
BIN
assets/models/collision_models/bomb_game/bomb_2_body_col.g3db
Normal file
BIN
assets/models/collision_models/bomb_game/bomb_3_body_col.g3db
Normal file
BIN
assets/models/collision_models/bomb_game/bomb_3_btn_1_col.g3db
Normal file
BIN
assets/models/collision_models/bomb_game/bomb_3_btn_2_col.g3db
Normal file
BIN
assets/models/collision_models/bomb_game/bomb_3_btn_3_col.g3db
Normal file
BIN
assets/models/collision_models/bomb_game/bomb_3_btn_4_col.g3db
Normal file
BIN
assets/models/collision_models/bomb_game/cable_1_col.g3db
Normal file
BIN
assets/models/collision_models/bomb_game/cable_2_col.g3db
Normal file
BIN
assets/models/collision_models/bomb_game/cable_3_col.g3db
Normal file
BIN
assets/models/collision_models/bomb_game/door_col.g3db
Normal file
BIN
assets/models/collision_models/bomb_game/door_frame1_col.g3db
Normal file
BIN
assets/models/collision_models/bomb_game/robot_arm_col.g3db
Normal file
1101
assets/models/cube.g3dj
Normal file
BIN
assets/models/render_models/bomb_game/big_btn.g3db
Normal file
BIN
assets/models/render_models/bomb_game/bomb_1_body.g3db
Normal file
BIN
assets/models/render_models/bomb_game/bomb_2_body.g3db
Normal file
BIN
assets/models/render_models/bomb_game/bomb_3_body.g3db
Normal file
BIN
assets/models/render_models/bomb_game/bomb_3_btn_1.g3db
Normal file
BIN
assets/models/render_models/bomb_game/bomb_3_btn_2.g3db
Normal file
BIN
assets/models/render_models/bomb_game/bomb_3_btn_3.g3db
Normal file
BIN
assets/models/render_models/bomb_game/bomb_3_btn_4.g3db
Normal file
BIN
assets/models/render_models/bomb_game/cable_1.g3db
Normal file
BIN
assets/models/render_models/bomb_game/cable_2.g3db
Normal file
BIN
assets/models/render_models/bomb_game/cable_3.g3db
Normal file
BIN
assets/models/render_models/bomb_game/door.g3db
Normal file
BIN
assets/models/render_models/bomb_game/door_frame1.g3db
Normal file
BIN
assets/models/render_models/bomb_game/monkey.g3db
Normal file
BIN
assets/models/render_models/bomb_game/robot_arm.g3db
Normal file
29
assets/shaders/alphaSprite/alpha_frag.glsl
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Miguel Angel Astor Romero
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
void main(){
|
||||
vec4 texColor = texture2D(u_texture, v_texCoords);
|
||||
if(texColor.a > 0.0)
|
||||
texColor.a = 0.5;
|
||||
gl_FragColor = texColor;
|
||||
}
|
26
assets/shaders/alphaSprite/alpha_vert.glsl
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Miguel Angel Astor Romero
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
uniform mat4 u_projTrans;
|
||||
|
||||
attribute vec4 a_position;
|
||||
attribute vec2 a_texCoord0;
|
||||
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
void main(){
|
||||
v_texCoords = a_texCoord0;
|
||||
gl_Position = u_projTrans * a_position;
|
||||
}
|
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Miguel Angel Astor Romero
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Miguel Angel Astor Romero
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
uniform mat4 u_projTrans;
|
||||
|
||||
attribute vec4 a_position;
|
||||
|
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Miguel Angel Astor Romero
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
// Ambient light color.
|
||||
uniform vec4 u_ambient;
|
||||
|
||||
// Specular light color.
|
||||
uniform vec4 u_specular;
|
||||
|
||||
// Shininess.
|
||||
uniform float u_shiny;
|
||||
|
||||
// Fragment normal.
|
||||
varying vec3 v_normal;
|
||||
|
||||
// Fragment shaded diffuse color.
|
||||
varying vec4 v_diffuse;
|
||||
|
||||
// Vector from the fragment to the camera.
|
||||
varying vec3 v_eyeVector;
|
||||
|
||||
// The light vector reflected around the fragment normal.
|
||||
varying vec3 v_reflectedVector;
|
||||
|
||||
// The clamped dot product between the normal and the light vector.
|
||||
varying float v_nDotL;
|
||||
|
||||
void main(){
|
||||
// Normalize the input varyings.
|
||||
vec3 normal = normalize(v_normal);
|
||||
vec3 eyeVector = normalize(v_eyeVector);
|
||||
vec3 reflectedVector = normalize(v_reflectedVector);
|
||||
|
||||
// Specular Term.
|
||||
vec4 specular = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
if(v_nDotL > 0.0){
|
||||
specular = u_specular * pow(max(dot(reflectedVector, eyeVector), 0.0), u_shiny);
|
||||
}
|
||||
|
||||
// Aggregate light color.
|
||||
vec4 finalColor = clamp(vec4(/*u_ambient.rgb*/ + v_diffuse.rgb + specular.rgb, 1.0), 0.0, 1.0);
|
||||
|
||||
// Final color.
|
||||
gl_FragColor = finalColor;
|
||||
}
|
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Miguel Angel Astor Romero
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Model-view matrix.
|
||||
uniform mat4 u_projTrans;
|
||||
|
||||
// The world space geometric transformation to apply to this vertex.
|
||||
uniform mat4 u_geomTrans;
|
||||
|
||||
// The inverse transpose of the geometric transformation matrix.
|
||||
uniform mat4 u_normalMatrix;
|
||||
|
||||
// Light source position
|
||||
uniform vec3 u_lightPos;
|
||||
|
||||
// Diffuse light color.
|
||||
uniform vec4 u_lightDiffuse;
|
||||
|
||||
// Camera world space position.
|
||||
uniform vec3 u_cameraPos;
|
||||
|
||||
// Vertex color.
|
||||
uniform vec4 u_materialDiffuse;
|
||||
|
||||
#ifdef SKINNING
|
||||
// The model's bones.
|
||||
uniform mat4 u_bone0;
|
||||
uniform mat4 u_bone1;
|
||||
uniform mat4 u_bone2;
|
||||
uniform mat4 u_bone3;
|
||||
#endif // SKINNING
|
||||
|
||||
// Vertex position in world coordinates.
|
||||
attribute vec4 a_position;
|
||||
|
||||
// Vertex normal.
|
||||
attribute vec4 a_normal;
|
||||
|
||||
#ifdef SKINNING
|
||||
// The weight of each bone.
|
||||
attribute vec2 a_boneWeight0;
|
||||
attribute vec2 a_boneWeight1;
|
||||
attribute vec2 a_boneWeight2;
|
||||
attribute vec2 a_boneWeight3;
|
||||
#endif // SKINNING
|
||||
|
||||
// Fragment normal.
|
||||
varying vec3 v_normal;
|
||||
|
||||
// Diffuse shaded color.
|
||||
varying vec4 v_diffuse;
|
||||
|
||||
// The vector from the vertex to the camera.
|
||||
varying vec3 v_eyeVector;
|
||||
|
||||
// The light vector reflected around the vertex normal.
|
||||
varying vec3 v_reflectedVector;
|
||||
|
||||
// The clamped dot product between the normal and the light vector.
|
||||
varying float v_nDotL;
|
||||
|
||||
void main(){
|
||||
vec4 transformedPosition;
|
||||
|
||||
vec3 lightVector = normalize(u_lightPos.xyz);
|
||||
vec3 invLightVector = -lightVector;
|
||||
|
||||
#ifdef SKINNING
|
||||
// Do the skinning.
|
||||
mat4 bones0;
|
||||
mat4 bones1;
|
||||
mat4 bones2;
|
||||
mat4 bones3;
|
||||
bones0 = u_bone0;
|
||||
bones1 = u_bone1;
|
||||
bones2 = u_bone2;
|
||||
bones3 = u_bone3;
|
||||
|
||||
int index;
|
||||
mat4 skinning = mat4(0.0);
|
||||
|
||||
index = int(a_boneWeight0.x);
|
||||
if(index == 0){
|
||||
skinning += (a_boneWeight0.y) * bones0;
|
||||
}else if(index == 1){
|
||||
skinning += (a_boneWeight0.y) * bones1;
|
||||
}else if(index == 2){
|
||||
skinning += (a_boneWeight0.y) * bones2;
|
||||
}else if(index == 3){
|
||||
skinning += (a_boneWeight0.y) * bones3;
|
||||
}
|
||||
|
||||
index = int(a_boneWeight1.x);
|
||||
if(index == 0){
|
||||
skinning += (a_boneWeight1.y) * bones0;
|
||||
}else if(index == 1){
|
||||
skinning += (a_boneWeight1.y) * bones1;
|
||||
}else if(index == 2){
|
||||
skinning += (a_boneWeight1.y) * bones2;
|
||||
}else if(index == 3){
|
||||
skinning += (a_boneWeight1.y) * bones3;
|
||||
}
|
||||
|
||||
index = int(a_boneWeight2.x);
|
||||
if(index == 0){
|
||||
skinning += (a_boneWeight2.y) * bones0;
|
||||
}else if(index == 1){
|
||||
skinning += (a_boneWeight2.y) * bones1;
|
||||
}else if(index == 2){
|
||||
skinning += (a_boneWeight2.y) * bones2;
|
||||
}else if(index == 3){
|
||||
skinning += (a_boneWeight2.y) * bones3;
|
||||
}
|
||||
|
||||
index = int(a_boneWeight3.x);
|
||||
if(index == 0){
|
||||
skinning += (a_boneWeight3.y) * bones0;
|
||||
}else if(index == 1){
|
||||
skinning += (a_boneWeight3.y) * bones1;
|
||||
}else if(index == 2){
|
||||
skinning += (a_boneWeight3.y) * bones2;
|
||||
}else if(index == 3){
|
||||
skinning += (a_boneWeight3.y) * bones3;
|
||||
}
|
||||
|
||||
// Transform the model.
|
||||
transformedPosition = u_geomTrans * skinning * a_position;
|
||||
#else
|
||||
transformedPosition = u_geomTrans * a_position;
|
||||
#endif // SKINNING
|
||||
|
||||
// Set the varyings.
|
||||
#ifdef SKINNING
|
||||
v_normal = normalize(vec4(u_normalMatrix * skinning * a_normal).xyz);
|
||||
#else
|
||||
v_normal = normalize(vec4(u_normalMatrix * a_normal).xyz);
|
||||
#endif // SKINNING
|
||||
v_eyeVector = normalize(u_cameraPos.xyz - transformedPosition.xyz);
|
||||
v_reflectedVector = normalize(reflect(invLightVector, v_normal));
|
||||
|
||||
// Diffuse Term.
|
||||
float invNDotL = max(dot(v_normal.xyz, invLightVector), 0.0);
|
||||
v_nDotL = max(dot(v_normal.xyz, lightVector), 0.0);
|
||||
v_diffuse = (u_lightDiffuse * u_materialDiffuse * v_nDotL) + (vec4(0.1, 0.1, 0.2, 1.0) * u_materialDiffuse * invNDotL);
|
||||
|
||||
gl_Position = u_projTrans * transformedPosition;
|
||||
}
|
27
assets/shaders/movingBckg/movingBckg_frag.glsl
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Miguel Angel Astor Romero
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
uniform vec2 u_scaling;
|
||||
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
void main(){
|
||||
gl_FragColor = texture2D(u_texture, v_texCoords * u_scaling);
|
||||
}
|
27
assets/shaders/movingBckg/movingBckg_vert.glsl
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Miguel Angel Astor Romero
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
uniform mat4 u_projTrans;
|
||||
uniform float u_displacement;
|
||||
|
||||
attribute vec4 a_position;
|
||||
attribute vec2 a_texCoord0;
|
||||
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
void main(){
|
||||
v_texCoords = a_texCoord0 + u_displacement;
|
||||
gl_Position = u_projTrans * a_position;
|
||||
}
|
@@ -56,5 +56,5 @@ void main(){
|
||||
vec4 lightColor = clamp(vec4(u_ambient.rgb + v_diffuse.rgb + specular.rgb, 1.0), 0.0, 1.0);
|
||||
|
||||
// Final color.
|
||||
gl_FragColor = clamp(lightColor * v_color, 0.0, 1.0);
|
||||
gl_FragColor = clamp(lightColor, 0.0, 1.0);
|
||||
}
|
||||
|
@@ -64,7 +64,7 @@ void main(){
|
||||
v_color = a_color;
|
||||
|
||||
// Diffuse Term.
|
||||
v_diffuse = u_lightDiffuse * max(dot(a_normal.xyz, v_lightVector), 0.0);
|
||||
v_diffuse = u_lightDiffuse * vec4(1.0) * max(dot(a_normal.xyz, v_lightVector), 0.0);
|
||||
|
||||
gl_Position = u_projTrans * transformedPosition;
|
||||
}
|
||||
|
BIN
ic_nxtar_core_launcher-web.png
Normal file
After Width: | Height: | Size: 21 KiB |
@@ -5,7 +5,6 @@ include $(CLEAR_VARS)
|
||||
OPENCV_CAMERA_MODULES:=off
|
||||
OPENCV_LIB_TYPE:=STATIC #SHARED
|
||||
include C:\Users\miguel.astor\Documents\OpenCV-2.4.8-android-sdk\sdk\native\jni\OpenCV.mk
|
||||
#include C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\jni\OpenCV-tegra3.mk
|
||||
|
||||
LOCAL_MODULE := cvproc
|
||||
LOCAL_SRC_FILES := cv_proc.cpp marker.cpp
|
||||
@@ -31,62 +30,62 @@ include $(PREBUILT_SHARED_LIBRARY)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ocv_tegra_java
|
||||
LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libopencv_java.so
|
||||
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libopencv_java.so
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ocv_tegra_info
|
||||
LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libopencv_info.so
|
||||
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libopencv_info.so
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ocv_tegra_native_camera_220
|
||||
LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libnative_camera_r2.2.0.so
|
||||
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libnative_camera_r2.2.0.so
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ocv_tegra_native_camera_233
|
||||
LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libnative_camera_r2.3.3.so
|
||||
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libnative_camera_r2.3.3.so
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ocv_tegra_native_camera_301
|
||||
LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libnative_camera_r3.0.1.so
|
||||
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libnative_camera_r3.0.1.so
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ocv_tegra_native_camera_400
|
||||
LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libnative_camera_r4.0.0.so
|
||||
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libnative_camera_r4.0.0.so
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ocv_tegra_native_camera_403
|
||||
LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libnative_camera_r4.0.3.so
|
||||
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libnative_camera_r4.0.3.so
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ocv_tegra_native_camera_411
|
||||
LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libnative_camera_r4.1.1.so
|
||||
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libnative_camera_r4.1.1.so
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ocv_tegra_native_camera_420
|
||||
LOCAL_SRC_FILES := C:\NVPACK\OpenCV-2.4.5-Tegra-sdk-r2\sdk\native\libs\tegra3\libnative_camera_r4.2.0.so
|
||||
LOCAL_SRC_FILES := C:\\Users\\miguel.astor\\Documents\\OpenCV-2.4.8-android-sdk\\sdk\\native\\libs\\armeabi-v7a\\libnative_camera_r4.2.0.so
|
||||
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
@@ -77,7 +77,7 @@ int hammDistMarker(cv::Mat);
|
||||
|
||||
cv::Mat rotate(cv::Mat);
|
||||
|
||||
int decodeMarker(cv::Mat &);
|
||||
int decodeMarker(cv::Mat &, int &);
|
||||
|
||||
void renderMarkers(markers_vector &, cv::Mat &);
|
||||
|
||||
@@ -92,9 +92,11 @@ void warpMarker(Marker &, cv::Mat &, cv::Mat &);
|
||||
******************************************************************************/
|
||||
|
||||
void getAllMarkers(markers_vector & valid_markers, cv::Mat & img){
|
||||
int rotations = 0;
|
||||
cv::Mat gray, thresh, cont, mark;
|
||||
contours_vector contours;
|
||||
markers_vector markers;
|
||||
cv::Point2f point;
|
||||
#ifdef DESKTOP
|
||||
std::ostringstream oss;
|
||||
#endif
|
||||
@@ -116,10 +118,32 @@ void getAllMarkers(markers_vector & valid_markers, cv::Mat & img){
|
||||
for(int i = 0; i < markers.size(); i++){
|
||||
warpMarker(markers[i], gray, mark);
|
||||
|
||||
int code = decodeMarker(mark);
|
||||
int code = decodeMarker(mark, rotations);
|
||||
|
||||
if(code != -1){
|
||||
markers[i].code = code;
|
||||
|
||||
// If the decoder detected the marker is rotated then reorder the points
|
||||
// so that the orientation calculations always use the correct top of the marker.
|
||||
if(rotations > 0){
|
||||
while(rotations > 0){
|
||||
for(int r = 0; r < 1; r++){
|
||||
point = markers[i].points.at(markers[i].points.size() - 1);
|
||||
markers[i].points.pop_back();
|
||||
markers[i].points.insert(markers[i].points.begin(), point);
|
||||
}
|
||||
|
||||
rotations--;
|
||||
}
|
||||
}
|
||||
|
||||
// Rotate 180 degrees.
|
||||
for(int r = 0; r < 2; r++){
|
||||
point = markers[i].points.at(markers[i].points.size() - 1);
|
||||
markers[i].points.pop_back();
|
||||
markers[i].points.insert(markers[i].points.begin(), point);
|
||||
}
|
||||
|
||||
valid_markers.push_back(markers[i]);
|
||||
}
|
||||
}
|
||||
@@ -434,11 +458,13 @@ cv::Mat rotate(cv::Mat in){
|
||||
* Decode a marker image and return it's code. Returns -1 if the image is
|
||||
* not a valid marker.
|
||||
*/
|
||||
int decodeMarker(cv::Mat & marker){
|
||||
int decodeMarker(cv::Mat & marker, int & rotations){
|
||||
bool found = false;
|
||||
int code = 0;
|
||||
cv::Mat bits;
|
||||
|
||||
rotations = 0;
|
||||
|
||||
// Verify that the outer rim of marker cells are all black.
|
||||
for(int y = 0; y < 7; y++){
|
||||
int inc = (y == 0 || y == 6) ? 1 : 6;
|
||||
@@ -478,6 +504,7 @@ int decodeMarker(cv::Mat & marker){
|
||||
if(hammDistMarker(bits) != 0){
|
||||
for(int r = 1; r < 4; r++){
|
||||
bits = rotate(bits);
|
||||
rotations++;
|
||||
if(hammDistMarker(bits) != 0) continue;
|
||||
else{ found = true; break;}
|
||||
}
|
||||
|
BIN
res/drawable-hdpi/ic_nxtar_core_launcher.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
res/drawable-mdpi/ic_nxtar_core_launcher.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
res/drawable-xhdpi/ic_nxtar_core_launcher.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
res/drawable-xhdpi/ouya_icon.png
Normal file
After Width: | Height: | Size: 101 KiB |
BIN
res/drawable-xxhdpi/ic_nxtar_core_launcher.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
-->
|
||||
<resources>
|
||||
<string name="app_name">NxtAR</string>
|
||||
<string name="ocv_failed">No se pudo inicializar OpenCV</string>
|
||||
<string name="ocv_success">OpenCV inicializado con exito</string>
|
||||
<string name="app_name">NxtAR-core</string>
|
||||
<string name="ocv_failed">Error al inicializar OpenCV</string>
|
||||
<string name="ocv_success">OpenCV inicializado con éxito</string>
|
||||
</resources>
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
-->
|
||||
<resources>
|
||||
<string name="app_name">NxtAR</string>
|
||||
<string name="app_name">NxtAR-core</string>
|
||||
<string name="ocv_failed">Failed to initialize OpenCV</string>
|
||||
<string name="ocv_success">OpenCV initialized successfully</string>
|
||||
</resources>
|
@@ -24,7 +24,7 @@ import org.opencv.android.Utils;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.imgproc.Imgproc;
|
||||
|
||||
import ve.ucv.ciens.ccg.nxtar.interfaces.AndroidFunctionalityWrapper;
|
||||
import ve.ucv.ciens.ccg.nxtar.interfaces.ActionResolver;
|
||||
import ve.ucv.ciens.ccg.nxtar.interfaces.ImageProcessor;
|
||||
import ve.ucv.ciens.ccg.nxtar.utils.ProjectConstants;
|
||||
import android.content.Context;
|
||||
@@ -51,7 +51,7 @@ import com.badlogic.gdx.math.Vector3;
|
||||
* <p>Provides operating system services to the LibGDX platform
|
||||
* independant code, and handles OpenCV initialization and api calls.</p>
|
||||
*/
|
||||
public class MainActivity extends AndroidApplication implements AndroidFunctionalityWrapper, ImageProcessor{
|
||||
public class MainActivity extends AndroidApplication implements ActionResolver, ImageProcessor{
|
||||
/**
|
||||
* Tag used for logging.
|
||||
*/
|
||||
@@ -231,9 +231,8 @@ public class MainActivity extends AndroidApplication implements AndroidFunctiona
|
||||
|
||||
// Configure LibGDX.
|
||||
AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
|
||||
cfg.useGL20 = true;
|
||||
cfg.useAccelerometer = false;
|
||||
cfg.useCompass = false;
|
||||
cfg.useAccelerometer = true;
|
||||
cfg.useCompass = true;
|
||||
cfg.useWakelock = true;
|
||||
|
||||
// Launch the LibGDX core game class.
|
||||
|