This is a fork from HelloAndroidCamera2.
It uses Android Camera2 API to capture a YUV stream, applies an edge detector and draws the result directly on the Java SurfaceView through ANativeWindow.
This fork is compatible with Android Studio C++ CMake toolchain.
In gradle.properties
set
halideDir=A:/dev/cv/halide-build
hostClang=C:/data-ssd/dev/cv/llvm-install/bin/clang++.exe
halideDir
points to your Halide release build.
hostClang
points to the clang executable.
app/src/main/cpp/hl-pipelines/CMakeLists.txt
generates and links the Halide pipelines to the native JNI library.
It expects all *.cpp
files in the same folder to be generators with a call to HALIDE_REGISTER_GENERATOR(...)
.
When you delete or rename a generator you must Build -> Refresh Linked C++ Projects. Otherwise you'll get a missing and no known rule to make it
error on next build.
arm64-v8a
x86_64
- Ubuntu 16
- Windows 10