Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
9e065bc8
Commit
9e065bc8
authored
Aug 13, 2015
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5179 from alalek:update_android_samples
parents
11a829f9
03bab0fc
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
8 deletions
+49
-8
CMakeLists.txt
samples/android/CMakeLists.txt
+1
-0
Android.mk
samples/android/face-detection/jni/Android.mk
+9
-1
Android.mk
samples/android/tutorial-2-mixedprocessing/jni/Android.mk
+9
-1
CMakeLists.txt
samples/android/tutorial-4-opencl/CMakeLists.txt
+15
-1
Android.mk
samples/android/tutorial-4-opencl/jni/Android.mk
+11
-3
CLprocessor.cpp
samples/android/tutorial-4-opencl/jni/CLprocessor.cpp
+2
-1
GLrender.cpp
samples/android/tutorial-4-opencl/jni/GLrender.cpp
+2
-1
No files found.
samples/android/CMakeLists.txt
View file @
9e065bc8
...
...
@@ -14,6 +14,7 @@ add_subdirectory(color-blob-detection)
add_subdirectory
(
tutorial-1-camerapreview
)
add_subdirectory
(
tutorial-2-mixedprocessing
)
add_subdirectory
(
tutorial-3-cameracontrol
)
add_subdirectory
(
tutorial-4-opencl
)
# hello-android sample
if
(
HAVE_opencv_highgui
)
...
...
samples/android/face-detection/jni/Android.mk
View file @
9e065bc8
...
...
@@ -5,7 +5,15 @@ include $(CLEAR_VARS)
#OPENCV_CAMERA_MODULES:=off
#OPENCV_INSTALL_MODULES:=off
#OPENCV_LIB_TYPE:=SHARED
include ../../sdk/native/jni/OpenCV.mk
ifdef OPENCV_ANDROID_SDK
ifneq ("","$(wildcard $(OPENCV_ANDROID_SDK)/OpenCV.mk)")
include ${OPENCV_ANDROID_SDK}/OpenCV.mk
else
include ${OPENCV_ANDROID_SDK}/sdk/native/jni/OpenCV.mk
endif
else
include ../../sdk/native/jni/OpenCV.mk
endif
LOCAL_SRC_FILES := DetectionBasedTracker_jni.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)
...
...
samples/android/tutorial-2-mixedprocessing/jni/Android.mk
View file @
9e065bc8
...
...
@@ -2,7 +2,15 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include ../../sdk/native/jni/OpenCV.mk
ifdef OPENCV_ANDROID_SDK
ifneq ("","$(wildcard $(OPENCV_ANDROID_SDK)/OpenCV.mk)")
include ${OPENCV_ANDROID_SDK}/OpenCV.mk
else
include ${OPENCV_ANDROID_SDK}/sdk/native/jni/OpenCV.mk
endif
else
include ../../sdk/native/jni/OpenCV.mk
endif
LOCAL_MODULE := mixed_sample
LOCAL_SRC_FILES := jni_part.cpp
...
...
samples/android/tutorial-4-opencl/CMakeLists.txt
View file @
9e065bc8
set
(
sample example-tutorial-4-opencl
)
if
(
NOT DEFINED ANDROID_OPENCL_SDK
)
message
(
STATUS
"Sample
${
sample
}
is disabled, because ANDROID_OPENCL_SDK is not specified"
)
return
()
endif
()
if
(
ANDROID_NATIVE_API_LEVEL LESS 14
)
message
(
STATUS
"Sample
${
sample
}
is disabled, because ANDROID_NATIVE_API_LEVEL < 14"
)
return
()
endif
()
if
(
BUILD_FAT_JAVA_LIB
)
set
(
native_deps opencv_java
)
...
...
@@ -6,7 +14,13 @@ else()
set
(
native_deps opencv_imgproc
)
endif
()
add_android_project
(
${
sample
}
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
LIBRARY_DEPS
${
OpenCV_BINARY_DIR
}
SDK_TARGET 21
${
ANDROID_SDK_TARGET
}
NATIVE_DEPS
${
native_deps
}
)
include_directories
(
${
ANDROID_OPENCL_SDK
}
/include
)
link_directories
(
${
ANDROID_OPENCL_SDK
}
/lib/
${
ANDROID_ABI
}
)
add_android_project
(
${
sample
}
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
LIBRARY_DEPS
${
OpenCV_BINARY_DIR
}
SDK_TARGET 21
${
ANDROID_SDK_TARGET
}
NATIVE_DEPS
${
native_deps
}
-lGLESv2 -lEGL -lOpenCL
)
if
(
TARGET
${
sample
}
)
add_dependencies
(
opencv_android_examples
${
sample
}
)
endif
()
samples/android/tutorial-4-opencl/jni/Android.mk
View file @
9e065bc8
...
...
@@ -3,10 +3,18 @@ LOCAL_PATH := $(call my-dir)
# add OpenCV
include $(CLEAR_VARS)
OPENCV_INSTALL_MODULES:=on
ifeq ($(O4A_SDK_ROOT),)
include ../../sdk/native/jni/OpenCV.mk
ifdef OPENCV_ANDROID_SDK
ifneq ("","$(wildcard $(OPENCV_ANDROID_SDK)/OpenCV.mk)")
include ${OPENCV_ANDROID_SDK}/OpenCV.mk
else
include ${OPENCV_ANDROID_SDK}/sdk/native/jni/OpenCV.mk
endif
else
include $(O4A_SDK_ROOT)/sdk/native/jni/OpenCV.mk
include ../../sdk/native/jni/OpenCV.mk
endif
ifndef OPENCL_SDK
$(error Specify OPENCL_SDK to Android OpenCL SDK location)
endif
# add OpenCL
...
...
samples/android/tutorial-4-opencl/jni/CLprocessor.cpp
View file @
9e065bc8
...
...
@@ -3,7 +3,8 @@
#include <EGL/egl.h>
#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/core/ocl.hpp>
#include "common.hpp"
...
...
samples/android/tutorial-4-opencl/jni/GLrender.cpp
View file @
9e065bc8
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include "common.hpp"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment