├── .gitignore ├── .idea ├── dbnavigator.xml ├── gradle.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── README.md ├── app ├── .externalNativeBuild │ └── cmake │ │ ├── debug │ │ └── armeabi-v7a │ │ │ ├── .ninja_deps │ │ │ ├── .ninja_log │ │ │ ├── CMakeCache.txt │ │ │ ├── CMakeFiles │ │ │ ├── 3.6.0-rc2 │ │ │ │ ├── CMakeCCompiler.cmake │ │ │ │ ├── CMakeCXXCompiler.cmake │ │ │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ │ │ └── CMakeSystem.cmake │ │ │ ├── CMakeOutput.log │ │ │ ├── TargetDirectories.txt │ │ │ ├── cmake.check_cache │ │ │ ├── feature_tests.bin │ │ │ ├── feature_tests.c │ │ │ ├── feature_tests.cxx │ │ │ └── hyperlpr.dir │ │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── jni │ │ │ │ ├── javaWarpper.cpp.o │ │ │ │ └── src │ │ │ │ ├── CNNRecognizer.cpp.o │ │ │ │ ├── FastDeskew.cpp.o │ │ │ │ ├── FineMapping.cpp.o │ │ │ │ ├── Pipeline.cpp.o │ │ │ │ ├── PlateDetection.cpp.o │ │ │ │ ├── PlateSegmentation.cpp.o │ │ │ │ └── Recognizer.cpp.o │ │ │ ├── android_gradle_build.json │ │ │ ├── build.ninja │ │ │ ├── cmake_build_command.txt │ │ │ ├── cmake_build_output.txt │ │ │ ├── cmake_install.cmake │ │ │ └── rules.ninja │ │ └── release │ │ └── armeabi-v7a │ │ ├── CMakeCache.txt │ │ ├── CMakeFiles │ │ ├── 3.6.0-rc2 │ │ │ ├── CMakeCCompiler.cmake │ │ │ ├── CMakeCXXCompiler.cmake │ │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ │ └── CMakeSystem.cmake │ │ ├── CMakeOutput.log │ │ ├── TargetDirectories.txt │ │ ├── cmake.check_cache │ │ ├── feature_tests.bin │ │ ├── feature_tests.c │ │ └── feature_tests.cxx │ │ ├── android_gradle_build.json │ │ ├── build.ninja │ │ ├── cmake_build_command.txt │ │ ├── cmake_build_output.txt │ │ ├── cmake_install.cmake │ │ └── rules.ninja ├── .gitignore ├── CMakeLists.txt ├── build.gradle ├── proguard-rules.pro ├── release │ ├── hyperlpr.apk │ └── output.json └── src │ ├── androidTest │ └── java │ │ └── pr │ │ └── hyperlpr │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ └── hyperlpr │ │ │ ├── CharacterRecognization.caffemodel │ │ │ ├── CharacterRecognization.prototxt │ │ │ ├── HorizonalFinemapping.caffemodel │ │ │ ├── HorizonalFinemapping.prototxt │ │ │ ├── Segmentation.caffemodel │ │ │ ├── Segmentation.prototxt │ │ │ ├── cascade.xml │ │ │ └── demo.jpg │ ├── java │ │ └── pr │ │ │ └── hyperlpr │ │ │ ├── Globals.java │ │ │ ├── MainActivity.java │ │ │ ├── ReadyDataActivity.java │ │ │ ├── ResultActivity.java │ │ │ ├── task │ │ │ ├── ImageBean.java │ │ │ ├── ImageExtractionService.java │ │ │ ├── ProcessImageTask.java │ │ │ └── callback │ │ │ │ ├── ProcessStateCallback.java │ │ │ │ └── ProgramImageCallback.java │ │ │ ├── util │ │ │ ├── DeepAssetUtil.java │ │ │ ├── DeepCarUtil.java │ │ │ ├── DeepMediaFileUtil.java │ │ │ └── Utils.java │ │ │ └── view │ │ │ ├── NumberProgressBar.java │ │ │ └── OnProgressBarListener.java │ ├── jni │ │ ├── include │ │ │ ├── CNNRecognizer.h │ │ │ ├── FastDeskew.h │ │ │ ├── FineMapping.h │ │ │ ├── Pipeline.h │ │ │ ├── PlateDetection.h │ │ │ ├── PlateInfo.h │ │ │ ├── PlateSegmentation.h │ │ │ ├── Recognizer.h │ │ │ └── niBlackThreshold.h │ │ ├── javaWarpper.cpp │ │ └── src │ │ │ ├── CNNRecognizer.cpp │ │ │ ├── FastDeskew.cpp │ │ │ ├── FineMapping.cpp │ │ │ ├── Pipeline.cpp │ │ │ ├── PlateDetection.cpp │ │ │ ├── PlateSegmentation.cpp │ │ │ ├── Recognizer.cpp │ │ │ └── util.h │ ├── jniLibs │ │ ├── armeabi-v7a │ │ │ ├── libopencv_core.a │ │ │ ├── libopencv_dnn.a │ │ │ ├── libopencv_flann.a │ │ │ ├── libopencv_highgui.a │ │ │ ├── libopencv_imgcodecs.a │ │ │ ├── libopencv_imgproc.a │ │ │ ├── libopencv_java3.so │ │ │ ├── libopencv_objdetect.a │ │ │ ├── libopencv_photo.a │ │ │ └── libopencv_shape.a │ │ └── armeabi │ │ │ ├── libopencv_core.a │ │ │ ├── libopencv_dnn.a │ │ │ ├── libopencv_flann.a │ │ │ ├── libopencv_highgui.a │ │ │ ├── libopencv_imgcodecs.a │ │ │ ├── libopencv_imgproc.a │ │ │ ├── libopencv_java3.so │ │ │ ├── libopencv_objdetect.a │ │ │ ├── libopencv_photo.a │ │ │ └── libopencv_shape.a │ └── res │ │ ├── drawable │ │ ├── camera.png │ │ └── folder.png │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── activity_ready.xml │ │ └── activity_result.xml │ │ ├── menu │ │ └── menu_main.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── pr │ └── hyperlpr │ └── ExampleUnitTest.java ├── build.gradle ├── clean.bat ├── doc ├── 1-ndk.png ├── 2-1-opencv3.3.png ├── 2-2-opencv3.3.png ├── 2-opencv3.3.png ├── 3-model.png ├── 4-jni.png └── 5-CMakeList.png ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── hyperlpr.apk ├── hyperlpr.jpg ├── import-summary.txt ├── openCVLibrary330 ├── build.gradle ├── lint.xml └── src │ └── main │ ├── AndroidManifest.xml │ ├── aidl │ └── org │ │ └── opencv │ │ └── engine │ │ └── OpenCVEngineInterface.aidl │ ├── java │ └── org │ │ └── opencv │ │ ├── android │ │ ├── AsyncServiceHelper.java │ │ ├── BaseLoaderCallback.java │ │ ├── Camera2Renderer.java │ │ ├── CameraBridgeViewBase.java │ │ ├── CameraGLRendererBase.java │ │ ├── CameraGLSurfaceView.java │ │ ├── CameraRenderer.java │ │ ├── FpsMeter.java │ │ ├── InstallCallbackInterface.java │ │ ├── JavaCameraView.java │ │ ├── LoaderCallbackInterface.java │ │ ├── OpenCVLoader.java │ │ ├── StaticHelper.java │ │ └── Utils.java │ │ ├── calib3d │ │ ├── Calib3d.java │ │ ├── StereoBM.java │ │ ├── StereoMatcher.java │ │ └── StereoSGBM.java │ │ ├── core │ │ ├── Algorithm.java │ │ ├── Core.java │ │ ├── CvException.java │ │ ├── CvType.java │ │ ├── DMatch.java │ │ ├── KeyPoint.java │ │ ├── Mat.java │ │ ├── MatOfByte.java │ │ ├── MatOfDMatch.java │ │ ├── MatOfDouble.java │ │ ├── MatOfFloat.java │ │ ├── MatOfFloat4.java │ │ ├── MatOfFloat6.java │ │ ├── MatOfInt.java │ │ ├── MatOfInt4.java │ │ ├── MatOfKeyPoint.java │ │ ├── MatOfPoint.java │ │ ├── MatOfPoint2f.java │ │ ├── MatOfPoint3.java │ │ ├── MatOfPoint3f.java │ │ ├── MatOfRect.java │ │ ├── MatOfRect2d.java │ │ ├── Point.java │ │ ├── Point3.java │ │ ├── Range.java │ │ ├── Rect.java │ │ ├── Rect2d.java │ │ ├── RotatedRect.java │ │ ├── Scalar.java │ │ ├── Size.java │ │ ├── TermCriteria.java │ │ └── TickMeter.java │ │ ├── dnn │ │ ├── DictValue.java │ │ ├── Dnn.java │ │ ├── Importer.java │ │ ├── Layer.java │ │ └── Net.java │ │ ├── features2d │ │ ├── AKAZE.java │ │ ├── AgastFeatureDetector.java │ │ ├── BFMatcher.java │ │ ├── BOWImgDescriptorExtractor.java │ │ ├── BOWKMeansTrainer.java │ │ ├── BOWTrainer.java │ │ ├── BRISK.java │ │ ├── DescriptorExtractor.java │ │ ├── DescriptorMatcher.java │ │ ├── FastFeatureDetector.java │ │ ├── Feature2D.java │ │ ├── FeatureDetector.java │ │ ├── Features2d.java │ │ ├── FlannBasedMatcher.java │ │ ├── GFTTDetector.java │ │ ├── KAZE.java │ │ ├── MSER.java │ │ ├── ORB.java │ │ └── Params.java │ │ ├── imgcodecs │ │ └── Imgcodecs.java │ │ ├── imgproc │ │ ├── CLAHE.java │ │ ├── Imgproc.java │ │ ├── LineSegmentDetector.java │ │ ├── Moments.java │ │ └── Subdiv2D.java │ │ ├── ml │ │ ├── ANN_MLP.java │ │ ├── Boost.java │ │ ├── DTrees.java │ │ ├── EM.java │ │ ├── KNearest.java │ │ ├── LogisticRegression.java │ │ ├── Ml.java │ │ ├── NormalBayesClassifier.java │ │ ├── ParamGrid.java │ │ ├── RTrees.java │ │ ├── SVM.java │ │ ├── SVMSGD.java │ │ ├── StatModel.java │ │ └── TrainData.java │ │ ├── objdetect │ │ ├── BaseCascadeClassifier.java │ │ ├── CascadeClassifier.java │ │ ├── HOGDescriptor.java │ │ └── Objdetect.java │ │ ├── osgi │ │ ├── OpenCVInterface.java │ │ └── OpenCVNativeLoader.java │ │ ├── photo │ │ ├── AlignExposures.java │ │ ├── AlignMTB.java │ │ ├── CalibrateCRF.java │ │ ├── CalibrateDebevec.java │ │ ├── CalibrateRobertson.java │ │ ├── MergeDebevec.java │ │ ├── MergeExposures.java │ │ ├── MergeMertens.java │ │ ├── MergeRobertson.java │ │ ├── Photo.java │ │ ├── Tonemap.java │ │ ├── TonemapDrago.java │ │ ├── TonemapDurand.java │ │ ├── TonemapMantiuk.java │ │ └── TonemapReinhard.java │ │ ├── utils │ │ └── Converters.java │ │ ├── video │ │ ├── BackgroundSubtractor.java │ │ ├── BackgroundSubtractorKNN.java │ │ ├── BackgroundSubtractorMOG2.java │ │ ├── DenseOpticalFlow.java │ │ ├── DualTVL1OpticalFlow.java │ │ ├── FarnebackOpticalFlow.java │ │ ├── KalmanFilter.java │ │ ├── SparseOpticalFlow.java │ │ ├── SparsePyrLKOpticalFlow.java │ │ └── Video.java │ │ └── videoio │ │ ├── VideoCapture.java │ │ ├── VideoWriter.java │ │ └── Videoio.java │ └── res │ └── values │ └── attrs.xml └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | build/ 8 | app/build/ -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 26 | 27 | 28 | 29 | 30 | 31 | 33 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hyperlpr4Android 2 | 3 | 热烈欢迎感兴趣的朋友,一起加入Android平台的研发。 4 | 5 | 参见 [https://github.com/zeusees/HyperLPR](https://github.com/zeusees/HyperLPR) 6 | 7 | 8 | 效果如下: 9 | 10 | ![](./hyperlpr.jpg) -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/.ninja_deps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/debug/armeabi-v7a/.ninja_deps -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/.ninja_log: -------------------------------------------------------------------------------- 1 | # ninja log v5 2 | 35 6007 0 CMakeFiles/hyperlpr.dir/src/main/jni/src/FastDeskew.cpp.o 6b8fd2f48883ae63 3 | 1 6035 0 CMakeFiles/hyperlpr.dir/src/main/jni/src/CNNRecognizer.cpp.o 5ac2331781760e54 4 | 26 6042 0 CMakeFiles/hyperlpr.dir/src/main/jni/javaWarpper.cpp.o daaa33d7a45906a6 5 | 22 6043 0 CMakeFiles/hyperlpr.dir/src/main/jni/src/PlateDetection.cpp.o 977578e7d0310b64 6 | 13 6120 0 CMakeFiles/hyperlpr.dir/src/main/jni/src/FineMapping.cpp.o ada5de5773120ea0 7 | 17 6164 0 CMakeFiles/hyperlpr.dir/src/main/jni/src/Pipeline.cpp.o d758e75bbdeb4272 8 | 6035 7811 0 CMakeFiles/hyperlpr.dir/src/main/jni/src/Recognizer.cpp.o eb3498ed8ce88307 9 | 6010 8151 0 CMakeFiles/hyperlpr.dir/src/main/jni/src/PlateSegmentation.cpp.o 8857551e09965154 10 | 8151 11725 0 ../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libhyperlpr.so de170e8e4f819de6 11 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/3.6.0-rc2/CMakeCCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER "D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe") 2 | set(CMAKE_C_COMPILER_ARG1 "") 3 | set(CMAKE_C_COMPILER_ID "Clang") 4 | set(CMAKE_C_COMPILER_VERSION "3.8") 5 | set(CMAKE_C_COMPILER_WRAPPER "") 6 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") 7 | set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert") 8 | set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes") 9 | set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros") 10 | set(CMAKE_C11_COMPILE_FEATURES "c_static_assert") 11 | 12 | set(CMAKE_C_PLATFORM_ID "") 13 | set(CMAKE_C_SIMULATE_ID "") 14 | set(CMAKE_C_SIMULATE_VERSION "") 15 | 16 | set(CMAKE_AR "D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ar.exe") 17 | set(CMAKE_RANLIB "D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ranlib.exe") 18 | set(CMAKE_LINKER "D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ld.exe") 19 | set(CMAKE_COMPILER_IS_GNUCC ) 20 | set(CMAKE_C_COMPILER_LOADED 1) 21 | set(CMAKE_C_COMPILER_WORKS TRUE) 22 | set(CMAKE_C_ABI_COMPILED TRUE) 23 | set(CMAKE_COMPILER_IS_MINGW ) 24 | set(CMAKE_COMPILER_IS_CYGWIN ) 25 | if(CMAKE_COMPILER_IS_CYGWIN) 26 | set(CYGWIN 1) 27 | set(UNIX 1) 28 | endif() 29 | 30 | set(CMAKE_C_COMPILER_ENV_VAR "CC") 31 | 32 | if(CMAKE_COMPILER_IS_MINGW) 33 | set(MINGW 1) 34 | endif() 35 | set(CMAKE_C_COMPILER_ID_RUN 1) 36 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) 37 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) 38 | set(CMAKE_C_LINKER_PREFERENCE 10) 39 | 40 | # Save compiler ABI information. 41 | set(CMAKE_C_SIZEOF_DATA_PTR "4") 42 | set(CMAKE_C_COMPILER_ABI "ELF") 43 | set(CMAKE_C_LIBRARY_ARCHITECTURE "") 44 | 45 | if(CMAKE_C_SIZEOF_DATA_PTR) 46 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") 47 | endif() 48 | 49 | if(CMAKE_C_COMPILER_ABI) 50 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") 51 | endif() 52 | 53 | if(CMAKE_C_LIBRARY_ARCHITECTURE) 54 | set(CMAKE_LIBRARY_ARCHITECTURE "") 55 | endif() 56 | 57 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") 58 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) 59 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") 60 | endif() 61 | 62 | 63 | 64 | 65 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "dl;c;dl") 66 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/5.0.300080/lib/linux/arm;D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb;D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/arm-linux-androideabi/lib/armv7-a/thumb;D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/platforms/android-22/arch-arm/usr/lib") 67 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 68 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/3.6.0-rc2/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Windows-10.0.15063") 2 | set(CMAKE_HOST_SYSTEM_NAME "Windows") 3 | set(CMAKE_HOST_SYSTEM_VERSION "10.0.15063") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64") 5 | 6 | include("D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/build/cmake/android.toolchain.cmake") 7 | 8 | set(CMAKE_SYSTEM "Android-22") 9 | set(CMAKE_SYSTEM_NAME "Android") 10 | set(CMAKE_SYSTEM_VERSION "22") 11 | set(CMAKE_SYSTEM_PROCESSOR "armv7-a") 12 | 13 | set(CMAKE_CROSSCOMPILING "TRUE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | C:/Users/lichen/Desktop/gitTest/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/rebuild_cache.dir 2 | C:/Users/lichen/Desktop/gitTest/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir 3 | C:/Users/lichen/Desktop/gitTest/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/edit_cache.dir 4 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/feature_tests.c: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "C_FEATURE:" 4 | #if ((__clang_major__ * 100) + __clang_minor__) >= 304 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "c_function_prototypes\n" 10 | "C_FEATURE:" 11 | #if ((__clang_major__ * 100) + __clang_minor__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "c_restrict\n" 17 | "C_FEATURE:" 18 | #if ((__clang_major__ * 100) + __clang_minor__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "c_static_assert\n" 24 | "C_FEATURE:" 25 | #if ((__clang_major__ * 100) + __clang_minor__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "c_variadic_macros\n" 31 | 32 | }; 33 | 34 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 35 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/javaWarpper.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/javaWarpper.cpp.o -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/src/CNNRecognizer.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/src/CNNRecognizer.cpp.o -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/src/FastDeskew.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/src/FastDeskew.cpp.o -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/src/FineMapping.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/src/FineMapping.cpp.o -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/src/Pipeline.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/src/Pipeline.cpp.o -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/src/PlateDetection.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/src/PlateDetection.cpp.o -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/src/PlateSegmentation.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/src/PlateSegmentation.cpp.o -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/src/Recognizer.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/hyperlpr.dir/src/main/jni/src/Recognizer.cpp.o -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/cmake_build_command.txt: -------------------------------------------------------------------------------- 1 | Executable : D:\DevelopSoftware\AndroidSDK\sdk\cmake\3.6.4111459\bin\cmake.exe 2 | arguments : 3 | -HC:\Users\lichen\Desktop\gitTest\app 4 | -BC:\Users\lichen\Desktop\gitTest\app\.externalNativeBuild\cmake\debug\armeabi-v7a 5 | -DANDROID_ABI=armeabi-v7a 6 | -DANDROID_PLATFORM=android-22 7 | -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\lichen\Desktop\gitTest\app\build\intermediates\cmake\debug\obj\armeabi-v7a 8 | -DCMAKE_BUILD_TYPE=Debug 9 | -DANDROID_NDK=D:\DevelopSoftware\AndroidSDK\sdk\ndk-bundle 10 | -DCMAKE_CXX_FLAGS=-std=c++11 11 | -DCMAKE_TOOLCHAIN_FILE=D:\DevelopSoftware\AndroidSDK\sdk\ndk-bundle\build\cmake\android.toolchain.cmake 12 | -DCMAKE_MAKE_PROGRAM=D:\DevelopSoftware\AndroidSDK\sdk\cmake\3.6.4111459\bin\ninja.exe 13 | -GAndroid Gradle - Ninja 14 | jvmArgs : 15 | 16 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/cmake_build_output.txt: -------------------------------------------------------------------------------- 1 | -- Check for working C compiler: D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe 2 | -- Check for working C compiler: D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works 3 | -- Detecting C compiler ABI info 4 | -- Detecting C compiler ABI info - done 5 | -- Detecting C compile features 6 | -- Detecting C compile features - done 7 | -- Check for working CXX compiler: D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe 8 | -- Check for working CXX compiler: D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works 9 | -- Detecting CXX compiler ABI info 10 | -- Detecting CXX compiler ABI info - done 11 | -- Detecting CXX compile features 12 | -- Detecting CXX compile features - done 13 | -- Found OpenCV: C:/Users/lichen/Desktop/opencv/opencv-3.3.1-android-sdk/OpenCV-android-sdk (found version "3.3.1") 14 | -- Configuring done 15 | -- Generating done 16 | -- Build files have been written to: C:/Users/lichen/Desktop/gitTest/app/.externalNativeBuild/cmake/debug/armeabi-v7a 17 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: C:/Users/lichen/Desktop/gitTest/app 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/Project") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "Debug") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "0") 33 | endif() 34 | 35 | if(CMAKE_INSTALL_COMPONENT) 36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 37 | else() 38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 39 | endif() 40 | 41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 42 | "${CMAKE_INSTALL_MANIFEST_FILES}") 43 | file(WRITE "C:/Users/lichen/Desktop/gitTest/app/.externalNativeBuild/cmake/debug/armeabi-v7a/${CMAKE_INSTALL_MANIFEST}" 44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 45 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/debug/armeabi-v7a/rules.ninja: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Ninja" Generator, CMake Version 3.6 3 | 4 | # This file contains all the rules used to get the outputs files 5 | # built from the input files. 6 | # It is included in the main 'build.ninja'. 7 | 8 | # ============================================================================= 9 | # Project: Project 10 | # Configuration: Debug 11 | # ============================================================================= 12 | # ============================================================================= 13 | 14 | ############################################# 15 | # Rule for running custom commands. 16 | 17 | rule CUSTOM_COMMAND 18 | command = $COMMAND 19 | description = $DESC 20 | 21 | 22 | ############################################# 23 | # Rule for compiling CXX files. 24 | 25 | rule CXX_COMPILER__hyperlpr 26 | depfile = $DEP_FILE 27 | deps = gcc 28 | command = D:\DevelopSoftware\AndroidSDK\sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi --gcc-toolchain=D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 --sysroot=D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/sysroot $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $IN_ABS 29 | description = Building CXX object $out 30 | 31 | 32 | ############################################# 33 | # Rule for linking CXX shared library. 34 | 35 | rule CXX_SHARED_LIBRARY_LINKER__hyperlpr 36 | command = cmd.exe /C "$PRE_LINK && D:\DevelopSoftware\AndroidSDK\sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi --gcc-toolchain=D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 --sysroot=D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/sysroot -fPIC $LANGUAGE_COMPILE_FLAGS $ARCH_FLAGS $LINK_FLAGS -shared $SONAME_FLAG$SONAME -o $TARGET_FILE @$RSP_FILE && $POST_BUILD" 37 | description = Linking CXX shared library $TARGET_FILE 38 | rspfile = $RSP_FILE 39 | rspfile_content = $in $LINK_PATH $LINK_LIBRARIES 40 | restat = $RESTAT 41 | 42 | 43 | ############################################# 44 | # Rule for re-running cmake. 45 | 46 | rule RERUN_CMAKE 47 | command = D:\DevelopSoftware\AndroidSDK\sdk\cmake\3.6.4111459\bin\cmake.exe -HC:\Users\lichen\Desktop\gitTest\app -BC:\Users\lichen\Desktop\gitTest\app\.externalNativeBuild\cmake\debug\armeabi-v7a 48 | description = Re-running CMake... 49 | generator = 1 50 | 51 | 52 | ############################################# 53 | # Rule for cleaning all built files. 54 | 55 | rule CLEAN 56 | command = D:\DevelopSoftware\AndroidSDK\sdk\cmake\3.6.4111459\bin\ninja.exe -t clean 57 | description = Cleaning all built files... 58 | 59 | 60 | ############################################# 61 | # Rule for printing all primary targets available. 62 | 63 | rule HELP 64 | command = D:\DevelopSoftware\AndroidSDK\sdk\cmake\3.6.4111459\bin\ninja.exe -t targets 65 | description = All primary targets available: 66 | 67 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/3.6.0-rc2/CMakeCCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER "D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe") 2 | set(CMAKE_C_COMPILER_ARG1 "") 3 | set(CMAKE_C_COMPILER_ID "Clang") 4 | set(CMAKE_C_COMPILER_VERSION "3.8") 5 | set(CMAKE_C_COMPILER_WRAPPER "") 6 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") 7 | set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert") 8 | set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes") 9 | set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros") 10 | set(CMAKE_C11_COMPILE_FEATURES "c_static_assert") 11 | 12 | set(CMAKE_C_PLATFORM_ID "") 13 | set(CMAKE_C_SIMULATE_ID "") 14 | set(CMAKE_C_SIMULATE_VERSION "") 15 | 16 | set(CMAKE_AR "D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ar.exe") 17 | set(CMAKE_RANLIB "D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ranlib.exe") 18 | set(CMAKE_LINKER "D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ld.exe") 19 | set(CMAKE_COMPILER_IS_GNUCC ) 20 | set(CMAKE_C_COMPILER_LOADED 1) 21 | set(CMAKE_C_COMPILER_WORKS TRUE) 22 | set(CMAKE_C_ABI_COMPILED TRUE) 23 | set(CMAKE_COMPILER_IS_MINGW ) 24 | set(CMAKE_COMPILER_IS_CYGWIN ) 25 | if(CMAKE_COMPILER_IS_CYGWIN) 26 | set(CYGWIN 1) 27 | set(UNIX 1) 28 | endif() 29 | 30 | set(CMAKE_C_COMPILER_ENV_VAR "CC") 31 | 32 | if(CMAKE_COMPILER_IS_MINGW) 33 | set(MINGW 1) 34 | endif() 35 | set(CMAKE_C_COMPILER_ID_RUN 1) 36 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) 37 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) 38 | set(CMAKE_C_LINKER_PREFERENCE 10) 39 | 40 | # Save compiler ABI information. 41 | set(CMAKE_C_SIZEOF_DATA_PTR "4") 42 | set(CMAKE_C_COMPILER_ABI "ELF") 43 | set(CMAKE_C_LIBRARY_ARCHITECTURE "") 44 | 45 | if(CMAKE_C_SIZEOF_DATA_PTR) 46 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") 47 | endif() 48 | 49 | if(CMAKE_C_COMPILER_ABI) 50 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") 51 | endif() 52 | 53 | if(CMAKE_C_LIBRARY_ARCHITECTURE) 54 | set(CMAKE_LIBRARY_ARCHITECTURE "") 55 | endif() 56 | 57 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") 58 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) 59 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") 60 | endif() 61 | 62 | 63 | 64 | 65 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "dl;c;dl") 66 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/lib64/clang/5.0.300080/lib/linux/arm;D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/armv7-a/thumb;D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/arm-linux-androideabi/lib/armv7-a/thumb;D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/platforms/android-22/arch-arm/usr/lib") 67 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 68 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/3.6.0-rc2/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/3.6.0-rc2/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Windows-10.0.15063") 2 | set(CMAKE_HOST_SYSTEM_NAME "Windows") 3 | set(CMAKE_HOST_SYSTEM_VERSION "10.0.15063") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64") 5 | 6 | include("D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/build/cmake/android.toolchain.cmake") 7 | 8 | set(CMAKE_SYSTEM "Android-22") 9 | set(CMAKE_SYSTEM_NAME "Android") 10 | set(CMAKE_SYSTEM_VERSION "22") 11 | set(CMAKE_SYSTEM_PROCESSOR "armv7-a") 12 | 13 | set(CMAKE_CROSSCOMPILING "TRUE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | C:/Users/lichen/Desktop/gitTest/app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/rebuild_cache.dir 2 | C:/Users/lichen/Desktop/gitTest/app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/hyperlpr.dir 3 | C:/Users/lichen/Desktop/gitTest/app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/edit_cache.dir 4 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/release/armeabi-v7a/CMakeFiles/feature_tests.c: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "C_FEATURE:" 4 | #if ((__clang_major__ * 100) + __clang_minor__) >= 304 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "c_function_prototypes\n" 10 | "C_FEATURE:" 11 | #if ((__clang_major__ * 100) + __clang_minor__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "c_restrict\n" 17 | "C_FEATURE:" 18 | #if ((__clang_major__ * 100) + __clang_minor__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "c_static_assert\n" 24 | "C_FEATURE:" 25 | #if ((__clang_major__ * 100) + __clang_minor__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "c_variadic_macros\n" 31 | 32 | }; 33 | 34 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 35 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/release/armeabi-v7a/cmake_build_command.txt: -------------------------------------------------------------------------------- 1 | Executable : D:\DevelopSoftware\AndroidSDK\sdk\cmake\3.6.4111459\bin\cmake.exe 2 | arguments : 3 | -HC:\Users\lichen\Desktop\gitTest\app 4 | -BC:\Users\lichen\Desktop\gitTest\app\.externalNativeBuild\cmake\release\armeabi-v7a 5 | -DANDROID_ABI=armeabi-v7a 6 | -DANDROID_PLATFORM=android-22 7 | -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\lichen\Desktop\gitTest\app\build\intermediates\cmake\release\obj\armeabi-v7a 8 | -DCMAKE_BUILD_TYPE=Release 9 | -DANDROID_NDK=D:\DevelopSoftware\AndroidSDK\sdk\ndk-bundle 10 | -DCMAKE_CXX_FLAGS=-std=c++11 11 | -DCMAKE_TOOLCHAIN_FILE=D:\DevelopSoftware\AndroidSDK\sdk\ndk-bundle\build\cmake\android.toolchain.cmake 12 | -DCMAKE_MAKE_PROGRAM=D:\DevelopSoftware\AndroidSDK\sdk\cmake\3.6.4111459\bin\ninja.exe 13 | -GAndroid Gradle - Ninja 14 | jvmArgs : 15 | 16 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/release/armeabi-v7a/cmake_build_output.txt: -------------------------------------------------------------------------------- 1 | -- Check for working C compiler: D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe 2 | -- Check for working C compiler: D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works 3 | -- Detecting C compiler ABI info 4 | -- Detecting C compiler ABI info - done 5 | -- Detecting C compile features 6 | -- Detecting C compile features - done 7 | -- Check for working CXX compiler: D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe 8 | -- Check for working CXX compiler: D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works 9 | -- Detecting CXX compiler ABI info 10 | -- Detecting CXX compiler ABI info - done 11 | -- Detecting CXX compile features 12 | -- Detecting CXX compile features - done 13 | -- Found OpenCV: C:/Users/lichen/Desktop/opencv/opencv-3.3.1-android-sdk/OpenCV-android-sdk (found version "3.3.1") 14 | -- Configuring done 15 | -- Generating done 16 | -- Build files have been written to: C:/Users/lichen/Desktop/gitTest/app/.externalNativeBuild/cmake/release/armeabi-v7a 17 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/release/armeabi-v7a/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: C:/Users/lichen/Desktop/gitTest/app 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/Project") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "Release") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "0") 33 | endif() 34 | 35 | if(CMAKE_INSTALL_COMPONENT) 36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 37 | else() 38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 39 | endif() 40 | 41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 42 | "${CMAKE_INSTALL_MANIFEST_FILES}") 43 | file(WRITE "C:/Users/lichen/Desktop/gitTest/app/.externalNativeBuild/cmake/release/armeabi-v7a/${CMAKE_INSTALL_MANIFEST}" 44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 45 | -------------------------------------------------------------------------------- /app/.externalNativeBuild/cmake/release/armeabi-v7a/rules.ninja: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Ninja" Generator, CMake Version 3.6 3 | 4 | # This file contains all the rules used to get the outputs files 5 | # built from the input files. 6 | # It is included in the main 'build.ninja'. 7 | 8 | # ============================================================================= 9 | # Project: Project 10 | # Configuration: Release 11 | # ============================================================================= 12 | # ============================================================================= 13 | 14 | ############################################# 15 | # Rule for running custom commands. 16 | 17 | rule CUSTOM_COMMAND 18 | command = $COMMAND 19 | description = $DESC 20 | 21 | 22 | ############################################# 23 | # Rule for compiling CXX files. 24 | 25 | rule CXX_COMPILER__hyperlpr 26 | depfile = $DEP_FILE 27 | deps = gcc 28 | command = D:\DevelopSoftware\AndroidSDK\sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi --gcc-toolchain=D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 --sysroot=D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/sysroot $DEFINES $INCLUDES $FLAGS -MD -MT $out -MF $DEP_FILE -o $out -c $IN_ABS 29 | description = Building CXX object $out 30 | 31 | 32 | ############################################# 33 | # Rule for linking CXX shared library. 34 | 35 | rule CXX_SHARED_LIBRARY_LINKER__hyperlpr 36 | command = cmd.exe /C "$PRE_LINK && D:\DevelopSoftware\AndroidSDK\sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi --gcc-toolchain=D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 --sysroot=D:/DevelopSoftware/AndroidSDK/sdk/ndk-bundle/sysroot -fPIC $LANGUAGE_COMPILE_FLAGS $ARCH_FLAGS $LINK_FLAGS -shared $SONAME_FLAG$SONAME -o $TARGET_FILE @$RSP_FILE && $POST_BUILD" 37 | description = Linking CXX shared library $TARGET_FILE 38 | rspfile = $RSP_FILE 39 | rspfile_content = $in $LINK_PATH $LINK_LIBRARIES 40 | restat = $RESTAT 41 | 42 | 43 | ############################################# 44 | # Rule for re-running cmake. 45 | 46 | rule RERUN_CMAKE 47 | command = D:\DevelopSoftware\AndroidSDK\sdk\cmake\3.6.4111459\bin\cmake.exe -HC:\Users\lichen\Desktop\gitTest\app -BC:\Users\lichen\Desktop\gitTest\app\.externalNativeBuild\cmake\release\armeabi-v7a 48 | description = Re-running CMake... 49 | generator = 1 50 | 51 | 52 | ############################################# 53 | # Rule for cleaning all built files. 54 | 55 | rule CLEAN 56 | command = D:\DevelopSoftware\AndroidSDK\sdk\cmake\3.6.4111459\bin\ninja.exe -t clean 57 | description = Cleaning all built files... 58 | 59 | 60 | ############################################# 61 | # Rule for printing all primary targets available. 62 | 63 | rule HELP 64 | command = D:\DevelopSoftware\AndroidSDK\sdk\cmake\3.6.4111459\bin\ninja.exe -t targets 65 | description = All primary targets available: 66 | 67 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Sets the minimum version of CMake required to build the native 2 | # library. You should either keep the default value or only pass a 3 | # value of 3.4.0 or lower. 4 | 5 | cmake_minimum_required(VERSION 3.4.1) 6 | 7 | # Creates and names a library, sets it as either STATIC 8 | # or SHARED, and provides the relative paths to its source code. 9 | # You can define multiple libraries, and CMake builds it for you. 10 | # Gradle automatically packages shared libraries with your APK. 11 | include_directories(src/main/jni/include) 12 | 13 | include_directories(src/main/jni) 14 | aux_source_directory(src/main/jni SOURCE_FILES) 15 | aux_source_directory(src/main/jni/src SOURCE_FILES_CORE) 16 | list(APPEND SOURCE_FILES ${SOURCE_FILES_CORE}) 17 | 18 | #修改修改为自己的opencv-android-sdk 的JNI路径 19 | set(OpenCV_DIR C:/Users/lichen/Desktop/opencv/opencv-3.3.1-android-sdk/OpenCV-android-sdk/sdk/native/jni) 20 | find_package(OpenCV REQUIRED) 21 | 22 | add_library( # Sets the name of the library. 23 | hyperlpr 24 | # Sets the library as a shared library. 25 | SHARED 26 | # Provides a relative path to your source file(s). 27 | # Associated headers in the same location as their source 28 | # file are automatically included. 29 | ${SOURCE_FILES}) 30 | 31 | # Searches for a specified prebuilt library and stores the path as a 32 | # variable. Because system libraries are included in the search path by 33 | # default, you only need to specify the name of the public NDK library 34 | # you want to add. CMake verifies that the library exists before 35 | # completing its build. 36 | 37 | find_library( # Sets the name of the path variable. 38 | log-lib 39 | 40 | # Specifies the name of the NDK library that 41 | # you want CMake to locate. 42 | log ) 43 | 44 | # Specifies libraries CMake should link to your target library. You 45 | # can link multiple libraries, such as libraries you define in the 46 | # build script, prebuilt third-party libraries, or system libraries. 47 | 48 | target_link_libraries( # Specifies the target library. 49 | hyperlpr 50 | ${OpenCV_LIBS} 51 | # Links the target library to the log library 52 | # included in the NDK. 53 | ${log-lib} ) 54 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "26.0.2" 6 | defaultConfig { 7 | applicationId "pr.hyperlpr" 8 | minSdkVersion 22 9 | targetSdkVersion 23 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | ndk{ 14 | abiFilters 'armeabi-v7a' 15 | } 16 | externalNativeBuild { 17 | cmake { 18 | cppFlags "-std=c++11" 19 | } 20 | } 21 | } 22 | buildTypes { 23 | release { 24 | minifyEnabled false 25 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 26 | } 27 | } 28 | 29 | externalNativeBuild { 30 | cmake { 31 | path "CMakeLists.txt" 32 | } 33 | } 34 | } 35 | 36 | dependencies { 37 | compile fileTree(include: ['*.jar'], dir: 'libs') 38 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 39 | exclude group: 'com.android.support', module: 'support-annotations' 40 | }) 41 | 42 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 43 | compile 'com.android.support:appcompat-v7:23.4.0' 44 | testCompile 'junit:junit:4.12' 45 | implementation project(':openCVLibrary330') 46 | } 47 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/release/hyperlpr.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/release/hyperlpr.apk -------------------------------------------------------------------------------- /app/release/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1},"path":"app-release.apk","properties":{"packageId":"pr.hyperlpr","split":"","minSdkVersion":"22"}}] -------------------------------------------------------------------------------- /app/src/androidTest/java/pr/hyperlpr/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package pr.hyperlpr; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("pr.hyperlpr", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 23 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/assets/hyperlpr/CharacterRecognization.caffemodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/assets/hyperlpr/CharacterRecognization.caffemodel -------------------------------------------------------------------------------- /app/src/main/assets/hyperlpr/CharacterRecognization.prototxt: -------------------------------------------------------------------------------- 1 | input: "data" 2 | input_dim: 1 3 | input_dim: 1 4 | input_dim: 30 5 | input_dim: 14 6 | layer { 7 | name: "conv2d_1" 8 | type: "Convolution" 9 | bottom: "data" 10 | top: "conv2d_1" 11 | convolution_param { 12 | num_output: 32 13 | bias_term: true 14 | pad: 0 15 | kernel_size: 3 16 | stride: 1 17 | } 18 | } 19 | layer { 20 | name: "activation_1" 21 | type: "ReLU" 22 | bottom: "conv2d_1" 23 | top: "activation_1" 24 | } 25 | layer { 26 | name: "max_pooling2d_1" 27 | type: "Pooling" 28 | bottom: "activation_1" 29 | top: "max_pooling2d_1" 30 | pooling_param { 31 | pool: MAX 32 | kernel_size: 2 33 | stride: 2 34 | pad: 0 35 | } 36 | } 37 | layer { 38 | name: "conv2d_2" 39 | type: "Convolution" 40 | bottom: "max_pooling2d_1" 41 | top: "conv2d_2" 42 | convolution_param { 43 | num_output: 64 44 | bias_term: true 45 | pad: 0 46 | kernel_size: 3 47 | stride: 1 48 | } 49 | } 50 | layer { 51 | name: "activation_2" 52 | type: "ReLU" 53 | bottom: "conv2d_2" 54 | top: "activation_2" 55 | } 56 | layer { 57 | name: "max_pooling2d_2" 58 | type: "Pooling" 59 | bottom: "activation_2" 60 | top: "max_pooling2d_2" 61 | pooling_param { 62 | pool: MAX 63 | kernel_size: 2 64 | stride: 2 65 | pad: 0 66 | } 67 | } 68 | layer { 69 | name: "conv2d_3" 70 | type: "Convolution" 71 | bottom: "max_pooling2d_2" 72 | top: "conv2d_3" 73 | convolution_param { 74 | num_output: 128 75 | bias_term: true 76 | pad: 0 77 | kernel_size: 2 78 | stride: 1 79 | } 80 | } 81 | layer { 82 | name: "activation_3" 83 | type: "ReLU" 84 | bottom: "conv2d_3" 85 | top: "activation_3" 86 | } 87 | layer { 88 | name: "flatten_1" 89 | type: "Flatten" 90 | bottom: "activation_3" 91 | top: "flatten_1" 92 | } 93 | layer { 94 | name: "dense_1" 95 | type: "InnerProduct" 96 | bottom: "flatten_1" 97 | top: "dense_1" 98 | inner_product_param { 99 | num_output: 256 100 | } 101 | } 102 | layer { 103 | name: "relu2" 104 | type: "ReLU" 105 | bottom: "dense_1" 106 | top: "relu2" 107 | } 108 | layer { 109 | name: "dense2" 110 | type: "InnerProduct" 111 | bottom: "relu2" 112 | top: "dense2" 113 | inner_product_param { 114 | num_output: 65 115 | } 116 | } 117 | 118 | layer { 119 | name: "prob" 120 | type: "Softmax" 121 | bottom: "dense2" 122 | top: "prob" 123 | } -------------------------------------------------------------------------------- /app/src/main/assets/hyperlpr/HorizonalFinemapping.caffemodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/assets/hyperlpr/HorizonalFinemapping.caffemodel -------------------------------------------------------------------------------- /app/src/main/assets/hyperlpr/HorizonalFinemapping.prototxt: -------------------------------------------------------------------------------- 1 | input: "data" 2 | input_dim: 1 3 | input_dim: 3 4 | input_dim: 16 5 | input_dim: 66 6 | layer { 7 | name: "conv1" 8 | type: "Convolution" 9 | bottom: "data" 10 | top: "conv1" 11 | convolution_param { 12 | num_output: 10 13 | bias_term: true 14 | pad: 0 15 | kernel_size: 3 16 | stride: 1 17 | } 18 | } 19 | layer { 20 | name: "relu1" 21 | type: "ReLU" 22 | bottom: "conv1" 23 | top: "conv1" 24 | } 25 | layer { 26 | name: "max_pooling2d_3" 27 | type: "Pooling" 28 | bottom: "conv1" 29 | top: "max_pooling2d_3" 30 | pooling_param { 31 | pool: MAX 32 | kernel_size: 2 33 | stride: 2 34 | pad: 0 35 | } 36 | } 37 | layer { 38 | name: "conv2" 39 | type: "Convolution" 40 | bottom: "max_pooling2d_3" 41 | top: "conv2" 42 | convolution_param { 43 | num_output: 16 44 | bias_term: true 45 | pad: 0 46 | kernel_size: 3 47 | stride: 1 48 | } 49 | } 50 | layer { 51 | name: "relu2" 52 | type: "ReLU" 53 | bottom: "conv2" 54 | top: "conv2" 55 | } 56 | layer { 57 | name: "conv3" 58 | type: "Convolution" 59 | bottom: "conv2" 60 | top: "conv3" 61 | convolution_param { 62 | num_output: 32 63 | bias_term: true 64 | pad: 0 65 | kernel_size: 3 66 | stride: 1 67 | } 68 | } 69 | layer { 70 | name: "relu3" 71 | type: "ReLU" 72 | bottom: "conv3" 73 | top: "conv3" 74 | } 75 | layer { 76 | name: "flatten_2" 77 | type: "Flatten" 78 | bottom: "conv3" 79 | top: "flatten_2" 80 | } 81 | layer { 82 | name: "dense" 83 | type: "InnerProduct" 84 | bottom: "flatten_2" 85 | top: "dense" 86 | inner_product_param { 87 | num_output: 2 88 | } 89 | } 90 | layer { 91 | name: "relu4" 92 | type: "ReLU" 93 | bottom: "dense" 94 | top: "dense" 95 | } 96 | -------------------------------------------------------------------------------- /app/src/main/assets/hyperlpr/Segmentation.caffemodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/assets/hyperlpr/Segmentation.caffemodel -------------------------------------------------------------------------------- /app/src/main/assets/hyperlpr/Segmentation.prototxt: -------------------------------------------------------------------------------- 1 | input: "data" 2 | input_dim: 1 3 | input_dim: 1 4 | input_dim: 22 5 | input_dim: 22 6 | layer { 7 | name: "conv2d_12" 8 | type: "Convolution" 9 | bottom: "data" 10 | top: "conv2d_12" 11 | convolution_param { 12 | num_output: 16 13 | bias_term: true 14 | pad: 0 15 | kernel_size: 3 16 | stride: 1 17 | } 18 | } 19 | layer { 20 | name: "activation_18" 21 | type: "ReLU" 22 | bottom: "conv2d_12" 23 | top: "activation_18" 24 | } 25 | layer { 26 | name: "max_pooling2d_10" 27 | type: "Pooling" 28 | bottom: "activation_18" 29 | top: "max_pooling2d_10" 30 | pooling_param { 31 | pool: MAX 32 | kernel_size: 2 33 | stride: 2 34 | pad: 0 35 | } 36 | } 37 | layer { 38 | name: "conv2d_13" 39 | type: "Convolution" 40 | bottom: "max_pooling2d_10" 41 | top: "conv2d_13" 42 | convolution_param { 43 | num_output: 16 44 | bias_term: true 45 | pad: 0 46 | kernel_size: 3 47 | stride: 1 48 | } 49 | } 50 | layer { 51 | name: "activation_19" 52 | type: "ReLU" 53 | bottom: "conv2d_13" 54 | top: "activation_19" 55 | } 56 | layer { 57 | name: "max_pooling2d_11" 58 | type: "Pooling" 59 | bottom: "activation_19" 60 | top: "max_pooling2d_11" 61 | pooling_param { 62 | pool: MAX 63 | kernel_size: 2 64 | stride: 2 65 | pad: 0 66 | } 67 | } 68 | layer { 69 | name: "flatten_6" 70 | type: "Flatten" 71 | bottom: "max_pooling2d_11" 72 | top: "flatten_6" 73 | } 74 | layer { 75 | name: "dense_9" 76 | type: "InnerProduct" 77 | bottom: "flatten_6" 78 | top: "dense_9" 79 | inner_product_param { 80 | num_output: 256 81 | } 82 | } 83 | layer { 84 | name: "dropout_9" 85 | type: "Dropout" 86 | bottom: "dense_9" 87 | top: "dropout_9" 88 | dropout_param { 89 | dropout_ratio: 0.5 90 | } 91 | } 92 | layer { 93 | name: "activation_20" 94 | type: "ReLU" 95 | bottom: "dropout_9" 96 | top: "activation_20" 97 | } 98 | layer { 99 | name: "dense_10" 100 | type: "InnerProduct" 101 | bottom: "activation_20" 102 | top: "dense_10" 103 | inner_product_param { 104 | num_output: 3 105 | } 106 | } 107 | 108 | 109 | layer { 110 | name: "prob" 111 | type: "Softmax" 112 | bottom: "dense_10" 113 | top: "prob" 114 | } -------------------------------------------------------------------------------- /app/src/main/assets/hyperlpr/demo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/assets/hyperlpr/demo.jpg -------------------------------------------------------------------------------- /app/src/main/java/pr/hyperlpr/Globals.java: -------------------------------------------------------------------------------- 1 | package pr.hyperlpr; 2 | 3 | import android.os.Environment; 4 | 5 | import java.io.File; 6 | import java.util.HashMap; 7 | import java.util.Map; 8 | 9 | 10 | public class Globals { 11 | 12 | public static final String ApplicationDir = "hyperlpr"; 13 | public static final String cascade_filename = "cascade.xml"; 14 | public static final String finemapping_prototxt = "HorizonalFinemapping.prototxt"; 15 | public static final String finemapping_caffemodel = "HorizonalFinemapping.caffemodel"; 16 | public static final String segmentation_prototxt = "Segmentation.prototxt"; 17 | public static final String segmentation_caffemodel = "Segmentation.caffemodel"; 18 | public static final String character_prototxt = "CharacterRecognization.prototxt"; 19 | public static final String character_caffemodel= "CharacterRecognization.caffemodel"; 20 | 21 | public static final String SDCARD_DIR = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + Globals.ApplicationDir; //解压文件存放位置 22 | 23 | 24 | //key: 解析结果 value: 对应的文件. 25 | public static Map successMap = new HashMap<>(); 26 | public static Map errorMap = new HashMap<>(); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/pr/hyperlpr/ResultActivity.java: -------------------------------------------------------------------------------- 1 | package pr.hyperlpr; 2 | 3 | import android.content.Intent; 4 | import android.graphics.Bitmap; 5 | import android.graphics.BitmapFactory; 6 | import android.net.Uri; 7 | import android.os.Bundle; 8 | import android.support.annotation.Nullable; 9 | import android.support.v7.app.AppCompatActivity; 10 | import android.widget.ImageView; 11 | import android.widget.TextView; 12 | 13 | import java.io.FileNotFoundException; 14 | import java.io.InputStream; 15 | 16 | 17 | public class ResultActivity extends AppCompatActivity { 18 | private TextView completeButton; 19 | private Bitmap mSourceBitmap; 20 | private ImageView secondImageView; 21 | private TextView secondTextView; 22 | private Uri sourceImagePath; 23 | 24 | 25 | 26 | @Override 27 | protected void onCreate(@Nullable Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | setContentView(R.layout.activity_result); 30 | 31 | initView(); 32 | } 33 | 34 | public void initView() { 35 | ImageView firstImageView = (ImageView) findViewById(R.id.first_face_image); 36 | secondImageView = (ImageView) findViewById(R.id.second_face_image); 37 | secondTextView = (TextView) findViewById(R.id.score); 38 | completeButton = (TextView) findViewById(R.id.complete); 39 | 40 | float faceFloat = 0; 41 | Intent intent = getIntent(); 42 | faceFloat = intent.getFloatExtra("score",0.0f); 43 | sourceImagePath = intent.getParcelableExtra("sourceBitmap"); 44 | InputStream imageStream = null; 45 | try { 46 | imageStream = getContentResolver().openInputStream(sourceImagePath); 47 | mSourceBitmap = BitmapFactory.decodeStream(imageStream); 48 | } catch (FileNotFoundException e) { 49 | e.printStackTrace(); 50 | } 51 | 52 | if (mSourceBitmap != null && !mSourceBitmap.isRecycled()){ 53 | firstImageView.setImageBitmap(mSourceBitmap); 54 | } 55 | secondTextView.setText(String.valueOf(faceFloat)); 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/pr/hyperlpr/task/ImageBean.java: -------------------------------------------------------------------------------- 1 | package pr.hyperlpr.task; 2 | 3 | public class ImageBean { 4 | public long totalTime;//耗时 5 | public int imageSize; // 图片打小 6 | public String imagePath; 7 | public String resultString; 8 | 9 | @Override 10 | public String toString() { 11 | return "ImageBean{" + 12 | "totalTime=" + totalTime + 13 | ", imageSize=" + imageSize + 14 | ", imagePath='" + imagePath + '\'' + 15 | ", resultString='" + resultString + '\'' + 16 | '}'; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/java/pr/hyperlpr/task/ProcessImageTask.java: -------------------------------------------------------------------------------- 1 | package pr.hyperlpr.task; 2 | 3 | import android.graphics.Bitmap; 4 | import android.graphics.BitmapFactory; 5 | import android.text.TextUtils; 6 | import android.util.Log; 7 | 8 | import org.opencv.android.OpenCVLoader; 9 | import org.opencv.android.Utils; 10 | import org.opencv.core.CvType; 11 | import org.opencv.core.Mat; 12 | import org.opencv.core.Size; 13 | import org.opencv.imgproc.Imgproc; 14 | 15 | import java.io.File; 16 | 17 | import pr.hyperlpr.task.callback.ProgramImageCallback; 18 | import pr.hyperlpr.util.DeepCarUtil; 19 | 20 | public class ProcessImageTask implements Runnable { 21 | 22 | private static final String TAG = ProcessImageTask.class.getSimpleName(); 23 | private String imagePath; 24 | private String imageShortPath; 25 | private long startTime; 26 | 27 | 28 | private ProgramImageCallback mListener; 29 | private long handle; 30 | 31 | public ProcessImageTask(String imagePath, ProgramImageCallback listener, long handle){ 32 | this.mListener = listener; 33 | this.imagePath = imagePath; 34 | this.handle = handle; 35 | } 36 | 37 | @Override 38 | public void run() { 39 | startTime = System.currentTimeMillis(); 40 | ImageBean imageBean = new ImageBean(); 41 | String[] paths = imagePath.split(File.separator); 42 | imageShortPath = paths[paths.length -1]; 43 | 44 | imageBean.imagePath = imagePath; 45 | final Bitmap image = BitmapFactory.decodeFile(imagePath); 46 | if (image == null){ 47 | if (mListener != null){ 48 | imageBean.totalTime = System.currentTimeMillis() - startTime; 49 | mListener.onProcessImageComplete(true, imageBean); 50 | } 51 | return; 52 | } 53 | 54 | imageBean.imageSize = image.getByteCount(); 55 | int width = image.getWidth(); 56 | int height = image.getHeight(); 57 | Mat m = new Mat(width, height, CvType.CV_8UC4); 58 | Utils.bitmapToMat(image, m); 59 | if(width > 1000 || height > 1000){ 60 | Size sz = new Size(600,800); 61 | Imgproc.resize(m,m,sz); 62 | } 63 | try { 64 | OpenCVLoader.initDebug(); 65 | String result = DeepCarUtil.SimpleRecognization(m.getNativeObjAddr(), handle); 66 | if (mListener != null) { 67 | imageBean.resultString = result; 68 | Log.i(TAG, "source path ---> " + imageShortPath); 69 | imageBean.totalTime = System.currentTimeMillis() - startTime; 70 | if (!TextUtils.isEmpty(result) && imageShortPath.contains(result)) { 71 | mListener.onProcessImageComplete(false, imageBean); 72 | } else { 73 | mListener.onProcessImageComplete(true, imageBean); 74 | } 75 | } 76 | } catch (Exception e) { 77 | e.printStackTrace(); 78 | Log.d(TAG, "exception occured!"); 79 | if (mListener != null){ 80 | imageBean.totalTime = System.currentTimeMillis() - startTime; 81 | mListener.onProcessImageComplete(true,imageBean); 82 | } 83 | } 84 | } 85 | 86 | } 87 | -------------------------------------------------------------------------------- /app/src/main/java/pr/hyperlpr/task/callback/ProcessStateCallback.java: -------------------------------------------------------------------------------- 1 | package pr.hyperlpr.task.callback; 2 | 3 | /** 4 | * 抽象为进度, 可以使用在加载文件和 数据库数据. 5 | */ 6 | public interface ProcessStateCallback { 7 | void OnCancelProgram(); 8 | 9 | void OnProgram(int currentCount, int totalCount, int errorCount); 10 | 11 | void OnProgramComplete(); 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/pr/hyperlpr/task/callback/ProgramImageCallback.java: -------------------------------------------------------------------------------- 1 | package pr.hyperlpr.task.callback; 2 | 3 | import pr.hyperlpr.task.ImageBean; 4 | 5 | public interface ProgramImageCallback { 6 | 7 | void onProcessImageComplete(boolean isError, ImageBean imageBean); 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/java/pr/hyperlpr/util/DeepCarUtil.java: -------------------------------------------------------------------------------- 1 | package pr.hyperlpr.util; 2 | 3 | //caffe 初始化信息的配置 信息 4 | public class DeepCarUtil { 5 | 6 | //提供初始化 识别的 JNI 接口 7 | public static native long InitPlateRecognizer(String casacde_detection, 8 | String finemapping_prototxt, String finemapping_caffemodel, 9 | String segmentation_prototxt, String segmentation_caffemodel, 10 | String charRecognization_proto, String charRecognization_caffemodel); 11 | //简单识别接口 12 | public static native String SimpleRecognization(long inputMat, long object); 13 | public static native long ReleasePlateRecognizer(long object); 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/java/pr/hyperlpr/util/Utils.java: -------------------------------------------------------------------------------- 1 | package pr.hyperlpr.util; 2 | 3 | import android.content.Context; 4 | 5 | import java.io.File; 6 | import java.io.IOException; 7 | 8 | public class Utils { 9 | 10 | 11 | public static File getOrCreateExternalModelsRootDirectory(Context context) throws IOException { 12 | //获取外部文件夹路径, 通过 model, 13 | final File faceLockRoot = context.getExternalFilesDir("faceLock"); 14 | 15 | if (faceLockRoot == null) { 16 | throw new IOException("Unable to access application external storage."); 17 | } 18 | 19 | if (!faceLockRoot.isDirectory() && !faceLockRoot.mkdir()) { 20 | throw new IOException("Unable to create model root directory: " + 21 | faceLockRoot.getAbsolutePath()); 22 | } 23 | return faceLockRoot; 24 | } 25 | 26 | private static String getFileExtension(final String filePath) { 27 | int lastPoi = filePath.lastIndexOf('.'); 28 | int lastSep = filePath.lastIndexOf(File.separator); 29 | if (lastPoi == -1 || lastSep >= lastPoi) return ""; 30 | return filePath.substring(lastPoi + 1); 31 | } 32 | 33 | public static boolean checkFileExtension(File filePath){ 34 | String imageSuffix = getFileExtension(filePath.getAbsolutePath()).toLowerCase(); 35 | return "jpg".equals(imageSuffix) || "jpeg".equals(imageSuffix) || "png".equals(imageSuffix); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/pr/hyperlpr/view/OnProgressBarListener.java: -------------------------------------------------------------------------------- 1 | package pr.hyperlpr.view; 2 | 3 | public interface OnProgressBarListener { 4 | void onProgressChange(int current, int max); 5 | } -------------------------------------------------------------------------------- /app/src/main/jni/include/CNNRecognizer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by 庾金科 on 21/10/2017. 3 | // 4 | 5 | #ifndef SWIFTPR_CNNRECOGNIZER_H 6 | #define SWIFTPR_CNNRECOGNIZER_H 7 | 8 | #include "Recognizer.h" 9 | namespace pr{ 10 | class CNNRecognizer: public GeneralRecognizer{ 11 | public: 12 | const int CHAR_INPUT_W = 14; 13 | const int CHAR_INPUT_H = 30; 14 | 15 | CNNRecognizer(std::string prototxt,std::string caffemodel); 16 | label recognizeCharacter(cv::Mat character); 17 | private: 18 | cv::dnn::Net net; 19 | 20 | }; 21 | 22 | } 23 | 24 | #endif //SWIFTPR_CNNRECOGNIZER_H 25 | -------------------------------------------------------------------------------- /app/src/main/jni/include/FastDeskew.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by 庾金科 on 22/09/2017. 3 | // 4 | 5 | #ifndef SWIFTPR_FASTDESKEW_H 6 | #define SWIFTPR_FASTDESKEW_H 7 | 8 | #include 9 | #include 10 | namespace pr{ 11 | 12 | cv::Mat fastdeskew(cv::Mat skewImage,int blockSize); 13 | // cv::Mat spatialTransformer(cv::Mat skewImage); 14 | 15 | }//namepace pr 16 | 17 | 18 | #endif //SWIFTPR_FASTDESKEW_H 19 | -------------------------------------------------------------------------------- /app/src/main/jni/include/FineMapping.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by 庾金科 on 22/09/2017. 3 | // 4 | 5 | #ifndef SWIFTPR_FINEMAPPING_H 6 | #define SWIFTPR_FINEMAPPING_H 7 | 8 | #include 9 | #include 10 | 11 | #include 12 | namespace pr{ 13 | class FineMapping{ 14 | public: 15 | FineMapping(); 16 | 17 | 18 | FineMapping(std::string prototxt,std::string caffemodel); 19 | static cv::Mat FineMappingVertical(cv::Mat InputProposal,int sliceNum=15,int upper=0,int lower=-50,int windows_size=17); 20 | cv::Mat FineMappingHorizon(cv::Mat FinedVertical,int leftPadding,int rightPadding); 21 | 22 | 23 | private: 24 | cv::dnn::Net net; 25 | 26 | }; 27 | 28 | 29 | 30 | 31 | } 32 | #endif //SWIFTPR_FINEMAPPING_H 33 | -------------------------------------------------------------------------------- /app/src/main/jni/include/Pipeline.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by 庾金科 on 22/10/2017. 3 | // 4 | 5 | #ifndef SWIFTPR_PIPLINE_H 6 | #define SWIFTPR_PIPLINE_H 7 | 8 | #include "PlateDetection.h" 9 | #include "PlateSegmentation.h" 10 | #include "CNNRecognizer.h" 11 | #include "PlateInfo.h" 12 | #include "FastDeskew.h" 13 | #include "FineMapping.h" 14 | #include "Recognizer.h" 15 | 16 | namespace pr{ 17 | class PipelinePR{ 18 | public: 19 | GeneralRecognizer *generalRecognizer; 20 | PlateDetection *plateDetection; 21 | PlateSegmentation *plateSegmentation; 22 | FineMapping *fineMapping; 23 | PipelinePR(std::string detector_filename, 24 | std::string finemapping_prototxt,std::string finemapping_caffemodel, 25 | std::string segmentation_prototxt,std::string segmentation_caffemodel, 26 | std::string charRecognization_proto,std::string charRecognization_caffemodel 27 | ); 28 | ~PipelinePR(); 29 | 30 | 31 | 32 | std::vector plateRes; 33 | std::vector RunPiplineAsImage(cv::Mat plateImage); 34 | }; 35 | 36 | 37 | } 38 | #endif //SWIFTPR_PIPLINE_H 39 | -------------------------------------------------------------------------------- /app/src/main/jni/include/PlateDetection.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by 庾金科 on 20/09/2017. 3 | // 4 | 5 | #ifndef SWIFTPR_PLATEDETECTION_H 6 | #define SWIFTPR_PLATEDETECTION_H 7 | 8 | #include 9 | #include 10 | #include 11 | namespace pr{ 12 | class PlateDetection{ 13 | public: 14 | PlateDetection(std::string filename_cascade); 15 | PlateDetection(); 16 | void LoadModel(std::string filename_cascade); 17 | void plateDetectionRough(cv::Mat InputImage,std::vector &plateInfos,int min_w=36,int max_w=800); 18 | // std::vector plateDetectionRough(cv::Mat InputImage,int min_w= 60,int max_h = 400); 19 | // std::vector plateDetectionRoughByMultiScaleEdge(cv::Mat InputImage); 20 | private: 21 | cv::CascadeClassifier cascade; 22 | 23 | 24 | }; 25 | 26 | }// namespace pr 27 | 28 | #endif //SWIFTPR_PLATEDETECTION_H 29 | -------------------------------------------------------------------------------- /app/src/main/jni/include/PlateSegmentation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by 庾金科 on 16/10/2017. 3 | // 4 | 5 | #ifndef SWIFTPR_PLATESEGMENTATION_H 6 | #define SWIFTPR_PLATESEGMENTATION_H 7 | 8 | #include "opencv2/opencv.hpp" 9 | #include 10 | #include "PlateInfo.h" 11 | 12 | namespace pr{ 13 | 14 | 15 | class PlateSegmentation{ 16 | public: 17 | const int PLATE_NORMAL = 6; 18 | const int PLATE_NORMAL_GREEN = 7; 19 | const int DEFAULT_WIDTH = 20; 20 | PlateSegmentation(std::string phototxt,std::string caffemodel); 21 | PlateSegmentation(){} 22 | void segmentPlatePipline(PlateInfo &plateInfo,int stride,std::vector &Char_rects); 23 | 24 | void segmentPlateBySlidingWindows(cv::Mat &plateImage,int windowsWidth,int stride,cv::Mat &respones); 25 | void templateMatchFinding(const cv::Mat &respones,int windowsWidth,std::pair> &candidatePts); 26 | void refineRegion(cv::Mat &plateImage,const std::vector &candidatePts,const int padding,std::vector &rects); 27 | void ExtractRegions(PlateInfo &plateInfo,std::vector &rects); 28 | cv::Mat classifyResponse(const cv::Mat &cropped); 29 | private: 30 | cv::dnn::Net net; 31 | 32 | 33 | // RefineRegion() 34 | 35 | }; 36 | 37 | }//namespace pr 38 | 39 | #endif //SWIFTPR_PLATESEGMENTATION_H 40 | -------------------------------------------------------------------------------- /app/src/main/jni/include/Recognizer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by 庾金科 on 20/10/2017. 3 | // 4 | 5 | 6 | #ifndef SWIFTPR_RECOGNIZER_H 7 | #define SWIFTPR_RECOGNIZER_H 8 | 9 | #include "PlateInfo.h" 10 | #include "opencv2/dnn.hpp" 11 | namespace pr{ 12 | typedef cv::Mat label; 13 | class GeneralRecognizer{ 14 | public: 15 | virtual label recognizeCharacter(cv::Mat character) = 0; 16 | void SegmentBasedSequenceRecognition(PlateInfo &plateinfo); 17 | 18 | }; 19 | 20 | } 21 | #endif //SWIFTPR_RECOGNIZER_H 22 | -------------------------------------------------------------------------------- /app/src/main/jni/src/CNNRecognizer.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by 庾金科 on 21/10/2017. 3 | // 4 | 5 | #include "../include/CNNRecognizer.h" 6 | 7 | namespace pr{ 8 | CNNRecognizer::CNNRecognizer(std::string prototxt,std::string caffemodel){ 9 | net = cv::dnn::readNetFromCaffe(prototxt, caffemodel); 10 | } 11 | 12 | label CNNRecognizer::recognizeCharacter(cv::Mat charImage){ 13 | if(charImage.channels()== 3) 14 | cv::cvtColor(charImage,charImage,cv::COLOR_BGR2GRAY); 15 | cv::Mat inputBlob = cv::dnn::blobFromImage(charImage, 1/255.0, cv::Size(CHAR_INPUT_W,CHAR_INPUT_H), cv::Scalar(0,0,0),false); 16 | net.setInput(inputBlob,"data"); 17 | return net.forward(); 18 | } 19 | } -------------------------------------------------------------------------------- /app/src/main/jni/src/Pipeline.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by 庾金科 on 23/10/2017. 3 | // 4 | 5 | #include "../include/Pipeline.h" 6 | 7 | namespace pr { 8 | 9 | std::vector chars_code{"京","沪","津","渝","冀","晋","蒙","辽","吉","黑","苏","浙","皖","闽","赣","鲁","豫","鄂","湘","粤","桂","琼","川","贵","云","藏","陕","甘","青","宁","新","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","J","K","L","M","N","P","Q","R","S","T","U","V","W","X","Y","Z"}; 10 | 11 | PipelinePR::PipelinePR(std::string detector_filename, 12 | std::string finemapping_prototxt, std::string finemapping_caffemodel, 13 | std::string segmentation_prototxt, std::string segmentation_caffemodel, 14 | std::string charRecognization_proto, std::string charRecognization_caffemodel) { 15 | plateDetection = new PlateDetection(detector_filename); 16 | fineMapping = new FineMapping(finemapping_prototxt, finemapping_caffemodel); 17 | plateSegmentation = new PlateSegmentation(segmentation_prototxt, segmentation_caffemodel); 18 | generalRecognizer = new CNNRecognizer(charRecognization_proto, charRecognization_caffemodel); 19 | } 20 | 21 | PipelinePR::~PipelinePR() { 22 | delete plateDetection; 23 | delete fineMapping; 24 | delete plateSegmentation; 25 | delete generalRecognizer; 26 | } 27 | 28 | std::vector PipelinePR:: RunPiplineAsImage(cv::Mat plateImage) { 29 | std::vector results; 30 | std::vector plates; 31 | plateDetection->plateDetectionRough(plateImage,plates); 32 | 33 | for (pr::PlateInfo plateinfo:plates) { 34 | 35 | cv::Mat image_finemapping = plateinfo.getPlateImage(); 36 | 37 | image_finemapping = fineMapping->FineMappingVertical(image_finemapping); 38 | 39 | image_finemapping = pr::fastdeskew(image_finemapping, 5); 40 | 41 | image_finemapping = fineMapping->FineMappingHorizon(image_finemapping, 2, 5); 42 | 43 | cv::resize(image_finemapping, image_finemapping, cv::Size(136, 36)); 44 | plateinfo.setPlateImage(image_finemapping); 45 | std::vector rects; 46 | plateSegmentation->segmentPlatePipline(plateinfo, 1, rects); 47 | plateSegmentation->ExtractRegions(plateinfo, rects); 48 | 49 | cv::copyMakeBorder(image_finemapping, image_finemapping, 0, 0, 0, 20, cv::BORDER_REPLICATE); 50 | 51 | plateinfo.setPlateImage(image_finemapping); 52 | generalRecognizer->SegmentBasedSequenceRecognition(plateinfo); 53 | plateinfo.decodePlateNormal(chars_code); 54 | results.push_back(plateinfo); 55 | std::cout << plateinfo.getPlateName() << std::endl; 56 | 57 | 58 | } 59 | 60 | // for (auto str:results) { 61 | // std::cout << str << std::endl; 62 | // } 63 | return results; 64 | 65 | }//namespace pr 66 | 67 | 68 | 69 | } -------------------------------------------------------------------------------- /app/src/main/jni/src/PlateDetection.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by 庾金科 on 20/09/2017. 3 | // 4 | #include "../include/PlateDetection.h" 5 | 6 | #include "util.h" 7 | 8 | namespace pr{ 9 | 10 | 11 | PlateDetection::PlateDetection(std::string filename_cascade){ 12 | cascade.load(filename_cascade); 13 | 14 | }; 15 | 16 | 17 | void PlateDetection::plateDetectionRough(cv::Mat InputImage,std::vector &plateInfos,int min_w,int max_w){ 18 | 19 | cv::Mat processImage; 20 | 21 | cv::cvtColor(InputImage,processImage,cv::COLOR_BGR2GRAY); 22 | 23 | 24 | std::vector platesRegions; 25 | // std::vector plates; 26 | cv::Size minSize(min_w,min_w/4); 27 | cv::Size maxSize(max_w,max_w/4); 28 | // cv::imshow("input",InputImage); 29 | // cv::waitKey(0); 30 | cascade.detectMultiScale( processImage, platesRegions, 31 | 1.1, 3, cv::CASCADE_SCALE_IMAGE,minSize,maxSize); 32 | for(auto plate:platesRegions) 33 | { 34 | // extend rects 35 | // x -= w * 0.14 36 | // w += w * 0.28 37 | // y -= h * 0.6 38 | // h += h * 1.1; 39 | int zeroadd_w = static_cast(plate.width*0.28); 40 | int zeroadd_h = static_cast(plate.height*1.2); 41 | int zeroadd_x = static_cast(plate.width*0.14); 42 | int zeroadd_y = static_cast(plate.height*0.6); 43 | plate.x-=zeroadd_x; 44 | plate.y-=zeroadd_y; 45 | plate.height += zeroadd_h; 46 | plate.width += zeroadd_w; 47 | cv::Mat plateImage = util::cropFromImage(InputImage,plate); 48 | PlateInfo plateInfo(plateImage,plate); 49 | plateInfos.push_back(plateInfo); 50 | 51 | } 52 | } 53 | // std::vector PlateDetection::plateDetectionRough(cv::Mat InputImage,cv::Rect roi,int min_w,int max_w){ 54 | // cv::Mat roi_region = util::cropFromImage(InputImage,roi); 55 | // return plateDetectionRough(roi_region,min_w,max_w); 56 | // } 57 | 58 | 59 | 60 | 61 | }//namespace pr 62 | -------------------------------------------------------------------------------- /app/src/main/jni/src/Recognizer.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by 庾金科 on 22/10/2017. 3 | // 4 | 5 | #include "../include/Recognizer.h" 6 | 7 | namespace pr{ 8 | void GeneralRecognizer::SegmentBasedSequenceRecognition(PlateInfo &plateinfo){ 9 | 10 | for(auto char_instance:plateinfo.plateChars) 11 | { 12 | std::pair res; 13 | cv::Mat code_table= recognizeCharacter(char_instance.second); 14 | res.first = char_instance.first; 15 | code_table.copyTo(res.second); 16 | plateinfo.appendPlateCoding(res); 17 | 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/jni/src/util.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by 庾金科 on 04/04/2017. 3 | // 4 | 5 | #include 6 | 7 | namespace util{ 8 | 9 | template void swap ( T& a, T& b ) 10 | { 11 | T c(a); a=b; b=c; 12 | } 13 | 14 | template T min(T& a,T& b ) 15 | { 16 | return a>b?b:a; 17 | 18 | } 19 | 20 | cv::Mat cropFromImage(const cv::Mat &image,cv::Rect rect){ 21 | int w = image.cols-1; 22 | int h = image.rows-1; 23 | rect.x = std::max(rect.x,0); 24 | rect.y = std::max(rect.y,0); 25 | rect.height = std::min(rect.height,h-rect.y); 26 | rect.width = std::min(rect.width,w-rect.x); 27 | cv::Mat temp(rect.size(), image.type()); 28 | cv::Mat cropped; 29 | temp = image(rect); 30 | temp.copyTo(cropped); 31 | return cropped; 32 | 33 | } 34 | 35 | cv::Mat cropBox2dFromImage(const cv::Mat &image,cv::RotatedRect rect) 36 | { 37 | cv::Mat M, rotated, cropped; 38 | float angle = rect.angle; 39 | cv::Size rect_size(rect.size.width,rect.size.height); 40 | if (rect.angle < -45.) { 41 | angle += 90.0; 42 | swap(rect_size.width, rect_size.height); 43 | } 44 | M = cv::getRotationMatrix2D(rect.center, angle, 1.0); 45 | cv::warpAffine(image, rotated, M, image.size(), cv::INTER_CUBIC); 46 | cv::getRectSubPix(rotated, rect_size, rect.center, cropped); 47 | return cropped; 48 | } 49 | 50 | cv::Mat calcHist(const cv::Mat &image) 51 | { 52 | cv::Mat hsv; 53 | std::vector hsv_planes; 54 | cv::cvtColor(image,hsv,cv::COLOR_BGR2HSV); 55 | cv::split(hsv,hsv_planes); 56 | cv::Mat hist; 57 | int histSize = 256; 58 | float range[] = {0,255}; 59 | const float* histRange = {range}; 60 | 61 | cv::calcHist( &hsv_planes[0], 1, 0, cv::Mat(), hist, 1, &histSize, &histRange,true, true); 62 | return hist; 63 | 64 | } 65 | float computeSimilir(const cv::Mat &A,const cv::Mat &B) 66 | { 67 | cv::Mat histA,histB; 68 | histA = calcHist(A); 69 | histB = calcHist(B); 70 | return cv::compareHist(histA,histB,CV_COMP_CORREL); 71 | 72 | } 73 | 74 | 75 | 76 | 77 | 78 | }//namespace util 79 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libopencv_core.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi-v7a/libopencv_core.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libopencv_dnn.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi-v7a/libopencv_dnn.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libopencv_flann.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi-v7a/libopencv_flann.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libopencv_highgui.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi-v7a/libopencv_highgui.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libopencv_imgcodecs.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi-v7a/libopencv_imgcodecs.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libopencv_imgproc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi-v7a/libopencv_imgproc.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libopencv_java3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi-v7a/libopencv_java3.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libopencv_objdetect.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi-v7a/libopencv_objdetect.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libopencv_photo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi-v7a/libopencv_photo.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libopencv_shape.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi-v7a/libopencv_shape.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libopencv_core.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi/libopencv_core.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libopencv_dnn.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi/libopencv_dnn.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libopencv_flann.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi/libopencv_flann.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libopencv_highgui.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi/libopencv_highgui.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libopencv_imgcodecs.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi/libopencv_imgcodecs.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libopencv_imgproc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi/libopencv_imgproc.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libopencv_java3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi/libopencv_java3.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libopencv_objdetect.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi/libopencv_objdetect.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libopencv_photo.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi/libopencv_photo.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libopencv_shape.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/jniLibs/armeabi/libopencv_shape.a -------------------------------------------------------------------------------- /app/src/main/res/drawable/camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/res/drawable/camera.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/res/drawable/folder.png -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 18 | 19 | 20 | 28 | 29 | 30 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_ready.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 18 | 19 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 11 | 12 | 18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | hyperlpr 3 | Settings 4 | 拍照 5 | 选择图片 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/test/java/pr/hyperlpr/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package pr.hyperlpr; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | 5 | repositories { 6 | google() 7 | jcenter() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.0.1' 11 | 12 | 13 | // NOTE: Do not place your application dependencies here; they belong 14 | // in the individual module build.gradle files 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | google() 21 | jcenter() 22 | } 23 | } 24 | 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } 28 | -------------------------------------------------------------------------------- /clean.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rd "build" /s /q 3 | rd "app/build" /s /q 4 | rd "app/.externalNativeBuild" /s /q 5 | pause -------------------------------------------------------------------------------- /doc/1-ndk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/doc/1-ndk.png -------------------------------------------------------------------------------- /doc/2-1-opencv3.3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/doc/2-1-opencv3.3.png -------------------------------------------------------------------------------- /doc/2-2-opencv3.3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/doc/2-2-opencv3.3.png -------------------------------------------------------------------------------- /doc/2-opencv3.3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/doc/2-opencv3.3.png -------------------------------------------------------------------------------- /doc/3-model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/doc/3-model.png -------------------------------------------------------------------------------- /doc/4-jni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/doc/4-jni.png -------------------------------------------------------------------------------- /doc/5-CMakeList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/doc/5-CMakeList.png -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Nov 29 15:46:49 CST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip 7 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /hyperlpr.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/hyperlpr.apk -------------------------------------------------------------------------------- /hyperlpr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sundyCoder/hyperlpr4Android/0d28355619ae6dde17bbc16ad5ec8477730782f7/hyperlpr.jpg -------------------------------------------------------------------------------- /openCVLibrary330/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "26.0.2" 6 | 7 | defaultConfig { 8 | minSdkVersion 8 9 | targetSdkVersion 21 10 | } 11 | 12 | buildTypes { 13 | release { 14 | minifyEnabled false 15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /openCVLibrary330/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/aidl/org/opencv/engine/OpenCVEngineInterface.aidl: -------------------------------------------------------------------------------- 1 | package org.opencv.engine; 2 | 3 | /** 4 | * Class provides a Java interface for OpenCV Engine Service. It's synchronous with native OpenCVEngine class. 5 | */ 6 | interface OpenCVEngineInterface 7 | { 8 | /** 9 | * @return Returns service version. 10 | */ 11 | int getEngineVersion(); 12 | 13 | /** 14 | * Finds an installed OpenCV library. 15 | * @param OpenCV version. 16 | * @return Returns path to OpenCV native libs or an empty string if OpenCV can not be found. 17 | */ 18 | String getLibPathByVersion(String version); 19 | 20 | /** 21 | * Tries to install defined version of OpenCV from Google Play Market. 22 | * @param OpenCV version. 23 | * @return Returns true if installation was successful or OpenCV package has been already installed. 24 | */ 25 | boolean installVersion(String version); 26 | 27 | /** 28 | * Returns list of libraries in loading order, separated by semicolon. 29 | * @param OpenCV version. 30 | * @return Returns names of OpenCV libraries, separated by semicolon. 31 | */ 32 | String getLibraryList(String version); 33 | } 34 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/android/FpsMeter.java: -------------------------------------------------------------------------------- 1 | package org.opencv.android; 2 | 3 | import java.text.DecimalFormat; 4 | 5 | import org.opencv.core.Core; 6 | 7 | import android.graphics.Canvas; 8 | import android.graphics.Color; 9 | import android.graphics.Paint; 10 | import android.util.Log; 11 | 12 | public class FpsMeter { 13 | private static final String TAG = "FpsMeter"; 14 | private static final int STEP = 20; 15 | private static final DecimalFormat FPS_FORMAT = new DecimalFormat("0.00"); 16 | 17 | private int mFramesCouner; 18 | private double mFrequency; 19 | private long mprevFrameTime; 20 | private String mStrfps; 21 | Paint mPaint; 22 | boolean mIsInitialized = false; 23 | int mWidth = 0; 24 | int mHeight = 0; 25 | 26 | public void init() { 27 | mFramesCouner = 0; 28 | mFrequency = Core.getTickFrequency(); 29 | mprevFrameTime = Core.getTickCount(); 30 | mStrfps = ""; 31 | 32 | mPaint = new Paint(); 33 | mPaint.setColor(Color.BLUE); 34 | mPaint.setTextSize(20); 35 | } 36 | 37 | public void measure() { 38 | if (!mIsInitialized) { 39 | init(); 40 | mIsInitialized = true; 41 | } else { 42 | mFramesCouner++; 43 | if (mFramesCouner % STEP == 0) { 44 | long time = Core.getTickCount(); 45 | double fps = STEP * mFrequency / (time - mprevFrameTime); 46 | mprevFrameTime = time; 47 | if (mWidth != 0 && mHeight != 0) 48 | mStrfps = FPS_FORMAT.format(fps) + " FPS@" + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight); 49 | else 50 | mStrfps = FPS_FORMAT.format(fps) + " FPS"; 51 | Log.i(TAG, mStrfps); 52 | } 53 | } 54 | } 55 | 56 | public void setResolution(int width, int height) { 57 | mWidth = width; 58 | mHeight = height; 59 | } 60 | 61 | public void draw(Canvas canvas, float offsetx, float offsety) { 62 | Log.d(TAG, mStrfps); 63 | canvas.drawText(mStrfps, offsetx, offsety, mPaint); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/android/InstallCallbackInterface.java: -------------------------------------------------------------------------------- 1 | package org.opencv.android; 2 | 3 | /** 4 | * Installation callback interface. 5 | */ 6 | public interface InstallCallbackInterface 7 | { 8 | /** 9 | * New package installation is required. 10 | */ 11 | static final int NEW_INSTALLATION = 0; 12 | /** 13 | * Current package installation is in progress. 14 | */ 15 | static final int INSTALLATION_PROGRESS = 1; 16 | 17 | /** 18 | * Target package name. 19 | * @return Return target package name. 20 | */ 21 | public String getPackageName(); 22 | /** 23 | * Installation is approved. 24 | */ 25 | public void install(); 26 | /** 27 | * Installation is canceled. 28 | */ 29 | public void cancel(); 30 | /** 31 | * Wait for package installation. 32 | */ 33 | public void wait_install(); 34 | }; 35 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/android/LoaderCallbackInterface.java: -------------------------------------------------------------------------------- 1 | package org.opencv.android; 2 | 3 | /** 4 | * Interface for callback object in case of asynchronous initialization of OpenCV. 5 | */ 6 | public interface LoaderCallbackInterface 7 | { 8 | /** 9 | * OpenCV initialization finished successfully. 10 | */ 11 | static final int SUCCESS = 0; 12 | /** 13 | * Google Play Market cannot be invoked. 14 | */ 15 | static final int MARKET_ERROR = 2; 16 | /** 17 | * OpenCV library installation has been canceled by the user. 18 | */ 19 | static final int INSTALL_CANCELED = 3; 20 | /** 21 | * This version of OpenCV Manager Service is incompatible with the app. Possibly, a service update is required. 22 | */ 23 | static final int INCOMPATIBLE_MANAGER_VERSION = 4; 24 | /** 25 | * OpenCV library initialization has failed. 26 | */ 27 | static final int INIT_FAILED = 0xff; 28 | 29 | /** 30 | * Callback method, called after OpenCV library initialization. 31 | * @param status status of initialization (see initialization status constants). 32 | */ 33 | public void onManagerConnected(int status); 34 | 35 | /** 36 | * Callback method, called in case the package installation is needed. 37 | * @param callback answer object with approve and cancel methods and the package description. 38 | */ 39 | public void onPackageInstall(final int operation, InstallCallbackInterface callback); 40 | }; 41 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/android/StaticHelper.java: -------------------------------------------------------------------------------- 1 | package org.opencv.android; 2 | 3 | import org.opencv.core.Core; 4 | 5 | import java.util.StringTokenizer; 6 | import android.util.Log; 7 | 8 | class StaticHelper { 9 | 10 | public static boolean initOpenCV(boolean InitCuda) 11 | { 12 | boolean result; 13 | String libs = ""; 14 | 15 | if(InitCuda) 16 | { 17 | loadLibrary("cudart"); 18 | loadLibrary("nppc"); 19 | loadLibrary("nppi"); 20 | loadLibrary("npps"); 21 | loadLibrary("cufft"); 22 | loadLibrary("cublas"); 23 | } 24 | 25 | Log.d(TAG, "Trying to get library list"); 26 | 27 | try 28 | { 29 | System.loadLibrary("opencv_info"); 30 | libs = getLibraryList(); 31 | } 32 | catch(UnsatisfiedLinkError e) 33 | { 34 | Log.e(TAG, "OpenCV error: Cannot load info library for OpenCV"); 35 | } 36 | 37 | Log.d(TAG, "Library list: \"" + libs + "\""); 38 | Log.d(TAG, "First attempt to load libs"); 39 | if (initOpenCVLibs(libs)) 40 | { 41 | Log.d(TAG, "First attempt to load libs is OK"); 42 | String eol = System.getProperty("line.separator"); 43 | for (String str : Core.getBuildInformation().split(eol)) 44 | Log.i(TAG, str); 45 | 46 | result = true; 47 | } 48 | else 49 | { 50 | Log.d(TAG, "First attempt to load libs fails"); 51 | result = false; 52 | } 53 | 54 | return result; 55 | } 56 | 57 | private static boolean loadLibrary(String Name) 58 | { 59 | boolean result = true; 60 | 61 | Log.d(TAG, "Trying to load library " + Name); 62 | try 63 | { 64 | System.loadLibrary(Name); 65 | Log.d(TAG, "Library " + Name + " loaded"); 66 | } 67 | catch(UnsatisfiedLinkError e) 68 | { 69 | Log.d(TAG, "Cannot load library \"" + Name + "\""); 70 | e.printStackTrace(); 71 | result &= false; 72 | } 73 | 74 | return result; 75 | } 76 | 77 | private static boolean initOpenCVLibs(String Libs) 78 | { 79 | Log.d(TAG, "Trying to init OpenCV libs"); 80 | 81 | boolean result = true; 82 | 83 | if ((null != Libs) && (Libs.length() != 0)) 84 | { 85 | Log.d(TAG, "Trying to load libs by dependency list"); 86 | StringTokenizer splitter = new StringTokenizer(Libs, ";"); 87 | while(splitter.hasMoreTokens()) 88 | { 89 | result &= loadLibrary(splitter.nextToken()); 90 | } 91 | } 92 | else 93 | { 94 | // If dependencies list is not defined or empty. 95 | result &= loadLibrary("opencv_java3"); 96 | } 97 | 98 | return result; 99 | } 100 | 101 | private static final String TAG = "OpenCV/StaticHelper"; 102 | 103 | private static native String getLibraryList(); 104 | } 105 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/Algorithm.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.core; 6 | 7 | import java.lang.String; 8 | 9 | // C++: class Algorithm 10 | //javadoc: Algorithm 11 | public class Algorithm { 12 | 13 | protected final long nativeObj; 14 | protected Algorithm(long addr) { nativeObj = addr; } 15 | 16 | public long getNativeObjAddr() { return nativeObj; } 17 | 18 | // 19 | // C++: String getDefaultName() 20 | // 21 | 22 | //javadoc: Algorithm::getDefaultName() 23 | public String getDefaultName() 24 | { 25 | 26 | String retVal = getDefaultName_0(nativeObj); 27 | 28 | return retVal; 29 | } 30 | 31 | 32 | // 33 | // C++: void clear() 34 | // 35 | 36 | //javadoc: Algorithm::clear() 37 | public void clear() 38 | { 39 | 40 | clear_0(nativeObj); 41 | 42 | return; 43 | } 44 | 45 | 46 | // 47 | // C++: void save(String filename) 48 | // 49 | 50 | //javadoc: Algorithm::save(filename) 51 | public void save(String filename) 52 | { 53 | 54 | save_0(nativeObj, filename); 55 | 56 | return; 57 | } 58 | 59 | 60 | @Override 61 | protected void finalize() throws Throwable { 62 | delete(nativeObj); 63 | } 64 | 65 | 66 | 67 | // C++: String getDefaultName() 68 | private static native String getDefaultName_0(long nativeObj); 69 | 70 | // C++: void clear() 71 | private static native void clear_0(long nativeObj); 72 | 73 | // C++: void save(String filename) 74 | private static native void save_0(long nativeObj, String filename); 75 | 76 | // native support for java finalize() 77 | private static native void delete(long nativeObj); 78 | 79 | } 80 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/CvException.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | public class CvException extends RuntimeException { 4 | 5 | private static final long serialVersionUID = 1L; 6 | 7 | public CvException(String msg) { 8 | super(msg); 9 | } 10 | 11 | @Override 12 | public String toString() { 13 | return "CvException [" + super.toString() + "]"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/DMatch.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | //C++: class DMatch 4 | 5 | /** 6 | * Structure for matching: query descriptor index, train descriptor index, train 7 | * image index and distance between descriptors. 8 | */ 9 | public class DMatch { 10 | 11 | /** 12 | * Query descriptor index. 13 | */ 14 | public int queryIdx; 15 | /** 16 | * Train descriptor index. 17 | */ 18 | public int trainIdx; 19 | /** 20 | * Train image index. 21 | */ 22 | public int imgIdx; 23 | 24 | // javadoc: DMatch::distance 25 | public float distance; 26 | 27 | // javadoc: DMatch::DMatch() 28 | public DMatch() { 29 | this(-1, -1, Float.MAX_VALUE); 30 | } 31 | 32 | // javadoc: DMatch::DMatch(_queryIdx, _trainIdx, _distance) 33 | public DMatch(int _queryIdx, int _trainIdx, float _distance) { 34 | queryIdx = _queryIdx; 35 | trainIdx = _trainIdx; 36 | imgIdx = -1; 37 | distance = _distance; 38 | } 39 | 40 | // javadoc: DMatch::DMatch(_queryIdx, _trainIdx, _imgIdx, _distance) 41 | public DMatch(int _queryIdx, int _trainIdx, int _imgIdx, float _distance) { 42 | queryIdx = _queryIdx; 43 | trainIdx = _trainIdx; 44 | imgIdx = _imgIdx; 45 | distance = _distance; 46 | } 47 | 48 | public boolean lessThan(DMatch it) { 49 | return distance < it.distance; 50 | } 51 | 52 | @Override 53 | public String toString() { 54 | return "DMatch [queryIdx=" + queryIdx + ", trainIdx=" + trainIdx 55 | + ", imgIdx=" + imgIdx + ", distance=" + distance + "]"; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/KeyPoint.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | import org.opencv.core.Point; 4 | 5 | //javadoc: KeyPoint 6 | public class KeyPoint { 7 | 8 | /** 9 | * Coordinates of the keypoint. 10 | */ 11 | public Point pt; 12 | /** 13 | * Diameter of the useful keypoint adjacent area. 14 | */ 15 | public float size; 16 | /** 17 | * Computed orientation of the keypoint (-1 if not applicable). 18 | */ 19 | public float angle; 20 | /** 21 | * The response, by which the strongest keypoints have been selected. Can 22 | * be used for further sorting or subsampling. 23 | */ 24 | public float response; 25 | /** 26 | * Octave (pyramid layer), from which the keypoint has been extracted. 27 | */ 28 | public int octave; 29 | /** 30 | * Object ID, that can be used to cluster keypoints by an object they 31 | * belong to. 32 | */ 33 | public int class_id; 34 | 35 | // javadoc:KeyPoint::KeyPoint(x,y,_size,_angle,_response,_octave,_class_id) 36 | public KeyPoint(float x, float y, float _size, float _angle, float _response, int _octave, int _class_id) 37 | { 38 | pt = new Point(x, y); 39 | size = _size; 40 | angle = _angle; 41 | response = _response; 42 | octave = _octave; 43 | class_id = _class_id; 44 | } 45 | 46 | // javadoc: KeyPoint::KeyPoint() 47 | public KeyPoint() 48 | { 49 | this(0, 0, 0, -1, 0, 0, -1); 50 | } 51 | 52 | // javadoc: KeyPoint::KeyPoint(x, y, _size, _angle, _response, _octave) 53 | public KeyPoint(float x, float y, float _size, float _angle, float _response, int _octave) 54 | { 55 | this(x, y, _size, _angle, _response, _octave, -1); 56 | } 57 | 58 | // javadoc: KeyPoint::KeyPoint(x, y, _size, _angle, _response) 59 | public KeyPoint(float x, float y, float _size, float _angle, float _response) 60 | { 61 | this(x, y, _size, _angle, _response, 0, -1); 62 | } 63 | 64 | // javadoc: KeyPoint::KeyPoint(x, y, _size, _angle) 65 | public KeyPoint(float x, float y, float _size, float _angle) 66 | { 67 | this(x, y, _size, _angle, 0, 0, -1); 68 | } 69 | 70 | // javadoc: KeyPoint::KeyPoint(x, y, _size) 71 | public KeyPoint(float x, float y, float _size) 72 | { 73 | this(x, y, _size, -1, 0, 0, -1); 74 | } 75 | 76 | @Override 77 | public String toString() { 78 | return "KeyPoint [pt=" + pt + ", size=" + size + ", angle=" + angle 79 | + ", response=" + response + ", octave=" + octave 80 | + ", class_id=" + class_id + "]"; 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/MatOfByte.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | public class MatOfByte extends Mat { 7 | // 8UC(x) 8 | private static final int _depth = CvType.CV_8U; 9 | private static final int _channels = 1; 10 | 11 | public MatOfByte() { 12 | super(); 13 | } 14 | 15 | protected MatOfByte(long addr) { 16 | super(addr); 17 | if( !empty() && checkVector(_channels, _depth) < 0 ) 18 | throw new IllegalArgumentException("Incompatible Mat"); 19 | //FIXME: do we need release() here? 20 | } 21 | 22 | public static MatOfByte fromNativeAddr(long addr) { 23 | return new MatOfByte(addr); 24 | } 25 | 26 | public MatOfByte(Mat m) { 27 | super(m, Range.all()); 28 | if( !empty() && checkVector(_channels, _depth) < 0 ) 29 | throw new IllegalArgumentException("Incompatible Mat"); 30 | //FIXME: do we need release() here? 31 | } 32 | 33 | public MatOfByte(byte...a) { 34 | super(); 35 | fromArray(a); 36 | } 37 | 38 | public void alloc(int elemNumber) { 39 | if(elemNumber>0) 40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 41 | } 42 | 43 | public void fromArray(byte...a) { 44 | if(a==null || a.length==0) 45 | return; 46 | int num = a.length / _channels; 47 | alloc(num); 48 | put(0, 0, a); //TODO: check ret val! 49 | } 50 | 51 | public byte[] toArray() { 52 | int num = checkVector(_channels, _depth); 53 | if(num < 0) 54 | throw new RuntimeException("Native Mat has unexpected type or size: " + toString()); 55 | byte[] a = new byte[num * _channels]; 56 | if(num == 0) 57 | return a; 58 | get(0, 0, a); //TODO: check ret val! 59 | return a; 60 | } 61 | 62 | public void fromList(List lb) { 63 | if(lb==null || lb.size()==0) 64 | return; 65 | Byte ab[] = lb.toArray(new Byte[0]); 66 | byte a[] = new byte[ab.length]; 67 | for(int i=0; i toList() { 73 | byte[] a = toArray(); 74 | Byte ab[] = new Byte[a.length]; 75 | for(int i=0; i0) 42 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 43 | } 44 | 45 | 46 | public void fromArray(DMatch...a) { 47 | if(a==null || a.length==0) 48 | return; 49 | int num = a.length; 50 | alloc(num); 51 | float buff[] = new float[num * _channels]; 52 | for(int i=0; i ldm) { 75 | DMatch adm[] = ldm.toArray(new DMatch[0]); 76 | fromArray(adm); 77 | } 78 | 79 | public List toList() { 80 | DMatch[] adm = toArray(); 81 | return Arrays.asList(adm); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/MatOfDouble.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | public class MatOfDouble extends Mat { 7 | // 64FC(x) 8 | private static final int _depth = CvType.CV_64F; 9 | private static final int _channels = 1; 10 | 11 | public MatOfDouble() { 12 | super(); 13 | } 14 | 15 | protected MatOfDouble(long addr) { 16 | super(addr); 17 | if( !empty() && checkVector(_channels, _depth) < 0 ) 18 | throw new IllegalArgumentException("Incompatible Mat"); 19 | //FIXME: do we need release() here? 20 | } 21 | 22 | public static MatOfDouble fromNativeAddr(long addr) { 23 | return new MatOfDouble(addr); 24 | } 25 | 26 | public MatOfDouble(Mat m) { 27 | super(m, Range.all()); 28 | if( !empty() && checkVector(_channels, _depth) < 0 ) 29 | throw new IllegalArgumentException("Incompatible Mat"); 30 | //FIXME: do we need release() here? 31 | } 32 | 33 | public MatOfDouble(double...a) { 34 | super(); 35 | fromArray(a); 36 | } 37 | 38 | public void alloc(int elemNumber) { 39 | if(elemNumber>0) 40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 41 | } 42 | 43 | public void fromArray(double...a) { 44 | if(a==null || a.length==0) 45 | return; 46 | int num = a.length / _channels; 47 | alloc(num); 48 | put(0, 0, a); //TODO: check ret val! 49 | } 50 | 51 | public double[] toArray() { 52 | int num = checkVector(_channels, _depth); 53 | if(num < 0) 54 | throw new RuntimeException("Native Mat has unexpected type or size: " + toString()); 55 | double[] a = new double[num * _channels]; 56 | if(num == 0) 57 | return a; 58 | get(0, 0, a); //TODO: check ret val! 59 | return a; 60 | } 61 | 62 | public void fromList(List lb) { 63 | if(lb==null || lb.size()==0) 64 | return; 65 | Double ab[] = lb.toArray(new Double[0]); 66 | double a[] = new double[ab.length]; 67 | for(int i=0; i toList() { 73 | double[] a = toArray(); 74 | Double ab[] = new Double[a.length]; 75 | for(int i=0; i0) 40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 41 | } 42 | 43 | public void fromArray(float...a) { 44 | if(a==null || a.length==0) 45 | return; 46 | int num = a.length / _channels; 47 | alloc(num); 48 | put(0, 0, a); //TODO: check ret val! 49 | } 50 | 51 | public float[] toArray() { 52 | int num = checkVector(_channels, _depth); 53 | if(num < 0) 54 | throw new RuntimeException("Native Mat has unexpected type or size: " + toString()); 55 | float[] a = new float[num * _channels]; 56 | if(num == 0) 57 | return a; 58 | get(0, 0, a); //TODO: check ret val! 59 | return a; 60 | } 61 | 62 | public void fromList(List lb) { 63 | if(lb==null || lb.size()==0) 64 | return; 65 | Float ab[] = lb.toArray(new Float[0]); 66 | float a[] = new float[ab.length]; 67 | for(int i=0; i toList() { 73 | float[] a = toArray(); 74 | Float ab[] = new Float[a.length]; 75 | for(int i=0; i0) 40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 41 | } 42 | 43 | public void fromArray(float...a) { 44 | if(a==null || a.length==0) 45 | return; 46 | int num = a.length / _channels; 47 | alloc(num); 48 | put(0, 0, a); //TODO: check ret val! 49 | } 50 | 51 | public float[] toArray() { 52 | int num = checkVector(_channels, _depth); 53 | if(num < 0) 54 | throw new RuntimeException("Native Mat has unexpected type or size: " + toString()); 55 | float[] a = new float[num * _channels]; 56 | if(num == 0) 57 | return a; 58 | get(0, 0, a); //TODO: check ret val! 59 | return a; 60 | } 61 | 62 | public void fromList(List lb) { 63 | if(lb==null || lb.size()==0) 64 | return; 65 | Float ab[] = lb.toArray(new Float[0]); 66 | float a[] = new float[ab.length]; 67 | for(int i=0; i toList() { 73 | float[] a = toArray(); 74 | Float ab[] = new Float[a.length]; 75 | for(int i=0; i0) 40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 41 | } 42 | 43 | public void fromArray(float...a) { 44 | if(a==null || a.length==0) 45 | return; 46 | int num = a.length / _channels; 47 | alloc(num); 48 | put(0, 0, a); //TODO: check ret val! 49 | } 50 | 51 | public float[] toArray() { 52 | int num = checkVector(_channels, _depth); 53 | if(num < 0) 54 | throw new RuntimeException("Native Mat has unexpected type or size: " + toString()); 55 | float[] a = new float[num * _channels]; 56 | if(num == 0) 57 | return a; 58 | get(0, 0, a); //TODO: check ret val! 59 | return a; 60 | } 61 | 62 | public void fromList(List lb) { 63 | if(lb==null || lb.size()==0) 64 | return; 65 | Float ab[] = lb.toArray(new Float[0]); 66 | float a[] = new float[ab.length]; 67 | for(int i=0; i toList() { 73 | float[] a = toArray(); 74 | Float ab[] = new Float[a.length]; 75 | for(int i=0; i0) 41 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 42 | } 43 | 44 | public void fromArray(int...a) { 45 | if(a==null || a.length==0) 46 | return; 47 | int num = a.length / _channels; 48 | alloc(num); 49 | put(0, 0, a); //TODO: check ret val! 50 | } 51 | 52 | public int[] toArray() { 53 | int num = checkVector(_channels, _depth); 54 | if(num < 0) 55 | throw new RuntimeException("Native Mat has unexpected type or size: " + toString()); 56 | int[] a = new int[num * _channels]; 57 | if(num == 0) 58 | return a; 59 | get(0, 0, a); //TODO: check ret val! 60 | return a; 61 | } 62 | 63 | public void fromList(List lb) { 64 | if(lb==null || lb.size()==0) 65 | return; 66 | Integer ab[] = lb.toArray(new Integer[0]); 67 | int a[] = new int[ab.length]; 68 | for(int i=0; i toList() { 74 | int[] a = toArray(); 75 | Integer ab[] = new Integer[a.length]; 76 | for(int i=0; i0) 41 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 42 | } 43 | 44 | public void fromArray(int...a) { 45 | if(a==null || a.length==0) 46 | return; 47 | int num = a.length / _channels; 48 | alloc(num); 49 | put(0, 0, a); //TODO: check ret val! 50 | } 51 | 52 | public int[] toArray() { 53 | int num = checkVector(_channels, _depth); 54 | if(num < 0) 55 | throw new RuntimeException("Native Mat has unexpected type or size: " + toString()); 56 | int[] a = new int[num * _channels]; 57 | if(num == 0) 58 | return a; 59 | get(0, 0, a); //TODO: check ret val! 60 | return a; 61 | } 62 | 63 | public void fromList(List lb) { 64 | if(lb==null || lb.size()==0) 65 | return; 66 | Integer ab[] = lb.toArray(new Integer[0]); 67 | int a[] = new int[ab.length]; 68 | for(int i=0; i toList() { 74 | int[] a = toArray(); 75 | Integer ab[] = new Integer[a.length]; 76 | for(int i=0; i0) 42 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 43 | } 44 | 45 | public void fromArray(KeyPoint...a) { 46 | if(a==null || a.length==0) 47 | return; 48 | int num = a.length; 49 | alloc(num); 50 | float buff[] = new float[num * _channels]; 51 | for(int i=0; i lkp) { 78 | KeyPoint akp[] = lkp.toArray(new KeyPoint[0]); 79 | fromArray(akp); 80 | } 81 | 82 | public List toList() { 83 | KeyPoint[] akp = toArray(); 84 | return Arrays.asList(akp); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/MatOfPoint.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | public class MatOfPoint extends Mat { 7 | // 32SC2 8 | private static final int _depth = CvType.CV_32S; 9 | private static final int _channels = 2; 10 | 11 | public MatOfPoint() { 12 | super(); 13 | } 14 | 15 | protected MatOfPoint(long addr) { 16 | super(addr); 17 | if( !empty() && checkVector(_channels, _depth) < 0 ) 18 | throw new IllegalArgumentException("Incompatible Mat"); 19 | //FIXME: do we need release() here? 20 | } 21 | 22 | public static MatOfPoint fromNativeAddr(long addr) { 23 | return new MatOfPoint(addr); 24 | } 25 | 26 | public MatOfPoint(Mat m) { 27 | super(m, Range.all()); 28 | if( !empty() && checkVector(_channels, _depth) < 0 ) 29 | throw new IllegalArgumentException("Incompatible Mat"); 30 | //FIXME: do we need release() here? 31 | } 32 | 33 | public MatOfPoint(Point...a) { 34 | super(); 35 | fromArray(a); 36 | } 37 | 38 | public void alloc(int elemNumber) { 39 | if(elemNumber>0) 40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 41 | } 42 | 43 | public void fromArray(Point...a) { 44 | if(a==null || a.length==0) 45 | return; 46 | int num = a.length; 47 | alloc(num); 48 | int buff[] = new int[num * _channels]; 49 | for(int i=0; i lp) { 70 | Point ap[] = lp.toArray(new Point[0]); 71 | fromArray(ap); 72 | } 73 | 74 | public List toList() { 75 | Point[] ap = toArray(); 76 | return Arrays.asList(ap); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/MatOfPoint2f.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | public class MatOfPoint2f extends Mat { 7 | // 32FC2 8 | private static final int _depth = CvType.CV_32F; 9 | private static final int _channels = 2; 10 | 11 | public MatOfPoint2f() { 12 | super(); 13 | } 14 | 15 | protected MatOfPoint2f(long addr) { 16 | super(addr); 17 | if( !empty() && checkVector(_channels, _depth) < 0 ) 18 | throw new IllegalArgumentException("Incompatible Mat"); 19 | //FIXME: do we need release() here? 20 | } 21 | 22 | public static MatOfPoint2f fromNativeAddr(long addr) { 23 | return new MatOfPoint2f(addr); 24 | } 25 | 26 | public MatOfPoint2f(Mat m) { 27 | super(m, Range.all()); 28 | if( !empty() && checkVector(_channels, _depth) < 0 ) 29 | throw new IllegalArgumentException("Incompatible Mat"); 30 | //FIXME: do we need release() here? 31 | } 32 | 33 | public MatOfPoint2f(Point...a) { 34 | super(); 35 | fromArray(a); 36 | } 37 | 38 | public void alloc(int elemNumber) { 39 | if(elemNumber>0) 40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 41 | } 42 | 43 | public void fromArray(Point...a) { 44 | if(a==null || a.length==0) 45 | return; 46 | int num = a.length; 47 | alloc(num); 48 | float buff[] = new float[num * _channels]; 49 | for(int i=0; i lp) { 70 | Point ap[] = lp.toArray(new Point[0]); 71 | fromArray(ap); 72 | } 73 | 74 | public List toList() { 75 | Point[] ap = toArray(); 76 | return Arrays.asList(ap); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/MatOfPoint3.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | public class MatOfPoint3 extends Mat { 7 | // 32SC3 8 | private static final int _depth = CvType.CV_32S; 9 | private static final int _channels = 3; 10 | 11 | public MatOfPoint3() { 12 | super(); 13 | } 14 | 15 | protected MatOfPoint3(long addr) { 16 | super(addr); 17 | if( !empty() && checkVector(_channels, _depth) < 0 ) 18 | throw new IllegalArgumentException("Incompatible Mat"); 19 | //FIXME: do we need release() here? 20 | } 21 | 22 | public static MatOfPoint3 fromNativeAddr(long addr) { 23 | return new MatOfPoint3(addr); 24 | } 25 | 26 | public MatOfPoint3(Mat m) { 27 | super(m, Range.all()); 28 | if( !empty() && checkVector(_channels, _depth) < 0 ) 29 | throw new IllegalArgumentException("Incompatible Mat"); 30 | //FIXME: do we need release() here? 31 | } 32 | 33 | public MatOfPoint3(Point3...a) { 34 | super(); 35 | fromArray(a); 36 | } 37 | 38 | public void alloc(int elemNumber) { 39 | if(elemNumber>0) 40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 41 | } 42 | 43 | public void fromArray(Point3...a) { 44 | if(a==null || a.length==0) 45 | return; 46 | int num = a.length; 47 | alloc(num); 48 | int buff[] = new int[num * _channels]; 49 | for(int i=0; i lp) { 71 | Point3 ap[] = lp.toArray(new Point3[0]); 72 | fromArray(ap); 73 | } 74 | 75 | public List toList() { 76 | Point3[] ap = toArray(); 77 | return Arrays.asList(ap); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/MatOfPoint3f.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | public class MatOfPoint3f extends Mat { 7 | // 32FC3 8 | private static final int _depth = CvType.CV_32F; 9 | private static final int _channels = 3; 10 | 11 | public MatOfPoint3f() { 12 | super(); 13 | } 14 | 15 | protected MatOfPoint3f(long addr) { 16 | super(addr); 17 | if( !empty() && checkVector(_channels, _depth) < 0 ) 18 | throw new IllegalArgumentException("Incompatible Mat"); 19 | //FIXME: do we need release() here? 20 | } 21 | 22 | public static MatOfPoint3f fromNativeAddr(long addr) { 23 | return new MatOfPoint3f(addr); 24 | } 25 | 26 | public MatOfPoint3f(Mat m) { 27 | super(m, Range.all()); 28 | if( !empty() && checkVector(_channels, _depth) < 0 ) 29 | throw new IllegalArgumentException("Incompatible Mat"); 30 | //FIXME: do we need release() here? 31 | } 32 | 33 | public MatOfPoint3f(Point3...a) { 34 | super(); 35 | fromArray(a); 36 | } 37 | 38 | public void alloc(int elemNumber) { 39 | if(elemNumber>0) 40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 41 | } 42 | 43 | public void fromArray(Point3...a) { 44 | if(a==null || a.length==0) 45 | return; 46 | int num = a.length; 47 | alloc(num); 48 | float buff[] = new float[num * _channels]; 49 | for(int i=0; i lp) { 71 | Point3 ap[] = lp.toArray(new Point3[0]); 72 | fromArray(ap); 73 | } 74 | 75 | public List toList() { 76 | Point3[] ap = toArray(); 77 | return Arrays.asList(ap); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/MatOfRect.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | 7 | public class MatOfRect extends Mat { 8 | // 32SC4 9 | private static final int _depth = CvType.CV_32S; 10 | private static final int _channels = 4; 11 | 12 | public MatOfRect() { 13 | super(); 14 | } 15 | 16 | protected MatOfRect(long addr) { 17 | super(addr); 18 | if( !empty() && checkVector(_channels, _depth) < 0 ) 19 | throw new IllegalArgumentException("Incompatible Mat"); 20 | //FIXME: do we need release() here? 21 | } 22 | 23 | public static MatOfRect fromNativeAddr(long addr) { 24 | return new MatOfRect(addr); 25 | } 26 | 27 | public MatOfRect(Mat m) { 28 | super(m, Range.all()); 29 | if( !empty() && checkVector(_channels, _depth) < 0 ) 30 | throw new IllegalArgumentException("Incompatible Mat"); 31 | //FIXME: do we need release() here? 32 | } 33 | 34 | public MatOfRect(Rect...a) { 35 | super(); 36 | fromArray(a); 37 | } 38 | 39 | public void alloc(int elemNumber) { 40 | if(elemNumber>0) 41 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 42 | } 43 | 44 | public void fromArray(Rect...a) { 45 | if(a==null || a.length==0) 46 | return; 47 | int num = a.length; 48 | alloc(num); 49 | int buff[] = new int[num * _channels]; 50 | for(int i=0; i lr) { 73 | Rect ap[] = lr.toArray(new Rect[0]); 74 | fromArray(ap); 75 | } 76 | 77 | public List toList() { 78 | Rect[] ar = toArray(); 79 | return Arrays.asList(ar); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/MatOfRect2d.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | 7 | public class MatOfRect2d extends Mat { 8 | // 64FC4 9 | private static final int _depth = CvType.CV_64F; 10 | private static final int _channels = 4; 11 | 12 | public MatOfRect2d() { 13 | super(); 14 | } 15 | 16 | protected MatOfRect2d(long addr) { 17 | super(addr); 18 | if( !empty() && checkVector(_channels, _depth) < 0 ) 19 | throw new IllegalArgumentException("Incompatible Mat"); 20 | //FIXME: do we need release() here? 21 | } 22 | 23 | public static MatOfRect2d fromNativeAddr(long addr) { 24 | return new MatOfRect2d(addr); 25 | } 26 | 27 | public MatOfRect2d(Mat m) { 28 | super(m, Range.all()); 29 | if( !empty() && checkVector(_channels, _depth) < 0 ) 30 | throw new IllegalArgumentException("Incompatible Mat"); 31 | //FIXME: do we need release() here? 32 | } 33 | 34 | public MatOfRect2d(Rect2d...a) { 35 | super(); 36 | fromArray(a); 37 | } 38 | 39 | public void alloc(int elemNumber) { 40 | if(elemNumber>0) 41 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels)); 42 | } 43 | 44 | public void fromArray(Rect2d...a) { 45 | if(a==null || a.length==0) 46 | return; 47 | int num = a.length; 48 | alloc(num); 49 | double buff[] = new double[num * _channels]; 50 | for(int i=0; i lr) { 73 | Rect2d ap[] = lr.toArray(new Rect2d[0]); 74 | fromArray(ap); 75 | } 76 | 77 | public List toList() { 78 | Rect2d[] ar = toArray(); 79 | return Arrays.asList(ar); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/Point.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | //javadoc:Point_ 4 | public class Point { 5 | 6 | public double x, y; 7 | 8 | public Point(double x, double y) { 9 | this.x = x; 10 | this.y = y; 11 | } 12 | 13 | public Point() { 14 | this(0, 0); 15 | } 16 | 17 | public Point(double[] vals) { 18 | this(); 19 | set(vals); 20 | } 21 | 22 | public void set(double[] vals) { 23 | if (vals != null) { 24 | x = vals.length > 0 ? vals[0] : 0; 25 | y = vals.length > 1 ? vals[1] : 0; 26 | } else { 27 | x = 0; 28 | y = 0; 29 | } 30 | } 31 | 32 | public Point clone() { 33 | return new Point(x, y); 34 | } 35 | 36 | public double dot(Point p) { 37 | return x * p.x + y * p.y; 38 | } 39 | 40 | @Override 41 | public int hashCode() { 42 | final int prime = 31; 43 | int result = 1; 44 | long temp; 45 | temp = Double.doubleToLongBits(x); 46 | result = prime * result + (int) (temp ^ (temp >>> 32)); 47 | temp = Double.doubleToLongBits(y); 48 | result = prime * result + (int) (temp ^ (temp >>> 32)); 49 | return result; 50 | } 51 | 52 | @Override 53 | public boolean equals(Object obj) { 54 | if (this == obj) return true; 55 | if (!(obj instanceof Point)) return false; 56 | Point it = (Point) obj; 57 | return x == it.x && y == it.y; 58 | } 59 | 60 | public boolean inside(Rect r) { 61 | return r.contains(this); 62 | } 63 | 64 | @Override 65 | public String toString() { 66 | return "{" + x + ", " + y + "}"; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/Point3.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | //javadoc:Point3_ 4 | public class Point3 { 5 | 6 | public double x, y, z; 7 | 8 | public Point3(double x, double y, double z) { 9 | this.x = x; 10 | this.y = y; 11 | this.z = z; 12 | } 13 | 14 | public Point3() { 15 | this(0, 0, 0); 16 | } 17 | 18 | public Point3(Point p) { 19 | x = p.x; 20 | y = p.y; 21 | z = 0; 22 | } 23 | 24 | public Point3(double[] vals) { 25 | this(); 26 | set(vals); 27 | } 28 | 29 | public void set(double[] vals) { 30 | if (vals != null) { 31 | x = vals.length > 0 ? vals[0] : 0; 32 | y = vals.length > 1 ? vals[1] : 0; 33 | z = vals.length > 2 ? vals[2] : 0; 34 | } else { 35 | x = 0; 36 | y = 0; 37 | z = 0; 38 | } 39 | } 40 | 41 | public Point3 clone() { 42 | return new Point3(x, y, z); 43 | } 44 | 45 | public double dot(Point3 p) { 46 | return x * p.x + y * p.y + z * p.z; 47 | } 48 | 49 | public Point3 cross(Point3 p) { 50 | return new Point3(y * p.z - z * p.y, z * p.x - x * p.z, x * p.y - y * p.x); 51 | } 52 | 53 | @Override 54 | public int hashCode() { 55 | final int prime = 31; 56 | int result = 1; 57 | long temp; 58 | temp = Double.doubleToLongBits(x); 59 | result = prime * result + (int) (temp ^ (temp >>> 32)); 60 | temp = Double.doubleToLongBits(y); 61 | result = prime * result + (int) (temp ^ (temp >>> 32)); 62 | temp = Double.doubleToLongBits(z); 63 | result = prime * result + (int) (temp ^ (temp >>> 32)); 64 | return result; 65 | } 66 | 67 | @Override 68 | public boolean equals(Object obj) { 69 | if (this == obj) return true; 70 | if (!(obj instanceof Point3)) return false; 71 | Point3 it = (Point3) obj; 72 | return x == it.x && y == it.y && z == it.z; 73 | } 74 | 75 | @Override 76 | public String toString() { 77 | return "{" + x + ", " + y + ", " + z + "}"; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/Range.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | //javadoc:Range 4 | public class Range { 5 | 6 | public int start, end; 7 | 8 | public Range(int s, int e) { 9 | this.start = s; 10 | this.end = e; 11 | } 12 | 13 | public Range() { 14 | this(0, 0); 15 | } 16 | 17 | public Range(double[] vals) { 18 | set(vals); 19 | } 20 | 21 | public void set(double[] vals) { 22 | if (vals != null) { 23 | start = vals.length > 0 ? (int) vals[0] : 0; 24 | end = vals.length > 1 ? (int) vals[1] : 0; 25 | } else { 26 | start = 0; 27 | end = 0; 28 | } 29 | 30 | } 31 | 32 | public int size() { 33 | return empty() ? 0 : end - start; 34 | } 35 | 36 | public boolean empty() { 37 | return end <= start; 38 | } 39 | 40 | public static Range all() { 41 | return new Range(Integer.MIN_VALUE, Integer.MAX_VALUE); 42 | } 43 | 44 | public Range intersection(Range r1) { 45 | Range r = new Range(Math.max(r1.start, this.start), Math.min(r1.end, this.end)); 46 | r.end = Math.max(r.end, r.start); 47 | return r; 48 | } 49 | 50 | public Range shift(int delta) { 51 | return new Range(start + delta, end + delta); 52 | } 53 | 54 | public Range clone() { 55 | return new Range(start, end); 56 | } 57 | 58 | @Override 59 | public int hashCode() { 60 | final int prime = 31; 61 | int result = 1; 62 | long temp; 63 | temp = Double.doubleToLongBits(start); 64 | result = prime * result + (int) (temp ^ (temp >>> 32)); 65 | temp = Double.doubleToLongBits(end); 66 | result = prime * result + (int) (temp ^ (temp >>> 32)); 67 | return result; 68 | } 69 | 70 | @Override 71 | public boolean equals(Object obj) { 72 | if (this == obj) return true; 73 | if (!(obj instanceof Range)) return false; 74 | Range it = (Range) obj; 75 | return start == it.start && end == it.end; 76 | } 77 | 78 | @Override 79 | public String toString() { 80 | return "[" + start + ", " + end + ")"; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/Rect.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | //javadoc:Rect_ 4 | public class Rect { 5 | 6 | public int x, y, width, height; 7 | 8 | public Rect(int x, int y, int width, int height) { 9 | this.x = x; 10 | this.y = y; 11 | this.width = width; 12 | this.height = height; 13 | } 14 | 15 | public Rect() { 16 | this(0, 0, 0, 0); 17 | } 18 | 19 | public Rect(Point p1, Point p2) { 20 | x = (int) (p1.x < p2.x ? p1.x : p2.x); 21 | y = (int) (p1.y < p2.y ? p1.y : p2.y); 22 | width = (int) (p1.x > p2.x ? p1.x : p2.x) - x; 23 | height = (int) (p1.y > p2.y ? p1.y : p2.y) - y; 24 | } 25 | 26 | public Rect(Point p, Size s) { 27 | this((int) p.x, (int) p.y, (int) s.width, (int) s.height); 28 | } 29 | 30 | public Rect(double[] vals) { 31 | set(vals); 32 | } 33 | 34 | public void set(double[] vals) { 35 | if (vals != null) { 36 | x = vals.length > 0 ? (int) vals[0] : 0; 37 | y = vals.length > 1 ? (int) vals[1] : 0; 38 | width = vals.length > 2 ? (int) vals[2] : 0; 39 | height = vals.length > 3 ? (int) vals[3] : 0; 40 | } else { 41 | x = 0; 42 | y = 0; 43 | width = 0; 44 | height = 0; 45 | } 46 | } 47 | 48 | public Rect clone() { 49 | return new Rect(x, y, width, height); 50 | } 51 | 52 | public Point tl() { 53 | return new Point(x, y); 54 | } 55 | 56 | public Point br() { 57 | return new Point(x + width, y + height); 58 | } 59 | 60 | public Size size() { 61 | return new Size(width, height); 62 | } 63 | 64 | public double area() { 65 | return width * height; 66 | } 67 | 68 | public boolean empty() { 69 | return width <= 0 || height <= 0; 70 | } 71 | 72 | public boolean contains(Point p) { 73 | return x <= p.x && p.x < x + width && y <= p.y && p.y < y + height; 74 | } 75 | 76 | @Override 77 | public int hashCode() { 78 | final int prime = 31; 79 | int result = 1; 80 | long temp; 81 | temp = Double.doubleToLongBits(height); 82 | result = prime * result + (int) (temp ^ (temp >>> 32)); 83 | temp = Double.doubleToLongBits(width); 84 | result = prime * result + (int) (temp ^ (temp >>> 32)); 85 | temp = Double.doubleToLongBits(x); 86 | result = prime * result + (int) (temp ^ (temp >>> 32)); 87 | temp = Double.doubleToLongBits(y); 88 | result = prime * result + (int) (temp ^ (temp >>> 32)); 89 | return result; 90 | } 91 | 92 | @Override 93 | public boolean equals(Object obj) { 94 | if (this == obj) return true; 95 | if (!(obj instanceof Rect)) return false; 96 | Rect it = (Rect) obj; 97 | return x == it.x && y == it.y && width == it.width && height == it.height; 98 | } 99 | 100 | @Override 101 | public String toString() { 102 | return "{" + x + ", " + y + ", " + width + "x" + height + "}"; 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/Scalar.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | //javadoc:Scalar_ 4 | public class Scalar { 5 | 6 | public double val[]; 7 | 8 | public Scalar(double v0, double v1, double v2, double v3) { 9 | val = new double[] { v0, v1, v2, v3 }; 10 | } 11 | 12 | public Scalar(double v0, double v1, double v2) { 13 | val = new double[] { v0, v1, v2, 0 }; 14 | } 15 | 16 | public Scalar(double v0, double v1) { 17 | val = new double[] { v0, v1, 0, 0 }; 18 | } 19 | 20 | public Scalar(double v0) { 21 | val = new double[] { v0, 0, 0, 0 }; 22 | } 23 | 24 | public Scalar(double[] vals) { 25 | if (vals != null && vals.length == 4) 26 | val = vals.clone(); 27 | else { 28 | val = new double[4]; 29 | set(vals); 30 | } 31 | } 32 | 33 | public void set(double[] vals) { 34 | if (vals != null) { 35 | val[0] = vals.length > 0 ? vals[0] : 0; 36 | val[1] = vals.length > 1 ? vals[1] : 0; 37 | val[2] = vals.length > 2 ? vals[2] : 0; 38 | val[3] = vals.length > 3 ? vals[3] : 0; 39 | } else 40 | val[0] = val[1] = val[2] = val[3] = 0; 41 | } 42 | 43 | public static Scalar all(double v) { 44 | return new Scalar(v, v, v, v); 45 | } 46 | 47 | public Scalar clone() { 48 | return new Scalar(val); 49 | } 50 | 51 | public Scalar mul(Scalar it, double scale) { 52 | return new Scalar(val[0] * it.val[0] * scale, val[1] * it.val[1] * scale, 53 | val[2] * it.val[2] * scale, val[3] * it.val[3] * scale); 54 | } 55 | 56 | public Scalar mul(Scalar it) { 57 | return mul(it, 1); 58 | } 59 | 60 | public Scalar conj() { 61 | return new Scalar(val[0], -val[1], -val[2], -val[3]); 62 | } 63 | 64 | public boolean isReal() { 65 | return val[1] == 0 && val[2] == 0 && val[3] == 0; 66 | } 67 | 68 | @Override 69 | public int hashCode() { 70 | final int prime = 31; 71 | int result = 1; 72 | result = prime * result + java.util.Arrays.hashCode(val); 73 | return result; 74 | } 75 | 76 | @Override 77 | public boolean equals(Object obj) { 78 | if (this == obj) return true; 79 | if (!(obj instanceof Scalar)) return false; 80 | Scalar it = (Scalar) obj; 81 | if (!java.util.Arrays.equals(val, it.val)) return false; 82 | return true; 83 | } 84 | 85 | @Override 86 | public String toString() { 87 | return "[" + val[0] + ", " + val[1] + ", " + val[2] + ", " + val[3] + "]"; 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/Size.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | //javadoc:Size_ 4 | public class Size { 5 | 6 | public double width, height; 7 | 8 | public Size(double width, double height) { 9 | this.width = width; 10 | this.height = height; 11 | } 12 | 13 | public Size() { 14 | this(0, 0); 15 | } 16 | 17 | public Size(Point p) { 18 | width = p.x; 19 | height = p.y; 20 | } 21 | 22 | public Size(double[] vals) { 23 | set(vals); 24 | } 25 | 26 | public void set(double[] vals) { 27 | if (vals != null) { 28 | width = vals.length > 0 ? vals[0] : 0; 29 | height = vals.length > 1 ? vals[1] : 0; 30 | } else { 31 | width = 0; 32 | height = 0; 33 | } 34 | } 35 | 36 | public double area() { 37 | return width * height; 38 | } 39 | 40 | public boolean empty() { 41 | return width <= 0 || height <= 0; 42 | } 43 | 44 | public Size clone() { 45 | return new Size(width, height); 46 | } 47 | 48 | @Override 49 | public int hashCode() { 50 | final int prime = 31; 51 | int result = 1; 52 | long temp; 53 | temp = Double.doubleToLongBits(height); 54 | result = prime * result + (int) (temp ^ (temp >>> 32)); 55 | temp = Double.doubleToLongBits(width); 56 | result = prime * result + (int) (temp ^ (temp >>> 32)); 57 | return result; 58 | } 59 | 60 | @Override 61 | public boolean equals(Object obj) { 62 | if (this == obj) return true; 63 | if (!(obj instanceof Size)) return false; 64 | Size it = (Size) obj; 65 | return width == it.width && height == it.height; 66 | } 67 | 68 | @Override 69 | public String toString() { 70 | return (int)width + "x" + (int)height; 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/core/TermCriteria.java: -------------------------------------------------------------------------------- 1 | package org.opencv.core; 2 | 3 | //javadoc:TermCriteria 4 | public class TermCriteria { 5 | 6 | /** 7 | * The maximum number of iterations or elements to compute 8 | */ 9 | public static final int COUNT = 1; 10 | /** 11 | * The maximum number of iterations or elements to compute 12 | */ 13 | public static final int MAX_ITER = COUNT; 14 | /** 15 | * The desired accuracy threshold or change in parameters at which the iterative algorithm is terminated. 16 | */ 17 | public static final int EPS = 2; 18 | 19 | public int type; 20 | public int maxCount; 21 | public double epsilon; 22 | 23 | /** 24 | * Termination criteria for iterative algorithms. 25 | * 26 | * @param type 27 | * the type of termination criteria: COUNT, EPS or COUNT + EPS. 28 | * @param maxCount 29 | * the maximum number of iterations/elements. 30 | * @param epsilon 31 | * the desired accuracy. 32 | */ 33 | public TermCriteria(int type, int maxCount, double epsilon) { 34 | this.type = type; 35 | this.maxCount = maxCount; 36 | this.epsilon = epsilon; 37 | } 38 | 39 | /** 40 | * Termination criteria for iterative algorithms. 41 | */ 42 | public TermCriteria() { 43 | this(0, 0, 0.0); 44 | } 45 | 46 | public TermCriteria(double[] vals) { 47 | set(vals); 48 | } 49 | 50 | public void set(double[] vals) { 51 | if (vals != null) { 52 | type = vals.length > 0 ? (int) vals[0] : 0; 53 | maxCount = vals.length > 1 ? (int) vals[1] : 0; 54 | epsilon = vals.length > 2 ? (double) vals[2] : 0; 55 | } else { 56 | type = 0; 57 | maxCount = 0; 58 | epsilon = 0; 59 | } 60 | } 61 | 62 | public TermCriteria clone() { 63 | return new TermCriteria(type, maxCount, epsilon); 64 | } 65 | 66 | @Override 67 | public int hashCode() { 68 | final int prime = 31; 69 | int result = 1; 70 | long temp; 71 | temp = Double.doubleToLongBits(type); 72 | result = prime * result + (int) (temp ^ (temp >>> 32)); 73 | temp = Double.doubleToLongBits(maxCount); 74 | result = prime * result + (int) (temp ^ (temp >>> 32)); 75 | temp = Double.doubleToLongBits(epsilon); 76 | result = prime * result + (int) (temp ^ (temp >>> 32)); 77 | return result; 78 | } 79 | 80 | @Override 81 | public boolean equals(Object obj) { 82 | if (this == obj) return true; 83 | if (!(obj instanceof TermCriteria)) return false; 84 | TermCriteria it = (TermCriteria) obj; 85 | return type == it.type && maxCount == it.maxCount && epsilon == it.epsilon; 86 | } 87 | 88 | @Override 89 | public String toString() { 90 | return "{ type: " + type + ", maxCount: " + maxCount + ", epsilon: " + epsilon + "}"; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/dnn/Importer.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.dnn; 6 | 7 | import org.opencv.core.Algorithm; 8 | 9 | // C++: class Importer 10 | //javadoc: Importer 11 | public class Importer extends Algorithm { 12 | 13 | protected Importer(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: void populateNet(Net net) 18 | // 19 | 20 | //javadoc: Importer::populateNet(net) 21 | public void populateNet(Net net) 22 | { 23 | 24 | populateNet_0(nativeObj, net.nativeObj); 25 | 26 | return; 27 | } 28 | 29 | 30 | @Override 31 | protected void finalize() throws Throwable { 32 | delete(nativeObj); 33 | } 34 | 35 | 36 | 37 | // C++: void populateNet(Net net) 38 | private static native void populateNet_0(long nativeObj, long net_nativeObj); 39 | 40 | // native support for java finalize() 41 | private static native void delete(long nativeObj); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/features2d/BFMatcher.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.features2d; 6 | 7 | 8 | 9 | // C++: class BFMatcher 10 | //javadoc: BFMatcher 11 | public class BFMatcher extends DescriptorMatcher { 12 | 13 | protected BFMatcher(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: BFMatcher(int normType = NORM_L2, bool crossCheck = false) 18 | // 19 | 20 | //javadoc: BFMatcher::BFMatcher(normType, crossCheck) 21 | public BFMatcher(int normType, boolean crossCheck) 22 | { 23 | 24 | super( BFMatcher_0(normType, crossCheck) ); 25 | 26 | return; 27 | } 28 | 29 | //javadoc: BFMatcher::BFMatcher() 30 | public BFMatcher() 31 | { 32 | 33 | super( BFMatcher_1() ); 34 | 35 | return; 36 | } 37 | 38 | 39 | // 40 | // C++: static Ptr_BFMatcher create(int normType = NORM_L2, bool crossCheck = false) 41 | // 42 | 43 | //javadoc: BFMatcher::create(normType, crossCheck) 44 | public static BFMatcher create(int normType, boolean crossCheck) 45 | { 46 | 47 | BFMatcher retVal = new BFMatcher(create_0(normType, crossCheck)); 48 | 49 | return retVal; 50 | } 51 | 52 | //javadoc: BFMatcher::create() 53 | public static BFMatcher create() 54 | { 55 | 56 | BFMatcher retVal = new BFMatcher(create_1()); 57 | 58 | return retVal; 59 | } 60 | 61 | 62 | @Override 63 | protected void finalize() throws Throwable { 64 | delete(nativeObj); 65 | } 66 | 67 | 68 | 69 | // C++: BFMatcher(int normType = NORM_L2, bool crossCheck = false) 70 | private static native long BFMatcher_0(int normType, boolean crossCheck); 71 | private static native long BFMatcher_1(); 72 | 73 | // C++: static Ptr_BFMatcher create(int normType = NORM_L2, bool crossCheck = false) 74 | private static native long create_0(int normType, boolean crossCheck); 75 | private static native long create_1(); 76 | 77 | // native support for java finalize() 78 | private static native void delete(long nativeObj); 79 | 80 | } 81 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/features2d/BOWKMeansTrainer.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.features2d; 6 | 7 | import org.opencv.core.Mat; 8 | import org.opencv.core.TermCriteria; 9 | 10 | // C++: class BOWKMeansTrainer 11 | //javadoc: BOWKMeansTrainer 12 | public class BOWKMeansTrainer extends BOWTrainer { 13 | 14 | protected BOWKMeansTrainer(long addr) { super(addr); } 15 | 16 | 17 | // 18 | // C++: BOWKMeansTrainer(int clusterCount, TermCriteria termcrit = TermCriteria(), int attempts = 3, int flags = KMEANS_PP_CENTERS) 19 | // 20 | 21 | //javadoc: BOWKMeansTrainer::BOWKMeansTrainer(clusterCount, termcrit, attempts, flags) 22 | public BOWKMeansTrainer(int clusterCount, TermCriteria termcrit, int attempts, int flags) 23 | { 24 | 25 | super( BOWKMeansTrainer_0(clusterCount, termcrit.type, termcrit.maxCount, termcrit.epsilon, attempts, flags) ); 26 | 27 | return; 28 | } 29 | 30 | //javadoc: BOWKMeansTrainer::BOWKMeansTrainer(clusterCount) 31 | public BOWKMeansTrainer(int clusterCount) 32 | { 33 | 34 | super( BOWKMeansTrainer_1(clusterCount) ); 35 | 36 | return; 37 | } 38 | 39 | 40 | // 41 | // C++: Mat cluster(Mat descriptors) 42 | // 43 | 44 | //javadoc: BOWKMeansTrainer::cluster(descriptors) 45 | public Mat cluster(Mat descriptors) 46 | { 47 | 48 | Mat retVal = new Mat(cluster_0(nativeObj, descriptors.nativeObj)); 49 | 50 | return retVal; 51 | } 52 | 53 | 54 | // 55 | // C++: Mat cluster() 56 | // 57 | 58 | //javadoc: BOWKMeansTrainer::cluster() 59 | public Mat cluster() 60 | { 61 | 62 | Mat retVal = new Mat(cluster_1(nativeObj)); 63 | 64 | return retVal; 65 | } 66 | 67 | 68 | @Override 69 | protected void finalize() throws Throwable { 70 | delete(nativeObj); 71 | } 72 | 73 | 74 | 75 | // C++: BOWKMeansTrainer(int clusterCount, TermCriteria termcrit = TermCriteria(), int attempts = 3, int flags = KMEANS_PP_CENTERS) 76 | private static native long BOWKMeansTrainer_0(int clusterCount, int termcrit_type, int termcrit_maxCount, double termcrit_epsilon, int attempts, int flags); 77 | private static native long BOWKMeansTrainer_1(int clusterCount); 78 | 79 | // C++: Mat cluster(Mat descriptors) 80 | private static native long cluster_0(long nativeObj, long descriptors_nativeObj); 81 | 82 | // C++: Mat cluster() 83 | private static native long cluster_1(long nativeObj); 84 | 85 | // native support for java finalize() 86 | private static native void delete(long nativeObj); 87 | 88 | } 89 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/features2d/BRISK.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.features2d; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import org.opencv.core.Mat; 10 | import org.opencv.core.MatOfFloat; 11 | import org.opencv.core.MatOfInt; 12 | import org.opencv.utils.Converters; 13 | 14 | // C++: class BRISK 15 | //javadoc: BRISK 16 | public class BRISK extends Feature2D { 17 | 18 | protected BRISK(long addr) { super(addr); } 19 | 20 | 21 | // 22 | // C++: static Ptr_BRISK create(int thresh = 30, int octaves = 3, float patternScale = 1.0f) 23 | // 24 | 25 | //javadoc: BRISK::create(thresh, octaves, patternScale) 26 | public static BRISK create(int thresh, int octaves, float patternScale) 27 | { 28 | 29 | BRISK retVal = new BRISK(create_0(thresh, octaves, patternScale)); 30 | 31 | return retVal; 32 | } 33 | 34 | //javadoc: BRISK::create() 35 | public static BRISK create() 36 | { 37 | 38 | BRISK retVal = new BRISK(create_1()); 39 | 40 | return retVal; 41 | } 42 | 43 | 44 | // 45 | // C++: static Ptr_BRISK create(vector_float radiusList, vector_int numberList, float dMax = 5.85f, float dMin = 8.2f, vector_int indexChange = std::vector()) 46 | // 47 | 48 | //javadoc: BRISK::create(radiusList, numberList, dMax, dMin, indexChange) 49 | public static BRISK create(MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin, MatOfInt indexChange) 50 | { 51 | Mat radiusList_mat = radiusList; 52 | Mat numberList_mat = numberList; 53 | Mat indexChange_mat = indexChange; 54 | BRISK retVal = new BRISK(create_2(radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin, indexChange_mat.nativeObj)); 55 | 56 | return retVal; 57 | } 58 | 59 | //javadoc: BRISK::create(radiusList, numberList) 60 | public static BRISK create(MatOfFloat radiusList, MatOfInt numberList) 61 | { 62 | Mat radiusList_mat = radiusList; 63 | Mat numberList_mat = numberList; 64 | BRISK retVal = new BRISK(create_3(radiusList_mat.nativeObj, numberList_mat.nativeObj)); 65 | 66 | return retVal; 67 | } 68 | 69 | 70 | @Override 71 | protected void finalize() throws Throwable { 72 | delete(nativeObj); 73 | } 74 | 75 | 76 | 77 | // C++: static Ptr_BRISK create(int thresh = 30, int octaves = 3, float patternScale = 1.0f) 78 | private static native long create_0(int thresh, int octaves, float patternScale); 79 | private static native long create_1(); 80 | 81 | // C++: static Ptr_BRISK create(vector_float radiusList, vector_int numberList, float dMax = 5.85f, float dMin = 8.2f, vector_int indexChange = std::vector()) 82 | private static native long create_2(long radiusList_mat_nativeObj, long numberList_mat_nativeObj, float dMax, float dMin, long indexChange_mat_nativeObj); 83 | private static native long create_3(long radiusList_mat_nativeObj, long numberList_mat_nativeObj); 84 | 85 | // native support for java finalize() 86 | private static native void delete(long nativeObj); 87 | 88 | } 89 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/features2d/FlannBasedMatcher.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.features2d; 6 | 7 | 8 | 9 | // C++: class FlannBasedMatcher 10 | //javadoc: FlannBasedMatcher 11 | public class FlannBasedMatcher extends DescriptorMatcher { 12 | 13 | protected FlannBasedMatcher(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: FlannBasedMatcher(Ptr_flann_IndexParams indexParams = makePtr(), Ptr_flann_SearchParams searchParams = makePtr()) 18 | // 19 | 20 | //javadoc: FlannBasedMatcher::FlannBasedMatcher() 21 | public FlannBasedMatcher() 22 | { 23 | 24 | super( FlannBasedMatcher_0() ); 25 | 26 | return; 27 | } 28 | 29 | 30 | // 31 | // C++: static Ptr_FlannBasedMatcher create() 32 | // 33 | 34 | //javadoc: FlannBasedMatcher::create() 35 | public static FlannBasedMatcher create() 36 | { 37 | 38 | FlannBasedMatcher retVal = new FlannBasedMatcher(create_0()); 39 | 40 | return retVal; 41 | } 42 | 43 | 44 | @Override 45 | protected void finalize() throws Throwable { 46 | delete(nativeObj); 47 | } 48 | 49 | 50 | 51 | // C++: FlannBasedMatcher(Ptr_flann_IndexParams indexParams = makePtr(), Ptr_flann_SearchParams searchParams = makePtr()) 52 | private static native long FlannBasedMatcher_0(); 53 | 54 | // C++: static Ptr_FlannBasedMatcher create() 55 | private static native long create_0(); 56 | 57 | // native support for java finalize() 58 | private static native void delete(long nativeObj); 59 | 60 | } 61 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/ml/Ml.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.ml; 6 | 7 | 8 | 9 | public class Ml { 10 | 11 | public static final int 12 | VAR_NUMERICAL = 0, 13 | VAR_ORDERED = 0, 14 | VAR_CATEGORICAL = 1, 15 | TEST_ERROR = 0, 16 | TRAIN_ERROR = 1, 17 | ROW_SAMPLE = 0, 18 | COL_SAMPLE = 1; 19 | 20 | 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/objdetect/BaseCascadeClassifier.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.objdetect; 6 | 7 | import org.opencv.core.Algorithm; 8 | 9 | // C++: class BaseCascadeClassifier 10 | //javadoc: BaseCascadeClassifier 11 | public class BaseCascadeClassifier extends Algorithm { 12 | 13 | protected BaseCascadeClassifier(long addr) { super(addr); } 14 | 15 | 16 | @Override 17 | protected void finalize() throws Throwable { 18 | delete(nativeObj); 19 | } 20 | 21 | 22 | 23 | // native support for java finalize() 24 | private static native void delete(long nativeObj); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/objdetect/Objdetect.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.objdetect; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import org.opencv.core.Mat; 10 | import org.opencv.core.MatOfInt; 11 | import org.opencv.core.MatOfRect; 12 | import org.opencv.utils.Converters; 13 | 14 | public class Objdetect { 15 | 16 | public static final int 17 | CASCADE_DO_CANNY_PRUNING = 1, 18 | CASCADE_SCALE_IMAGE = 2, 19 | CASCADE_FIND_BIGGEST_OBJECT = 4, 20 | CASCADE_DO_ROUGH_SEARCH = 8; 21 | 22 | 23 | // 24 | // C++: void groupRectangles(vector_Rect& rectList, vector_int& weights, int groupThreshold, double eps = 0.2) 25 | // 26 | 27 | //javadoc: groupRectangles(rectList, weights, groupThreshold, eps) 28 | public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold, double eps) 29 | { 30 | Mat rectList_mat = rectList; 31 | Mat weights_mat = weights; 32 | groupRectangles_0(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold, eps); 33 | 34 | return; 35 | } 36 | 37 | //javadoc: groupRectangles(rectList, weights, groupThreshold) 38 | public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold) 39 | { 40 | Mat rectList_mat = rectList; 41 | Mat weights_mat = weights; 42 | groupRectangles_1(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold); 43 | 44 | return; 45 | } 46 | 47 | 48 | 49 | 50 | // C++: void groupRectangles(vector_Rect& rectList, vector_int& weights, int groupThreshold, double eps = 0.2) 51 | private static native void groupRectangles_0(long rectList_mat_nativeObj, long weights_mat_nativeObj, int groupThreshold, double eps); 52 | private static native void groupRectangles_1(long rectList_mat_nativeObj, long weights_mat_nativeObj, int groupThreshold); 53 | 54 | } 55 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/osgi/OpenCVInterface.java: -------------------------------------------------------------------------------- 1 | package org.opencv.osgi; 2 | 3 | /** 4 | * Dummy interface to allow some integration testing within OSGi implementation. 5 | */ 6 | public interface OpenCVInterface 7 | { 8 | } 9 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/osgi/OpenCVNativeLoader.java: -------------------------------------------------------------------------------- 1 | package org.opencv.osgi; 2 | 3 | import java.util.logging.Level; 4 | import java.util.logging.Logger; 5 | 6 | /** 7 | * This class is intended to provide a convenient way to load OpenCV's native 8 | * library from the Java bundle. If Blueprint is enabled in the OSGi container 9 | * this class will be instantiated automatically and the init() method called 10 | * loading the native library. 11 | */ 12 | public class OpenCVNativeLoader implements OpenCVInterface { 13 | 14 | public void init() { 15 | System.loadLibrary("opencv_java3"); 16 | Logger.getLogger("org.opencv.osgi").log(Level.INFO, "Successfully loaded OpenCV native library."); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/photo/AlignExposures.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.photo; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import org.opencv.core.Algorithm; 10 | import org.opencv.core.Mat; 11 | import org.opencv.utils.Converters; 12 | 13 | // C++: class AlignExposures 14 | //javadoc: AlignExposures 15 | public class AlignExposures extends Algorithm { 16 | 17 | protected AlignExposures(long addr) { super(addr); } 18 | 19 | 20 | // 21 | // C++: void process(vector_Mat src, vector_Mat dst, Mat times, Mat response) 22 | // 23 | 24 | //javadoc: AlignExposures::process(src, dst, times, response) 25 | public void process(List src, List dst, Mat times, Mat response) 26 | { 27 | Mat src_mat = Converters.vector_Mat_to_Mat(src); 28 | Mat dst_mat = Converters.vector_Mat_to_Mat(dst); 29 | process_0(nativeObj, src_mat.nativeObj, dst_mat.nativeObj, times.nativeObj, response.nativeObj); 30 | 31 | return; 32 | } 33 | 34 | 35 | @Override 36 | protected void finalize() throws Throwable { 37 | delete(nativeObj); 38 | } 39 | 40 | 41 | 42 | // C++: void process(vector_Mat src, vector_Mat dst, Mat times, Mat response) 43 | private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_mat_nativeObj, long times_nativeObj, long response_nativeObj); 44 | 45 | // native support for java finalize() 46 | private static native void delete(long nativeObj); 47 | 48 | } 49 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/photo/CalibrateCRF.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.photo; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import org.opencv.core.Algorithm; 10 | import org.opencv.core.Mat; 11 | import org.opencv.utils.Converters; 12 | 13 | // C++: class CalibrateCRF 14 | //javadoc: CalibrateCRF 15 | public class CalibrateCRF extends Algorithm { 16 | 17 | protected CalibrateCRF(long addr) { super(addr); } 18 | 19 | 20 | // 21 | // C++: void process(vector_Mat src, Mat& dst, Mat times) 22 | // 23 | 24 | //javadoc: CalibrateCRF::process(src, dst, times) 25 | public void process(List src, Mat dst, Mat times) 26 | { 27 | Mat src_mat = Converters.vector_Mat_to_Mat(src); 28 | process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj); 29 | 30 | return; 31 | } 32 | 33 | 34 | @Override 35 | protected void finalize() throws Throwable { 36 | delete(nativeObj); 37 | } 38 | 39 | 40 | 41 | // C++: void process(vector_Mat src, Mat& dst, Mat times) 42 | private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj); 43 | 44 | // native support for java finalize() 45 | private static native void delete(long nativeObj); 46 | 47 | } 48 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/photo/CalibrateDebevec.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.photo; 6 | 7 | 8 | 9 | // C++: class CalibrateDebevec 10 | //javadoc: CalibrateDebevec 11 | public class CalibrateDebevec extends CalibrateCRF { 12 | 13 | protected CalibrateDebevec(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: bool getRandom() 18 | // 19 | 20 | //javadoc: CalibrateDebevec::getRandom() 21 | public boolean getRandom() 22 | { 23 | 24 | boolean retVal = getRandom_0(nativeObj); 25 | 26 | return retVal; 27 | } 28 | 29 | 30 | // 31 | // C++: float getLambda() 32 | // 33 | 34 | //javadoc: CalibrateDebevec::getLambda() 35 | public float getLambda() 36 | { 37 | 38 | float retVal = getLambda_0(nativeObj); 39 | 40 | return retVal; 41 | } 42 | 43 | 44 | // 45 | // C++: int getSamples() 46 | // 47 | 48 | //javadoc: CalibrateDebevec::getSamples() 49 | public int getSamples() 50 | { 51 | 52 | int retVal = getSamples_0(nativeObj); 53 | 54 | return retVal; 55 | } 56 | 57 | 58 | // 59 | // C++: void setLambda(float lambda) 60 | // 61 | 62 | //javadoc: CalibrateDebevec::setLambda(lambda) 63 | public void setLambda(float lambda) 64 | { 65 | 66 | setLambda_0(nativeObj, lambda); 67 | 68 | return; 69 | } 70 | 71 | 72 | // 73 | // C++: void setRandom(bool random) 74 | // 75 | 76 | //javadoc: CalibrateDebevec::setRandom(random) 77 | public void setRandom(boolean random) 78 | { 79 | 80 | setRandom_0(nativeObj, random); 81 | 82 | return; 83 | } 84 | 85 | 86 | // 87 | // C++: void setSamples(int samples) 88 | // 89 | 90 | //javadoc: CalibrateDebevec::setSamples(samples) 91 | public void setSamples(int samples) 92 | { 93 | 94 | setSamples_0(nativeObj, samples); 95 | 96 | return; 97 | } 98 | 99 | 100 | @Override 101 | protected void finalize() throws Throwable { 102 | delete(nativeObj); 103 | } 104 | 105 | 106 | 107 | // C++: bool getRandom() 108 | private static native boolean getRandom_0(long nativeObj); 109 | 110 | // C++: float getLambda() 111 | private static native float getLambda_0(long nativeObj); 112 | 113 | // C++: int getSamples() 114 | private static native int getSamples_0(long nativeObj); 115 | 116 | // C++: void setLambda(float lambda) 117 | private static native void setLambda_0(long nativeObj, float lambda); 118 | 119 | // C++: void setRandom(bool random) 120 | private static native void setRandom_0(long nativeObj, boolean random); 121 | 122 | // C++: void setSamples(int samples) 123 | private static native void setSamples_0(long nativeObj, int samples); 124 | 125 | // native support for java finalize() 126 | private static native void delete(long nativeObj); 127 | 128 | } 129 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/photo/CalibrateRobertson.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.photo; 6 | 7 | import org.opencv.core.Mat; 8 | 9 | // C++: class CalibrateRobertson 10 | //javadoc: CalibrateRobertson 11 | public class CalibrateRobertson extends CalibrateCRF { 12 | 13 | protected CalibrateRobertson(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: Mat getRadiance() 18 | // 19 | 20 | //javadoc: CalibrateRobertson::getRadiance() 21 | public Mat getRadiance() 22 | { 23 | 24 | Mat retVal = new Mat(getRadiance_0(nativeObj)); 25 | 26 | return retVal; 27 | } 28 | 29 | 30 | // 31 | // C++: float getThreshold() 32 | // 33 | 34 | //javadoc: CalibrateRobertson::getThreshold() 35 | public float getThreshold() 36 | { 37 | 38 | float retVal = getThreshold_0(nativeObj); 39 | 40 | return retVal; 41 | } 42 | 43 | 44 | // 45 | // C++: int getMaxIter() 46 | // 47 | 48 | //javadoc: CalibrateRobertson::getMaxIter() 49 | public int getMaxIter() 50 | { 51 | 52 | int retVal = getMaxIter_0(nativeObj); 53 | 54 | return retVal; 55 | } 56 | 57 | 58 | // 59 | // C++: void setMaxIter(int max_iter) 60 | // 61 | 62 | //javadoc: CalibrateRobertson::setMaxIter(max_iter) 63 | public void setMaxIter(int max_iter) 64 | { 65 | 66 | setMaxIter_0(nativeObj, max_iter); 67 | 68 | return; 69 | } 70 | 71 | 72 | // 73 | // C++: void setThreshold(float threshold) 74 | // 75 | 76 | //javadoc: CalibrateRobertson::setThreshold(threshold) 77 | public void setThreshold(float threshold) 78 | { 79 | 80 | setThreshold_0(nativeObj, threshold); 81 | 82 | return; 83 | } 84 | 85 | 86 | @Override 87 | protected void finalize() throws Throwable { 88 | delete(nativeObj); 89 | } 90 | 91 | 92 | 93 | // C++: Mat getRadiance() 94 | private static native long getRadiance_0(long nativeObj); 95 | 96 | // C++: float getThreshold() 97 | private static native float getThreshold_0(long nativeObj); 98 | 99 | // C++: int getMaxIter() 100 | private static native int getMaxIter_0(long nativeObj); 101 | 102 | // C++: void setMaxIter(int max_iter) 103 | private static native void setMaxIter_0(long nativeObj, int max_iter); 104 | 105 | // C++: void setThreshold(float threshold) 106 | private static native void setThreshold_0(long nativeObj, float threshold); 107 | 108 | // native support for java finalize() 109 | private static native void delete(long nativeObj); 110 | 111 | } 112 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/photo/MergeDebevec.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.photo; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import org.opencv.core.Mat; 10 | import org.opencv.utils.Converters; 11 | 12 | // C++: class MergeDebevec 13 | //javadoc: MergeDebevec 14 | public class MergeDebevec extends MergeExposures { 15 | 16 | protected MergeDebevec(long addr) { super(addr); } 17 | 18 | 19 | // 20 | // C++: void process(vector_Mat src, Mat& dst, Mat times, Mat response) 21 | // 22 | 23 | //javadoc: MergeDebevec::process(src, dst, times, response) 24 | public void process(List src, Mat dst, Mat times, Mat response) 25 | { 26 | Mat src_mat = Converters.vector_Mat_to_Mat(src); 27 | process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj); 28 | 29 | return; 30 | } 31 | 32 | 33 | // 34 | // C++: void process(vector_Mat src, Mat& dst, Mat times) 35 | // 36 | 37 | //javadoc: MergeDebevec::process(src, dst, times) 38 | public void process(List src, Mat dst, Mat times) 39 | { 40 | Mat src_mat = Converters.vector_Mat_to_Mat(src); 41 | process_1(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj); 42 | 43 | return; 44 | } 45 | 46 | 47 | @Override 48 | protected void finalize() throws Throwable { 49 | delete(nativeObj); 50 | } 51 | 52 | 53 | 54 | // C++: void process(vector_Mat src, Mat& dst, Mat times, Mat response) 55 | private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj); 56 | 57 | // C++: void process(vector_Mat src, Mat& dst, Mat times) 58 | private static native void process_1(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj); 59 | 60 | // native support for java finalize() 61 | private static native void delete(long nativeObj); 62 | 63 | } 64 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/photo/MergeExposures.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.photo; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import org.opencv.core.Algorithm; 10 | import org.opencv.core.Mat; 11 | import org.opencv.utils.Converters; 12 | 13 | // C++: class MergeExposures 14 | //javadoc: MergeExposures 15 | public class MergeExposures extends Algorithm { 16 | 17 | protected MergeExposures(long addr) { super(addr); } 18 | 19 | 20 | // 21 | // C++: void process(vector_Mat src, Mat& dst, Mat times, Mat response) 22 | // 23 | 24 | //javadoc: MergeExposures::process(src, dst, times, response) 25 | public void process(List src, Mat dst, Mat times, Mat response) 26 | { 27 | Mat src_mat = Converters.vector_Mat_to_Mat(src); 28 | process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj); 29 | 30 | return; 31 | } 32 | 33 | 34 | @Override 35 | protected void finalize() throws Throwable { 36 | delete(nativeObj); 37 | } 38 | 39 | 40 | 41 | // C++: void process(vector_Mat src, Mat& dst, Mat times, Mat response) 42 | private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj); 43 | 44 | // native support for java finalize() 45 | private static native void delete(long nativeObj); 46 | 47 | } 48 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/photo/MergeRobertson.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.photo; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import org.opencv.core.Mat; 10 | import org.opencv.utils.Converters; 11 | 12 | // C++: class MergeRobertson 13 | //javadoc: MergeRobertson 14 | public class MergeRobertson extends MergeExposures { 15 | 16 | protected MergeRobertson(long addr) { super(addr); } 17 | 18 | 19 | // 20 | // C++: void process(vector_Mat src, Mat& dst, Mat times, Mat response) 21 | // 22 | 23 | //javadoc: MergeRobertson::process(src, dst, times, response) 24 | public void process(List src, Mat dst, Mat times, Mat response) 25 | { 26 | Mat src_mat = Converters.vector_Mat_to_Mat(src); 27 | process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj); 28 | 29 | return; 30 | } 31 | 32 | 33 | // 34 | // C++: void process(vector_Mat src, Mat& dst, Mat times) 35 | // 36 | 37 | //javadoc: MergeRobertson::process(src, dst, times) 38 | public void process(List src, Mat dst, Mat times) 39 | { 40 | Mat src_mat = Converters.vector_Mat_to_Mat(src); 41 | process_1(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj); 42 | 43 | return; 44 | } 45 | 46 | 47 | @Override 48 | protected void finalize() throws Throwable { 49 | delete(nativeObj); 50 | } 51 | 52 | 53 | 54 | // C++: void process(vector_Mat src, Mat& dst, Mat times, Mat response) 55 | private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj); 56 | 57 | // C++: void process(vector_Mat src, Mat& dst, Mat times) 58 | private static native void process_1(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj); 59 | 60 | // native support for java finalize() 61 | private static native void delete(long nativeObj); 62 | 63 | } 64 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/photo/Tonemap.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.photo; 6 | 7 | import org.opencv.core.Algorithm; 8 | import org.opencv.core.Mat; 9 | 10 | // C++: class Tonemap 11 | //javadoc: Tonemap 12 | public class Tonemap extends Algorithm { 13 | 14 | protected Tonemap(long addr) { super(addr); } 15 | 16 | 17 | // 18 | // C++: float getGamma() 19 | // 20 | 21 | //javadoc: Tonemap::getGamma() 22 | public float getGamma() 23 | { 24 | 25 | float retVal = getGamma_0(nativeObj); 26 | 27 | return retVal; 28 | } 29 | 30 | 31 | // 32 | // C++: void process(Mat src, Mat& dst) 33 | // 34 | 35 | //javadoc: Tonemap::process(src, dst) 36 | public void process(Mat src, Mat dst) 37 | { 38 | 39 | process_0(nativeObj, src.nativeObj, dst.nativeObj); 40 | 41 | return; 42 | } 43 | 44 | 45 | // 46 | // C++: void setGamma(float gamma) 47 | // 48 | 49 | //javadoc: Tonemap::setGamma(gamma) 50 | public void setGamma(float gamma) 51 | { 52 | 53 | setGamma_0(nativeObj, gamma); 54 | 55 | return; 56 | } 57 | 58 | 59 | @Override 60 | protected void finalize() throws Throwable { 61 | delete(nativeObj); 62 | } 63 | 64 | 65 | 66 | // C++: float getGamma() 67 | private static native float getGamma_0(long nativeObj); 68 | 69 | // C++: void process(Mat src, Mat& dst) 70 | private static native void process_0(long nativeObj, long src_nativeObj, long dst_nativeObj); 71 | 72 | // C++: void setGamma(float gamma) 73 | private static native void setGamma_0(long nativeObj, float gamma); 74 | 75 | // native support for java finalize() 76 | private static native void delete(long nativeObj); 77 | 78 | } 79 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/photo/TonemapDrago.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.photo; 6 | 7 | 8 | 9 | // C++: class TonemapDrago 10 | //javadoc: TonemapDrago 11 | public class TonemapDrago extends Tonemap { 12 | 13 | protected TonemapDrago(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: float getBias() 18 | // 19 | 20 | //javadoc: TonemapDrago::getBias() 21 | public float getBias() 22 | { 23 | 24 | float retVal = getBias_0(nativeObj); 25 | 26 | return retVal; 27 | } 28 | 29 | 30 | // 31 | // C++: float getSaturation() 32 | // 33 | 34 | //javadoc: TonemapDrago::getSaturation() 35 | public float getSaturation() 36 | { 37 | 38 | float retVal = getSaturation_0(nativeObj); 39 | 40 | return retVal; 41 | } 42 | 43 | 44 | // 45 | // C++: void setBias(float bias) 46 | // 47 | 48 | //javadoc: TonemapDrago::setBias(bias) 49 | public void setBias(float bias) 50 | { 51 | 52 | setBias_0(nativeObj, bias); 53 | 54 | return; 55 | } 56 | 57 | 58 | // 59 | // C++: void setSaturation(float saturation) 60 | // 61 | 62 | //javadoc: TonemapDrago::setSaturation(saturation) 63 | public void setSaturation(float saturation) 64 | { 65 | 66 | setSaturation_0(nativeObj, saturation); 67 | 68 | return; 69 | } 70 | 71 | 72 | @Override 73 | protected void finalize() throws Throwable { 74 | delete(nativeObj); 75 | } 76 | 77 | 78 | 79 | // C++: float getBias() 80 | private static native float getBias_0(long nativeObj); 81 | 82 | // C++: float getSaturation() 83 | private static native float getSaturation_0(long nativeObj); 84 | 85 | // C++: void setBias(float bias) 86 | private static native void setBias_0(long nativeObj, float bias); 87 | 88 | // C++: void setSaturation(float saturation) 89 | private static native void setSaturation_0(long nativeObj, float saturation); 90 | 91 | // native support for java finalize() 92 | private static native void delete(long nativeObj); 93 | 94 | } 95 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/photo/TonemapMantiuk.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.photo; 6 | 7 | 8 | 9 | // C++: class TonemapMantiuk 10 | //javadoc: TonemapMantiuk 11 | public class TonemapMantiuk extends Tonemap { 12 | 13 | protected TonemapMantiuk(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: float getSaturation() 18 | // 19 | 20 | //javadoc: TonemapMantiuk::getSaturation() 21 | public float getSaturation() 22 | { 23 | 24 | float retVal = getSaturation_0(nativeObj); 25 | 26 | return retVal; 27 | } 28 | 29 | 30 | // 31 | // C++: float getScale() 32 | // 33 | 34 | //javadoc: TonemapMantiuk::getScale() 35 | public float getScale() 36 | { 37 | 38 | float retVal = getScale_0(nativeObj); 39 | 40 | return retVal; 41 | } 42 | 43 | 44 | // 45 | // C++: void setSaturation(float saturation) 46 | // 47 | 48 | //javadoc: TonemapMantiuk::setSaturation(saturation) 49 | public void setSaturation(float saturation) 50 | { 51 | 52 | setSaturation_0(nativeObj, saturation); 53 | 54 | return; 55 | } 56 | 57 | 58 | // 59 | // C++: void setScale(float scale) 60 | // 61 | 62 | //javadoc: TonemapMantiuk::setScale(scale) 63 | public void setScale(float scale) 64 | { 65 | 66 | setScale_0(nativeObj, scale); 67 | 68 | return; 69 | } 70 | 71 | 72 | @Override 73 | protected void finalize() throws Throwable { 74 | delete(nativeObj); 75 | } 76 | 77 | 78 | 79 | // C++: float getSaturation() 80 | private static native float getSaturation_0(long nativeObj); 81 | 82 | // C++: float getScale() 83 | private static native float getScale_0(long nativeObj); 84 | 85 | // C++: void setSaturation(float saturation) 86 | private static native void setSaturation_0(long nativeObj, float saturation); 87 | 88 | // C++: void setScale(float scale) 89 | private static native void setScale_0(long nativeObj, float scale); 90 | 91 | // native support for java finalize() 92 | private static native void delete(long nativeObj); 93 | 94 | } 95 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/video/BackgroundSubtractor.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.video; 6 | 7 | import org.opencv.core.Algorithm; 8 | import org.opencv.core.Mat; 9 | 10 | // C++: class BackgroundSubtractor 11 | //javadoc: BackgroundSubtractor 12 | public class BackgroundSubtractor extends Algorithm { 13 | 14 | protected BackgroundSubtractor(long addr) { super(addr); } 15 | 16 | 17 | // 18 | // C++: void apply(Mat image, Mat& fgmask, double learningRate = -1) 19 | // 20 | 21 | //javadoc: BackgroundSubtractor::apply(image, fgmask, learningRate) 22 | public void apply(Mat image, Mat fgmask, double learningRate) 23 | { 24 | 25 | apply_0(nativeObj, image.nativeObj, fgmask.nativeObj, learningRate); 26 | 27 | return; 28 | } 29 | 30 | //javadoc: BackgroundSubtractor::apply(image, fgmask) 31 | public void apply(Mat image, Mat fgmask) 32 | { 33 | 34 | apply_1(nativeObj, image.nativeObj, fgmask.nativeObj); 35 | 36 | return; 37 | } 38 | 39 | 40 | // 41 | // C++: void getBackgroundImage(Mat& backgroundImage) 42 | // 43 | 44 | //javadoc: BackgroundSubtractor::getBackgroundImage(backgroundImage) 45 | public void getBackgroundImage(Mat backgroundImage) 46 | { 47 | 48 | getBackgroundImage_0(nativeObj, backgroundImage.nativeObj); 49 | 50 | return; 51 | } 52 | 53 | 54 | @Override 55 | protected void finalize() throws Throwable { 56 | delete(nativeObj); 57 | } 58 | 59 | 60 | 61 | // C++: void apply(Mat image, Mat& fgmask, double learningRate = -1) 62 | private static native void apply_0(long nativeObj, long image_nativeObj, long fgmask_nativeObj, double learningRate); 63 | private static native void apply_1(long nativeObj, long image_nativeObj, long fgmask_nativeObj); 64 | 65 | // C++: void getBackgroundImage(Mat& backgroundImage) 66 | private static native void getBackgroundImage_0(long nativeObj, long backgroundImage_nativeObj); 67 | 68 | // native support for java finalize() 69 | private static native void delete(long nativeObj); 70 | 71 | } 72 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/video/DenseOpticalFlow.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.video; 6 | 7 | import org.opencv.core.Algorithm; 8 | import org.opencv.core.Mat; 9 | 10 | // C++: class DenseOpticalFlow 11 | //javadoc: DenseOpticalFlow 12 | public class DenseOpticalFlow extends Algorithm { 13 | 14 | protected DenseOpticalFlow(long addr) { super(addr); } 15 | 16 | 17 | // 18 | // C++: void calc(Mat I0, Mat I1, Mat& flow) 19 | // 20 | 21 | //javadoc: DenseOpticalFlow::calc(I0, I1, flow) 22 | public void calc(Mat I0, Mat I1, Mat flow) 23 | { 24 | 25 | calc_0(nativeObj, I0.nativeObj, I1.nativeObj, flow.nativeObj); 26 | 27 | return; 28 | } 29 | 30 | 31 | // 32 | // C++: void collectGarbage() 33 | // 34 | 35 | //javadoc: DenseOpticalFlow::collectGarbage() 36 | public void collectGarbage() 37 | { 38 | 39 | collectGarbage_0(nativeObj); 40 | 41 | return; 42 | } 43 | 44 | 45 | @Override 46 | protected void finalize() throws Throwable { 47 | delete(nativeObj); 48 | } 49 | 50 | 51 | 52 | // C++: void calc(Mat I0, Mat I1, Mat& flow) 53 | private static native void calc_0(long nativeObj, long I0_nativeObj, long I1_nativeObj, long flow_nativeObj); 54 | 55 | // C++: void collectGarbage() 56 | private static native void collectGarbage_0(long nativeObj); 57 | 58 | // native support for java finalize() 59 | private static native void delete(long nativeObj); 60 | 61 | } 62 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/java/org/opencv/video/SparseOpticalFlow.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.video; 6 | 7 | import org.opencv.core.Algorithm; 8 | import org.opencv.core.Mat; 9 | 10 | // C++: class SparseOpticalFlow 11 | //javadoc: SparseOpticalFlow 12 | public class SparseOpticalFlow extends Algorithm { 13 | 14 | protected SparseOpticalFlow(long addr) { super(addr); } 15 | 16 | 17 | // 18 | // C++: void calc(Mat prevImg, Mat nextImg, Mat prevPts, Mat& nextPts, Mat& status, Mat& err = cv::Mat()) 19 | // 20 | 21 | //javadoc: SparseOpticalFlow::calc(prevImg, nextImg, prevPts, nextPts, status, err) 22 | public void calc(Mat prevImg, Mat nextImg, Mat prevPts, Mat nextPts, Mat status, Mat err) 23 | { 24 | 25 | calc_0(nativeObj, prevImg.nativeObj, nextImg.nativeObj, prevPts.nativeObj, nextPts.nativeObj, status.nativeObj, err.nativeObj); 26 | 27 | return; 28 | } 29 | 30 | //javadoc: SparseOpticalFlow::calc(prevImg, nextImg, prevPts, nextPts, status) 31 | public void calc(Mat prevImg, Mat nextImg, Mat prevPts, Mat nextPts, Mat status) 32 | { 33 | 34 | calc_1(nativeObj, prevImg.nativeObj, nextImg.nativeObj, prevPts.nativeObj, nextPts.nativeObj, status.nativeObj); 35 | 36 | return; 37 | } 38 | 39 | 40 | @Override 41 | protected void finalize() throws Throwable { 42 | delete(nativeObj); 43 | } 44 | 45 | 46 | 47 | // C++: void calc(Mat prevImg, Mat nextImg, Mat prevPts, Mat& nextPts, Mat& status, Mat& err = cv::Mat()) 48 | private static native void calc_0(long nativeObj, long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_nativeObj, long nextPts_nativeObj, long status_nativeObj, long err_nativeObj); 49 | private static native void calc_1(long nativeObj, long prevImg_nativeObj, long nextImg_nativeObj, long prevPts_nativeObj, long nextPts_nativeObj, long status_nativeObj); 50 | 51 | // native support for java finalize() 52 | private static native void delete(long nativeObj); 53 | 54 | } 55 | -------------------------------------------------------------------------------- /openCVLibrary330/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | include ':openCVLibrary330' 3 | --------------------------------------------------------------------------------