Skip to content

Commit

Permalink
first commit of project
Browse files Browse the repository at this point in the history
  • Loading branch information
WuMorris committed Nov 30, 2017
1 parent 353d144 commit cac39c6
Show file tree
Hide file tree
Showing 13,589 changed files with 2,662,120 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild
22 changes: 22 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
Binary file added app/CMakeLists.rar
Binary file not shown.
79 changes: 79 additions & 0 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.6)


set(CMAKE_VERBOSE_MAKEFILE on)
set(libs "${CMAKE_SOURCE_DIR}/src/main/jniLibs")
set(facesrc "${CMAKE_SOURCE_DIR}/src/main/cpp/facecaffe")
include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp/include)

add_library(libopencv_java3 SHARED IMPORTED )
set_target_properties(libopencv_java3 PROPERTIES
IMPORTED_LOCATION "${libs}/${ANDROID_ABI}/libopencv_java3.so")

add_library(libOpenCL SHARED IMPORTED )
set_target_properties(libOpenCL PROPERTIES
IMPORTED_LOCATION "${libs}/${ANDROID_ABI}/libOpenCL.so")

add_library(libcaffe_jni SHARED IMPORTED )
set_target_properties(libcaffe_jni PROPERTIES
IMPORTED_LOCATION "${libs}/${ANDROID_ABI}/libcaffe_jni.so")

add_library(libcaffe SHARED IMPORTED )
set_target_properties(libcaffe PROPERTIES
IMPORTED_LOCATION "${libs}/${ANDROID_ABI}/libcaffe.so")

add_library(libarm_compute_core-static STATIC IMPORTED )
set_target_properties(libarm_compute_core-static PROPERTIES
IMPORTED_LOCATION "${libs}/${ANDROID_ABI}/libarm_compute_core-static.a")

add_library(libarm_compute-static STATIC IMPORTED )
set_target_properties(libarm_compute-static PROPERTIES
IMPORTED_LOCATION "${libs}/${ANDROID_ABI}/libarm_compute-static.a")

add_library(libboost_system STATIC IMPORTED )
set_target_properties(libboost_system PROPERTIES
IMPORTED_LOCATION "${libs}/${ANDROID_ABI}/libboost_system.a")

add_library(libglog STATIC IMPORTED )
set_target_properties(libglog PROPERTIES
IMPORTED_LOCATION "${libs}/${ANDROID_ABI}/libglog.a")

add_library(libprotobuf STATIC IMPORTED )
set_target_properties(libprotobuf PROPERTIES
IMPORTED_LOCATION "${libs}/${ANDROID_ABI}/libprotobuf.a")

add_library(libproto STATIC IMPORTED )
set_target_properties(libproto PROPERTIES
IMPORTED_LOCATION "${libs}/${ANDROID_ABI}/libproto.a")

set(LOCAL_LDLIBS "-ltinyalsa")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCPU_ONLY=1 -std=gnu++11 -fexceptions -frtti")

aux_source_directory(${CMAKE_SOURCE_DIR}/src/main/cpp/ DIR_LIB_SRCS)

add_library(native-lib SHARED ${DIR_LIB_SRCS})



#target_include_directories(native-lib PRIVATE ${DIR_LIB_SRCS})

find_library( # Sets the name of the path variable.
log-lib

# Specifies the name of the NDK library that
# you want CMake to locate.
log)

ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/src/main/cpp/facecaffe)

target_link_libraries(native-lib android log tinyalsa
libopencv_java3 facecaffe libcaffe
libprotobuf libproto libglog libarm_compute-static
libarm_compute_core-static libboost_system libcaffe_jni
${log-lib}
)
52 changes: 52 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.openailab.track"
minSdkVersion 23
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {

cppFlags "-std=c++11","-frtti", "-fexceptions"
}
}
ndk{
abiFilters 'arm64-v8a'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
//sourceSets {
// main {
// jni.srcDirs = [] // disable automatic ndk-build call, which ignore our Android.mk
// jniLibs.srcDir 'src/main/jni/libs'
// }
// }
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}


dependencies {
compile fileTree(include: ['*.jar'],dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.1.1'
testCompile 'junit:junit:4.12'
compile project(':openCVLibrary331')
compile 'com.google.android.gms:play-services-appindexing:8.4.0'
}
}
17 changes: 17 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\user\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.openailab.track;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("com.openailab.track", appContext.getPackageName());
}
}
33 changes: 33 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.openailab.track" >

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/> 
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-feature android:name="android.hardware.camera" android:required="true"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme" >

<activity android:name=".MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity><!-- ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information. -->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>

</manifest>
4 changes: 4 additions & 0 deletions app/src/main/cpp/facecaffe/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
find_library( libopencv_java3 log)
aux_source_directory(${CMAKE_SOURCE_DIR}/src/main/cpp/facecaffe DIR_LIB_SRCS)

add_library (facecaffe STATIC ${DIR_LIB_SRCS})
Loading

0 comments on commit cac39c6

Please sign in to comment.