├── .gitignore ├── README.md ├── app ├── .gitignore ├── CMakeLists.txt ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── yanyu │ │ └── com │ │ └── mrcar │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ └── mrcar │ │ │ ├── ann.xml │ │ │ ├── annCh.xml │ │ │ ├── ann_chinese.xml │ │ │ ├── province_mapping.xml │ │ │ ├── simhei.ttf │ │ │ └── svm_hist.xml │ ├── java │ │ └── yanyu │ │ │ └── com │ │ │ └── mrcar │ │ │ ├── BeepManager.java │ │ │ ├── CVCameraActivity.java │ │ │ ├── CameraActivity.java │ │ │ ├── MRAssetUtil.java │ │ │ ├── MRCar.java │ │ │ ├── MRMediaFileUtil.java │ │ │ ├── MRPlate.java │ │ │ ├── PhotoActivity.java │ │ │ └── ViewfinderView.java │ ├── jni │ │ ├── CvText.cpp │ │ ├── include │ │ │ ├── CvText.h │ │ │ ├── easypr.h │ │ │ ├── easypr │ │ │ │ ├── api.hpp │ │ │ │ ├── config.h │ │ │ │ ├── core │ │ │ │ │ ├── character.hpp │ │ │ │ │ ├── chars_identify.h │ │ │ │ │ ├── chars_recognise.h │ │ │ │ │ ├── chars_segment.h │ │ │ │ │ ├── core_func.h │ │ │ │ │ ├── feature.h │ │ │ │ │ ├── params.h │ │ │ │ │ ├── plate.hpp │ │ │ │ │ ├── plate_detect.h │ │ │ │ │ ├── plate_judge.h │ │ │ │ │ ├── plate_locate.h │ │ │ │ │ └── plate_recognize.h │ │ │ │ ├── train │ │ │ │ │ ├── annCh_train.h │ │ │ │ │ ├── ann_train.h │ │ │ │ │ ├── create_data.h │ │ │ │ │ ├── svm_train.h │ │ │ │ │ └── train.h │ │ │ │ ├── util │ │ │ │ │ ├── kv.h │ │ │ │ │ ├── program_options.h │ │ │ │ │ ├── switch.hpp │ │ │ │ │ └── util.h │ │ │ │ └── version.h │ │ │ ├── freetype │ │ │ │ ├── config │ │ │ │ │ ├── ftconfig.h │ │ │ │ │ ├── ftheader.h │ │ │ │ │ ├── ftmodule.h │ │ │ │ │ ├── ftoption.h │ │ │ │ │ └── ftstdlib.h │ │ │ │ ├── freetype.h │ │ │ │ ├── ftadvanc.h │ │ │ │ ├── ftbbox.h │ │ │ │ ├── ftbdf.h │ │ │ │ ├── ftbitmap.h │ │ │ │ ├── ftcache.h │ │ │ │ ├── ftchapters.h │ │ │ │ ├── ftcid.h │ │ │ │ ├── fterrdef.h │ │ │ │ ├── fterrors.h │ │ │ │ ├── ftgasp.h │ │ │ │ ├── ftglyph.h │ │ │ │ ├── ftgxval.h │ │ │ │ ├── ftgzip.h │ │ │ │ ├── ftimage.h │ │ │ │ ├── ftincrem.h │ │ │ │ ├── ftlcdfil.h │ │ │ │ ├── ftlist.h │ │ │ │ ├── ftlzw.h │ │ │ │ ├── ftmac.h │ │ │ │ ├── ftmm.h │ │ │ │ ├── ftmodapi.h │ │ │ │ ├── ftmoderr.h │ │ │ │ ├── ftotval.h │ │ │ │ ├── ftoutln.h │ │ │ │ ├── ftpfr.h │ │ │ │ ├── ftrender.h │ │ │ │ ├── ftsizes.h │ │ │ │ ├── ftsnames.h │ │ │ │ ├── ftstroke.h │ │ │ │ ├── ftsynth.h │ │ │ │ ├── ftsystem.h │ │ │ │ ├── fttrigon.h │ │ │ │ ├── fttypes.h │ │ │ │ ├── ftwinfnt.h │ │ │ │ ├── ftxf86.h │ │ │ │ ├── internal │ │ │ │ │ ├── autohint.h │ │ │ │ │ ├── ftcalc.h │ │ │ │ │ ├── ftdebug.h │ │ │ │ │ ├── ftdriver.h │ │ │ │ │ ├── ftgloadr.h │ │ │ │ │ ├── ftmemory.h │ │ │ │ │ ├── ftobjs.h │ │ │ │ │ ├── ftpic.h │ │ │ │ │ ├── ftrfork.h │ │ │ │ │ ├── ftserv.h │ │ │ │ │ ├── ftstream.h │ │ │ │ │ ├── fttrace.h │ │ │ │ │ ├── ftvalid.h │ │ │ │ │ ├── internal.h │ │ │ │ │ ├── pcftypes.h │ │ │ │ │ ├── psaux.h │ │ │ │ │ ├── pshints.h │ │ │ │ │ ├── services │ │ │ │ │ │ ├── svbdf.h │ │ │ │ │ │ ├── svcid.h │ │ │ │ │ │ ├── svgldict.h │ │ │ │ │ │ ├── svgxval.h │ │ │ │ │ │ ├── svkern.h │ │ │ │ │ │ ├── svmm.h │ │ │ │ │ │ ├── svotval.h │ │ │ │ │ │ ├── svpfr.h │ │ │ │ │ │ ├── svpostnm.h │ │ │ │ │ │ ├── svpscmap.h │ │ │ │ │ │ ├── svpsinfo.h │ │ │ │ │ │ ├── svsfnt.h │ │ │ │ │ │ ├── svttcmap.h │ │ │ │ │ │ ├── svtteng.h │ │ │ │ │ │ ├── svttglyf.h │ │ │ │ │ │ ├── svwinfnt.h │ │ │ │ │ │ └── svxf86nm.h │ │ │ │ │ ├── sfnt.h │ │ │ │ │ ├── t1types.h │ │ │ │ │ └── tttypes.h │ │ │ │ ├── t1tables.h │ │ │ │ ├── ttnameid.h │ │ │ │ ├── tttables.h │ │ │ │ ├── tttags.h │ │ │ │ └── ttunpat.h │ │ │ ├── ft2build.h │ │ │ ├── opencv │ │ │ │ ├── cv.h │ │ │ │ ├── cv.hpp │ │ │ │ ├── cvaux.h │ │ │ │ ├── cvaux.hpp │ │ │ │ ├── cvwimage.h │ │ │ │ ├── cxcore.h │ │ │ │ ├── cxcore.hpp │ │ │ │ ├── cxeigen.hpp │ │ │ │ ├── cxmisc.h │ │ │ │ ├── highgui.h │ │ │ │ └── ml.h │ │ │ └── opencv2 │ │ │ │ ├── aruco.hpp │ │ │ │ ├── aruco │ │ │ │ ├── charuco.hpp │ │ │ │ └── dictionary.hpp │ │ │ │ ├── bgsegm.hpp │ │ │ │ ├── bioinspired.hpp │ │ │ │ ├── bioinspired │ │ │ │ ├── bioinspired.hpp │ │ │ │ ├── retina.hpp │ │ │ │ ├── retinafasttonemapping.hpp │ │ │ │ └── transientareassegmentationmodule.hpp │ │ │ │ ├── calib3d.hpp │ │ │ │ ├── calib3d │ │ │ │ ├── calib3d.hpp │ │ │ │ └── calib3d_c.h │ │ │ │ ├── ccalib.hpp │ │ │ │ ├── ccalib │ │ │ │ ├── multicalib.hpp │ │ │ │ ├── omnidir.hpp │ │ │ │ └── randpattern.hpp │ │ │ │ ├── core.hpp │ │ │ │ ├── core │ │ │ │ ├── affine.hpp │ │ │ │ ├── base.hpp │ │ │ │ ├── bufferpool.hpp │ │ │ │ ├── core.hpp │ │ │ │ ├── core_c.h │ │ │ │ ├── cuda.hpp │ │ │ │ ├── cuda.inl.hpp │ │ │ │ ├── cuda │ │ │ │ │ ├── block.hpp │ │ │ │ │ ├── border_interpolate.hpp │ │ │ │ │ ├── color.hpp │ │ │ │ │ ├── common.hpp │ │ │ │ │ ├── datamov_utils.hpp │ │ │ │ │ ├── detail │ │ │ │ │ │ ├── color_detail.hpp │ │ │ │ │ │ ├── reduce.hpp │ │ │ │ │ │ ├── reduce_key_val.hpp │ │ │ │ │ │ ├── transform_detail.hpp │ │ │ │ │ │ ├── type_traits_detail.hpp │ │ │ │ │ │ └── vec_distance_detail.hpp │ │ │ │ │ ├── dynamic_smem.hpp │ │ │ │ │ ├── emulation.hpp │ │ │ │ │ ├── filters.hpp │ │ │ │ │ ├── funcattrib.hpp │ │ │ │ │ ├── functional.hpp │ │ │ │ │ ├── limits.hpp │ │ │ │ │ ├── reduce.hpp │ │ │ │ │ ├── saturate_cast.hpp │ │ │ │ │ ├── scan.hpp │ │ │ │ │ ├── simd_functions.hpp │ │ │ │ │ ├── transform.hpp │ │ │ │ │ ├── type_traits.hpp │ │ │ │ │ ├── utility.hpp │ │ │ │ │ ├── vec_distance.hpp │ │ │ │ │ ├── vec_math.hpp │ │ │ │ │ ├── vec_traits.hpp │ │ │ │ │ ├── warp.hpp │ │ │ │ │ ├── warp_reduce.hpp │ │ │ │ │ └── warp_shuffle.hpp │ │ │ │ ├── cuda_stream_accessor.hpp │ │ │ │ ├── cuda_types.hpp │ │ │ │ ├── cv_cpu_dispatch.h │ │ │ │ ├── cv_cpu_helper.h │ │ │ │ ├── cvdef.h │ │ │ │ ├── cvstd.hpp │ │ │ │ ├── cvstd.inl.hpp │ │ │ │ ├── directx.hpp │ │ │ │ ├── eigen.hpp │ │ │ │ ├── fast_math.hpp │ │ │ │ ├── hal │ │ │ │ │ ├── hal.hpp │ │ │ │ │ ├── interface.h │ │ │ │ │ ├── intrin.hpp │ │ │ │ │ ├── intrin_cpp.hpp │ │ │ │ │ ├── intrin_neon.hpp │ │ │ │ │ ├── intrin_sse.hpp │ │ │ │ │ └── intrin_vsx.hpp │ │ │ │ ├── ippasync.hpp │ │ │ │ ├── mat.hpp │ │ │ │ ├── mat.inl.hpp │ │ │ │ ├── matx.hpp │ │ │ │ ├── neon_utils.hpp │ │ │ │ ├── ocl.hpp │ │ │ │ ├── ocl_genbase.hpp │ │ │ │ ├── opengl.hpp │ │ │ │ ├── operations.hpp │ │ │ │ ├── optim.hpp │ │ │ │ ├── ovx.hpp │ │ │ │ ├── persistence.hpp │ │ │ │ ├── ptr.inl.hpp │ │ │ │ ├── saturate.hpp │ │ │ │ ├── softfloat.hpp │ │ │ │ ├── sse_utils.hpp │ │ │ │ ├── traits.hpp │ │ │ │ ├── types.hpp │ │ │ │ ├── types_c.h │ │ │ │ ├── utility.hpp │ │ │ │ ├── utils │ │ │ │ │ ├── logger.hpp │ │ │ │ │ └── trace.hpp │ │ │ │ ├── va_intel.hpp │ │ │ │ ├── version.hpp │ │ │ │ ├── vsx_utils.hpp │ │ │ │ └── wimage.hpp │ │ │ │ ├── cvconfig.h │ │ │ │ ├── datasets │ │ │ │ ├── ar_hmdb.hpp │ │ │ │ ├── ar_sports.hpp │ │ │ │ ├── dataset.hpp │ │ │ │ ├── fr_adience.hpp │ │ │ │ ├── fr_lfw.hpp │ │ │ │ ├── gr_chalearn.hpp │ │ │ │ ├── gr_skig.hpp │ │ │ │ ├── hpe_humaneva.hpp │ │ │ │ ├── hpe_parse.hpp │ │ │ │ ├── ir_affine.hpp │ │ │ │ ├── ir_robot.hpp │ │ │ │ ├── is_bsds.hpp │ │ │ │ ├── is_weizmann.hpp │ │ │ │ ├── msm_epfl.hpp │ │ │ │ ├── msm_middlebury.hpp │ │ │ │ ├── or_imagenet.hpp │ │ │ │ ├── or_mnist.hpp │ │ │ │ ├── or_pascal.hpp │ │ │ │ ├── or_sun.hpp │ │ │ │ ├── pd_caltech.hpp │ │ │ │ ├── pd_inria.hpp │ │ │ │ ├── slam_kitti.hpp │ │ │ │ ├── slam_tumindoor.hpp │ │ │ │ ├── tr_chars.hpp │ │ │ │ ├── tr_icdar.hpp │ │ │ │ ├── tr_svt.hpp │ │ │ │ ├── track_alov.hpp │ │ │ │ ├── track_vot.hpp │ │ │ │ └── util.hpp │ │ │ │ ├── dnn.hpp │ │ │ │ ├── dnn │ │ │ │ ├── all_layers.hpp │ │ │ │ ├── dict.hpp │ │ │ │ ├── dnn.hpp │ │ │ │ ├── dnn.inl.hpp │ │ │ │ ├── layer.details.hpp │ │ │ │ ├── layer.hpp │ │ │ │ └── shape_utils.hpp │ │ │ │ ├── dpm.hpp │ │ │ │ ├── face.hpp │ │ │ │ ├── face │ │ │ │ ├── bif.hpp │ │ │ │ ├── facerec.hpp │ │ │ │ └── predict_collector.hpp │ │ │ │ ├── features2d.hpp │ │ │ │ ├── features2d │ │ │ │ └── features2d.hpp │ │ │ │ ├── flann.hpp │ │ │ │ ├── flann │ │ │ │ ├── all_indices.h │ │ │ │ ├── allocator.h │ │ │ │ ├── any.h │ │ │ │ ├── autotuned_index.h │ │ │ │ ├── composite_index.h │ │ │ │ ├── config.h │ │ │ │ ├── defines.h │ │ │ │ ├── dist.h │ │ │ │ ├── dummy.h │ │ │ │ ├── dynamic_bitset.h │ │ │ │ ├── flann.hpp │ │ │ │ ├── flann_base.hpp │ │ │ │ ├── general.h │ │ │ │ ├── ground_truth.h │ │ │ │ ├── hdf5.h │ │ │ │ ├── heap.h │ │ │ │ ├── hierarchical_clustering_index.h │ │ │ │ ├── index_testing.h │ │ │ │ ├── kdtree_index.h │ │ │ │ ├── kdtree_single_index.h │ │ │ │ ├── kmeans_index.h │ │ │ │ ├── linear_index.h │ │ │ │ ├── logger.h │ │ │ │ ├── lsh_index.h │ │ │ │ ├── lsh_table.h │ │ │ │ ├── matrix.h │ │ │ │ ├── miniflann.hpp │ │ │ │ ├── nn_index.h │ │ │ │ ├── object_factory.h │ │ │ │ ├── params.h │ │ │ │ ├── random.h │ │ │ │ ├── result_set.h │ │ │ │ ├── sampling.h │ │ │ │ ├── saving.h │ │ │ │ ├── simplex_downhill.h │ │ │ │ └── timer.h │ │ │ │ ├── fuzzy.hpp │ │ │ │ ├── fuzzy │ │ │ │ ├── fuzzy_F0_math.hpp │ │ │ │ ├── fuzzy_F1_math.hpp │ │ │ │ ├── fuzzy_image.hpp │ │ │ │ └── types.hpp │ │ │ │ ├── highgui.hpp │ │ │ │ ├── highgui │ │ │ │ ├── highgui.hpp │ │ │ │ └── highgui_c.h │ │ │ │ ├── img_hash.hpp │ │ │ │ ├── img_hash │ │ │ │ ├── average_hash.hpp │ │ │ │ ├── block_mean_hash.hpp │ │ │ │ ├── color_moment_hash.hpp │ │ │ │ ├── img_hash_base.hpp │ │ │ │ ├── marr_hildreth_hash.hpp │ │ │ │ ├── phash.hpp │ │ │ │ └── radial_variance_hash.hpp │ │ │ │ ├── imgcodecs.hpp │ │ │ │ ├── imgcodecs │ │ │ │ ├── imgcodecs.hpp │ │ │ │ ├── imgcodecs_c.h │ │ │ │ └── ios.h │ │ │ │ ├── imgproc.hpp │ │ │ │ ├── imgproc │ │ │ │ ├── detail │ │ │ │ │ └── distortion_model.hpp │ │ │ │ ├── hal │ │ │ │ │ ├── hal.hpp │ │ │ │ │ └── interface.h │ │ │ │ ├── imgproc.hpp │ │ │ │ ├── imgproc_c.h │ │ │ │ └── types_c.h │ │ │ │ ├── line_descriptor.hpp │ │ │ │ ├── line_descriptor │ │ │ │ └── descriptor.hpp │ │ │ │ ├── ml.hpp │ │ │ │ ├── ml │ │ │ │ └── ml.hpp │ │ │ │ ├── objdetect.hpp │ │ │ │ ├── objdetect │ │ │ │ ├── detection_based_tracker.hpp │ │ │ │ ├── objdetect.hpp │ │ │ │ └── objdetect_c.h │ │ │ │ ├── opencv.hpp │ │ │ │ ├── opencv_modules.hpp │ │ │ │ ├── optflow.hpp │ │ │ │ ├── optflow │ │ │ │ ├── motempl.hpp │ │ │ │ ├── pcaflow.hpp │ │ │ │ └── sparse_matching_gpc.hpp │ │ │ │ ├── phase_unwrapping.hpp │ │ │ │ ├── phase_unwrapping │ │ │ │ ├── histogramphaseunwrapping.hpp │ │ │ │ └── phase_unwrapping.hpp │ │ │ │ ├── photo.hpp │ │ │ │ ├── photo │ │ │ │ ├── cuda.hpp │ │ │ │ ├── photo.hpp │ │ │ │ └── photo_c.h │ │ │ │ ├── plot.hpp │ │ │ │ ├── reg │ │ │ │ ├── map.hpp │ │ │ │ ├── mapaffine.hpp │ │ │ │ ├── mapper.hpp │ │ │ │ ├── mappergradaffine.hpp │ │ │ │ ├── mappergradeuclid.hpp │ │ │ │ ├── mappergradproj.hpp │ │ │ │ ├── mappergradshift.hpp │ │ │ │ ├── mappergradsimilar.hpp │ │ │ │ ├── mapperpyramid.hpp │ │ │ │ ├── mapprojec.hpp │ │ │ │ └── mapshift.hpp │ │ │ │ ├── rgbd.hpp │ │ │ │ ├── rgbd │ │ │ │ └── linemod.hpp │ │ │ │ ├── saliency.hpp │ │ │ │ ├── saliency │ │ │ │ ├── saliencyBaseClasses.hpp │ │ │ │ └── saliencySpecializedClasses.hpp │ │ │ │ ├── shape.hpp │ │ │ │ ├── shape │ │ │ │ ├── emdL1.hpp │ │ │ │ ├── hist_cost.hpp │ │ │ │ ├── shape.hpp │ │ │ │ ├── shape_distance.hpp │ │ │ │ └── shape_transformer.hpp │ │ │ │ ├── stereo.hpp │ │ │ │ ├── stereo │ │ │ │ ├── descriptor.hpp │ │ │ │ ├── matching.hpp │ │ │ │ └── stereo.hpp │ │ │ │ ├── stitching.hpp │ │ │ │ ├── stitching │ │ │ │ ├── detail │ │ │ │ │ ├── autocalib.hpp │ │ │ │ │ ├── blenders.hpp │ │ │ │ │ ├── camera.hpp │ │ │ │ │ ├── exposure_compensate.hpp │ │ │ │ │ ├── matchers.hpp │ │ │ │ │ ├── motion_estimators.hpp │ │ │ │ │ ├── seam_finders.hpp │ │ │ │ │ ├── timelapsers.hpp │ │ │ │ │ ├── util.hpp │ │ │ │ │ ├── util_inl.hpp │ │ │ │ │ ├── warpers.hpp │ │ │ │ │ └── warpers_inl.hpp │ │ │ │ └── warpers.hpp │ │ │ │ ├── structured_light.hpp │ │ │ │ ├── structured_light │ │ │ │ ├── graycodepattern.hpp │ │ │ │ ├── sinusoidalpattern.hpp │ │ │ │ └── structured_light.hpp │ │ │ │ ├── superres.hpp │ │ │ │ ├── superres │ │ │ │ └── optical_flow.hpp │ │ │ │ ├── surface_matching.hpp │ │ │ │ ├── surface_matching │ │ │ │ ├── icp.hpp │ │ │ │ ├── pose_3d.hpp │ │ │ │ ├── ppf_helpers.hpp │ │ │ │ ├── ppf_match_3d.hpp │ │ │ │ └── t_hash_int.hpp │ │ │ │ ├── text.hpp │ │ │ │ ├── text │ │ │ │ ├── erfilter.hpp │ │ │ │ └── ocr.hpp │ │ │ │ ├── tracking.hpp │ │ │ │ ├── tracking │ │ │ │ ├── feature.hpp │ │ │ │ ├── kalman_filters.hpp │ │ │ │ ├── onlineBoosting.hpp │ │ │ │ ├── onlineMIL.hpp │ │ │ │ ├── tldDataset.hpp │ │ │ │ ├── tracker.hpp │ │ │ │ └── tracking.hpp │ │ │ │ ├── video.hpp │ │ │ │ ├── video │ │ │ │ ├── background_segm.hpp │ │ │ │ ├── tracking.hpp │ │ │ │ ├── tracking_c.h │ │ │ │ └── video.hpp │ │ │ │ ├── videoio.hpp │ │ │ │ ├── videoio │ │ │ │ ├── cap_ios.h │ │ │ │ ├── videoio.hpp │ │ │ │ └── videoio_c.h │ │ │ │ ├── videostab.hpp │ │ │ │ ├── videostab │ │ │ │ ├── deblurring.hpp │ │ │ │ ├── fast_marching.hpp │ │ │ │ ├── fast_marching_inl.hpp │ │ │ │ ├── frame_source.hpp │ │ │ │ ├── global_motion.hpp │ │ │ │ ├── inpainting.hpp │ │ │ │ ├── log.hpp │ │ │ │ ├── motion_core.hpp │ │ │ │ ├── motion_stabilizing.hpp │ │ │ │ ├── optical_flow.hpp │ │ │ │ ├── outlier_rejection.hpp │ │ │ │ ├── ring_buffer.hpp │ │ │ │ ├── stabilizer.hpp │ │ │ │ └── wobble_suppression.hpp │ │ │ │ ├── xfeatures2d.hpp │ │ │ │ ├── xfeatures2d │ │ │ │ ├── cuda.hpp │ │ │ │ └── nonfree.hpp │ │ │ │ ├── ximgproc.hpp │ │ │ │ ├── ximgproc │ │ │ │ ├── deriche_filter.hpp │ │ │ │ ├── disparity_filter.hpp │ │ │ │ ├── edge_filter.hpp │ │ │ │ ├── estimated_covariance.hpp │ │ │ │ ├── fast_hough_transform.hpp │ │ │ │ ├── fast_line_detector.hpp │ │ │ │ ├── lsc.hpp │ │ │ │ ├── paillou_filter.hpp │ │ │ │ ├── peilin.hpp │ │ │ │ ├── seeds.hpp │ │ │ │ ├── segmentation.hpp │ │ │ │ ├── slic.hpp │ │ │ │ ├── sparse_match_interpolator.hpp │ │ │ │ ├── structured_edge_detection.hpp │ │ │ │ └── weighted_median_filter.hpp │ │ │ │ ├── xobjdetect.hpp │ │ │ │ ├── xphoto.hpp │ │ │ │ └── xphoto │ │ │ │ ├── bm3d_image_denoising.hpp │ │ │ │ ├── dct_image_denoising.hpp │ │ │ │ ├── inpainting.hpp │ │ │ │ └── white_balance.hpp │ │ ├── jni.cpp │ │ ├── main.cpp │ │ ├── mrcar.cpp │ │ ├── mrcar.h │ │ ├── src │ │ │ ├── core │ │ │ │ ├── chars_identify.cpp │ │ │ │ ├── chars_recognise.cpp │ │ │ │ ├── chars_segment.cpp │ │ │ │ ├── core_func.cpp │ │ │ │ ├── feature.cpp │ │ │ │ ├── params.cpp │ │ │ │ ├── plate_detect.cpp │ │ │ │ ├── plate_judge.cpp │ │ │ │ ├── plate_locate.cpp │ │ │ │ └── plate_recognize.cpp │ │ │ ├── train │ │ │ │ ├── annCh_train.cpp │ │ │ │ ├── ann_train.cpp │ │ │ │ ├── create_data.cpp │ │ │ │ ├── svm_train.cpp │ │ │ │ └── train.cpp │ │ │ └── util │ │ │ │ ├── kv.cpp │ │ │ │ ├── program_options.cpp │ │ │ │ └── util.cpp │ │ ├── thirdparty │ │ │ ├── CMakeLists.txt │ │ │ ├── LBP │ │ │ │ ├── helper.cpp │ │ │ │ ├── helper.hpp │ │ │ │ ├── lbp.cpp │ │ │ │ └── lbp.hpp │ │ │ ├── mser │ │ │ │ ├── mser2.cpp │ │ │ │ └── mser2.hpp │ │ │ ├── svm │ │ │ │ ├── corrected_svm.cpp │ │ │ │ └── precomp.hpp │ │ │ ├── textDetect │ │ │ │ ├── erfilter.cpp │ │ │ │ └── erfilter.hpp │ │ │ └── xmlParser │ │ │ │ ├── AFPL-license.txt │ │ │ │ ├── xmlParser.cpp │ │ │ │ └── xmlParser.h │ │ └── util.h │ ├── jniLibs │ │ ├── arm64-v8a │ │ │ ├── libfreetype2-static.a │ │ │ └── libopencv_java3.so │ │ └── armeabi-v7a │ │ │ ├── libfreetype2-static.a │ │ │ └── libopencv_java3.so │ └── res │ │ ├── drawable │ │ ├── camera.png │ │ └── folder.png │ │ ├── layout │ │ ├── activity_camera.xml │ │ ├── activity_cvcamera.xml │ │ └── activity_main.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 │ │ ├── raw │ │ └── zxl_beep.mp3 │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── yanyu │ └── com │ └── mrcar │ └── ExampleUnitTest.java ├── build.gradle ├── cameralive.png ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── openCVLibrary320 ├── AndroidManifest.xml ├── build.gradle ├── lint.xml ├── project.properties ├── res │ └── values │ │ └── attrs.xml └── src │ └── 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 │ ├── aruco │ ├── Aruco.java │ ├── Board.java │ ├── CharucoBoard.java │ ├── DetectorParameters.java │ ├── Dictionary.java │ └── GridBoard.java │ ├── bioinspired │ ├── Bioinspired.java │ ├── Retina.java │ ├── RetinaFastToneMapping.java │ └── TransientAreasSegmentationModule.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 │ ├── engine │ └── OpenCVEngineInterface.aidl │ ├── 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 │ ├── img_hash │ ├── AverageHash.java │ ├── BlockMeanHash.java │ ├── ColorMomentHash.java │ ├── ImgHashBase.java │ ├── Img_hash.java │ ├── MarrHildrethHash.java │ ├── PHash.java │ └── RadialVarianceHash.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 │ ├── phase_unwrapping │ ├── HistogramPhaseUnwrapping.java │ ├── PhaseUnwrapping.java │ └── Phase_unwrapping.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 │ ├── structured_light │ ├── GrayCodePattern.java │ ├── Params.java │ ├── SinusoidalPattern.java │ ├── StructuredLightPattern.java │ └── Structured_light.java │ ├── text │ ├── BaseOCR.java │ ├── Callback.java │ ├── ClassifierCallback.java │ ├── ERFilter.java │ ├── OCRBeamSearchDecoder.java │ ├── OCRHMMDecoder.java │ ├── OCRTesseract.java │ └── Text.java │ ├── tracking │ ├── MultiTracker.java │ ├── Tracker.java │ ├── TrackerBoosting.java │ ├── TrackerGOTURN.java │ ├── TrackerKCF.java │ ├── TrackerMIL.java │ ├── TrackerMedianFlow.java │ ├── TrackerTLD.java │ └── Tracking.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 │ └── xfeatures2d │ ├── BoostDesc.java │ ├── BriefDescriptorExtractor.java │ ├── DAISY.java │ ├── FREAK.java │ ├── HarrisLaplaceFeatureDetector.java │ ├── LATCH.java │ ├── LUCID.java │ ├── MSDDetector.java │ ├── PCTSignatures.java │ ├── PCTSignaturesSQFD.java │ ├── SIFT.java │ ├── SURF.java │ ├── StarDetector.java │ ├── VGG.java │ └── Xfeatures2d.java └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | local.properties 4 | .idea 5 | .DS_Store 6 | build/ 7 | app/build/ 8 | app/.externalNativeBuild -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 基于EasyPR的车牌识别android实现 2 | 3 | EasyPR4Android,基于[EasyPR](https://github.com/liuruoze/EasyPR)1.6的android实现, 提供编译好的[mrcar.apk](https://github.com/imistyrain/EasyPR4Android/releases)安装运行demo. 4 | 5 | ### 效果图 6 | 7 | 特性:动态注册jni函数, 摄像头实时预览 8 | 9 | 10 | 11 | ### 编译和运行: 12 | 13 | 环境: android studio3.5开发实现,ndk版本为R16b,OpenCV版本为3.2,android SDK版本为28,最低要求21。 14 | 15 | * 1.下载并配置[android studio 3.5](http://www.android-studio.org/) 16 | 17 | * 2.配置NDK16b[ndk r16b](http://blog.csdn.net/shuzfan/article/details/52690554) 18 | 19 | * 3.编译并运行,也可以直接下载编译好的[apk](https://github.com/imistyrain/EasyPR4Android/releases)安装使用 20 | 21 | 本项目定义了三个Activity, 其中 22 | 23 | * [PhotoActivity](app/src/main/java/yanyu/com/mrcar/PhotoActivity.java)是从图片和系统相机抓取图片进行识别 24 | 25 | * [CVCameraActivity](app/src/main/java/yanyu/com/mrcar/CVCameraActivity.java)是用OpenCV的JavaCameraView实时识别,由于OpenCV实现的限制,其只能用于横屏,虽然也有trick能使其支持竖屏,但会有性能损失,为此产生了第三种 26 | 27 | * [CameraActivity](app/src/main/java/yanyu/com/mrcar/CameraActivity.java)原始摄像头实时识别,抓取NV21数据送到jni中,并将其抓换成RGB数据进行处理,其支持竖屏识别。 28 | 29 | ### 参考: 30 | 31 | * 1.[Native方式集成OpenCV](https://github.com/ShawnZhang31/opencv-android-studio) 32 | 33 | * 3.[Android Camera1 教程 · 第二章 · 预览](https://www.jianshu.com/p/705d4792e836) 34 | 35 | * 4.[ios 端车牌识别](https://github.com/imistyrain/EasyPR-Swift) -------------------------------------------------------------------------------- /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 | set(LIB_DIR ${CMAKE_CURRENT_LIST_DIR}/src/main/jniLibs/${ANDROID_ABI}/) 8 | 9 | #add include dir 10 | include_directories(src/main/jni/include) 11 | include_directories(src/main/jni) 12 | 13 | #add source files 14 | aux_source_directory(src/main/jni SOURCE_FILES) 15 | aux_source_directory(src/main/jni/src/core SOURCE_FILES_CORE) 16 | aux_source_directory(src/main/jni/src/train SOURCE_FILES_TRAIN) 17 | aux_source_directory(src/main/jni/src/util SOURCE_FILES_UTIL) 18 | aux_source_directory(src/main/jni/thirdparty/LBP SOURCE_FILES_LBP) 19 | aux_source_directory(src/main/jni/thirdparty/mser SOURCE_FILES_MSER) 20 | aux_source_directory(src/main/jni/thirdparty/svm SOURCE_FILES_SVM) 21 | aux_source_directory(src/main/jni/thirdparty/textDetect SOURCE_FILES_TEXTDETECT) 22 | aux_source_directory(src/main/jni/thirdparty/xmlParser SOURCE_FILES_XML) 23 | list(REMOVE_ITEM SOURCE_FILES main.cpp) 24 | list(APPEND SOURCE_FILES ${SOURCE_FILES_CORE}) 25 | list(APPEND SOURCE_FILES ${SOURCE_FILES_SOURCE_FILES_SVM}) 26 | list(APPEND SOURCE_FILES ${SOURCE_FILES_CORE}) 27 | list(APPEND SOURCE_FILES ${SOURCE_FILES_TRAIN}) 28 | list(APPEND SOURCE_FILES ${SOURCE_FILES_UTIL}) 29 | list(APPEND SOURCE_FILES ${SOURCE_FILES_LBP}) 30 | list(APPEND SOURCE_FILES ${SOURCE_FILES_MSER}) 31 | list(APPEND SOURCE_FILES ${SOURCE_FILES_TEXTDETECT}) 32 | list(APPEND SOURCE_FILES ${SOURCE_FILES_XML}) 33 | list(APPEND SOURCE_FILES "src/main/jni/jni.cpp") 34 | 35 | add_library(lib_opencv_java3 SHARED IMPORTED) 36 | add_library(lib_freetype STATIC IMPORTED) 37 | set_target_properties(lib_opencv_java3 PROPERTIES IMPORTED_LOCATION ${LIB_DIR}/libopencv_java3.so) 38 | set_target_properties(lib_freetype PROPERTIES IMPORTED_LOCATION ${LIB_DIR}/libfreetype2-static.a) 39 | add_library(mrcar SHARED ${SOURCE_FILES}) 40 | 41 | find_library(log-lib log) 42 | target_link_libraries(mrcar lib_opencv_java3 ${log-lib} lib_freetype) -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | buildToolsVersion "28.0.3" 6 | defaultConfig { 7 | applicationId "yanyu.com.mrcar" 8 | minSdkVersion 21 9 | targetSdkVersion 28 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | ndk{ 14 | abiFilters 'arm64-v8a'//armeabi-v7a 15 | } 16 | externalNativeBuild { 17 | cmake { 18 | cppFlags "-std=c++11 -fexceptions" 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 | implementation fileTree(include: ['*.jar'], dir: 'libs') 38 | androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { 39 | exclude group: 'com.android.support', module: 'support-annotations' 40 | }) 41 | implementation 'com.android.support:appcompat-v7:28.0.0' 42 | androidTestImplementation 'junit:junit:4.12' 43 | implementation project(path: ':openCVLibrary320') 44 | } 45 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\Java\adroidsdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/androidTest/java/yanyu/com/mrcar/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package yanyu.com.mrcar; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/assets/mrcar/province_mapping.xml: -------------------------------------------------------------------------------- 1 | zh_cuan 川 2 | zh_gan1 甘 3 | zh_hei 黑 4 | zh_jin 津 5 | zh_liao 辽 6 | zh_min 闽 7 | zh_qiong 琼 8 | zh_sx 晋 9 | zh_xin 新 10 | zh_yue 粤 11 | zh_zhe 浙 12 | zh_e 鄂 13 | zh_gui 贵 14 | zh_hu 沪 15 | zh_jing 京 16 | zh_lu 鲁 17 | zh_ning 宁 18 | zh_shan 陕 19 | zh_wan 皖 20 | zh_yu 豫 21 | zh_yun 云 22 | zh_gan 赣 23 | zh_gui1 桂 24 | zh_ji 冀 25 | zh_jl 吉 26 | zh_meng 蒙 27 | zh_qing 青 28 | zh_su 苏 29 | zh_xiang 湘 30 | zh_yu1 渝 31 | zh_zang 藏 -------------------------------------------------------------------------------- /app/src/main/assets/mrcar/simhei.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/app/src/main/assets/mrcar/simhei.ttf -------------------------------------------------------------------------------- /app/src/main/java/yanyu/com/mrcar/MRCar.java: -------------------------------------------------------------------------------- 1 | package yanyu.com.mrcar; 2 | 3 | /** 4 | * Created by yanyu on 2016/8/19. 5 | */ 6 | public class MRCar { 7 | //初始化,modeldir为SD卡上模型路径 8 | public static native boolean init(String modeldir); 9 | //车牌检测 10 | public static native MRPlate[] plateRecognition(long matImg,long matResult); 11 | public static native MRPlate[] plateLive(long matImg); 12 | public static native MRPlate[] plateNV21(byte[]img, int height, int width); 13 | //释放库 14 | public static native int release(); 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/yanyu/com/mrcar/MRPlate.java: -------------------------------------------------------------------------------- 1 | package yanyu.com.mrcar; 2 | 3 | import android.graphics.Rect; 4 | 5 | public class MRPlate { 6 | public String lic; 7 | public Rect rect; 8 | //public float score; 9 | public MRPlate(){} 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/jni/include/CvText.h: -------------------------------------------------------------------------------- 1 | #ifndef CV_TEXT_H 2 | #define CV_TEXT_H 3 | 4 | #include 5 | #include 6 | #include FT_FREETYPE_H 7 | 8 | class CvText { 9 | public: 10 | 11 | /** 12 | * 构造函数,初始化一个字体 13 | * @param fontName 字体名称 14 | */ 15 | explicit CvText(const char *fontName); 16 | 17 | virtual ~CvText(); 18 | 19 | /** 20 | * 设置字体属性,属性为空时保持默认值 21 | * @param type 类型 22 | * @param size 大小 23 | * @param underline 下划线 24 | * @param diaphaneity 透明度 25 | */ 26 | void setFont(int *type, cv::Scalar *size = nullptr, 27 | bool *underline = nullptr, float *diaphaneity = nullptr); 28 | 29 | /** 30 | * 恢复默认字体设置 31 | */ 32 | void restoreFont(); 33 | 34 | /** 35 | * 将text的内容放到frame的指定位置(pos),默认文本颜色为黑色。遇到不能输出的字符将停止。 36 | * @param frame 输出的影象 37 | * @param text 文本内容 38 | * @param pos 文本位置 39 | * @param color 文本颜色 40 | * @return 返回成功输出的字符长度,失败返回-1。 41 | */ 42 | int putText(cv::Mat &frame, std::string text, cv::Point pos, 43 | cv::Scalar color = cv::Scalar(0, 0, 0)); 44 | 45 | /** 46 | * 将text的内容放到frame的指定位置(pos),默认颜色为黑色。遇到不能输出的字符将停止。 47 | * @param frame 输出的影象 48 | * @param text 文本内容 49 | * @param pos 文本位置 50 | * @param color 文本颜色 51 | * @return 返回成功输出的字符长度,失败返回-1。 52 | */ 53 | int putText(cv::Mat &frame, const char *text, cv::Point pos, 54 | cv::Scalar color = cv::Scalar(0, 0, 0)); 55 | 56 | //私有函数区 57 | private: 58 | /** 59 | * 输出wc到frame的pos位置 60 | * @param frame 输出Mat 61 | * @param wc 字符 62 | * @param pos 位置 63 | * @param color 颜色 64 | */ 65 | void putWChar(cv::Mat &frame, wchar_t wc, cv::Point &pos, cv::Scalar color); 66 | 67 | /** 68 | * 将char字符数组转换为wchar_t字符数组 69 | * @param src char字符数组 70 | * @param dst wchar_t字符数组 71 | * @param locale 语言环境,mbstowcs函数依赖此值来判断src的编码方式 72 | * @return 运行成功返回0,否则返回-1 73 | */ 74 | int char2Wchar(const char *&src, wchar_t *&dst, const char *locale = "zh_CN.utf8"); 75 | 76 | //私有变量区 77 | private: 78 | FT_Library m_library; // 字库 79 | FT_Face m_face; // 字体 80 | 81 | // 默认的字体输出参数 82 | int m_fontType; 83 | cv::Scalar m_fontSize; 84 | bool m_fontUnderline; 85 | float m_fontDiaphaneity; 86 | }; 87 | 88 | #endif // CV_TEXT_H 89 | 90 | -------------------------------------------------------------------------------- /app/src/main/jni/include/easypr.h: -------------------------------------------------------------------------------- 1 | #ifndef EASYPR_EASYPR_H 2 | #define EASYPR_EASYPR_H 3 | 4 | #include "easypr/core/plate_recognize.h" 5 | #include "easypr/train/svm_train.h" 6 | #include "easypr/train/ann_train.h" 7 | #include "easypr/train/annCh_train.h" 8 | #include "easypr/util/util.h" 9 | #include "easypr/util/program_options.h" 10 | #include "easypr/api.hpp" 11 | #include "easypr/config.h" 12 | 13 | #endif //EASYPR_EASYPR_H 14 | -------------------------------------------------------------------------------- /app/src/main/jni/include/easypr/api.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file provides some of the most commonly used application interfaces. 3 | */ 4 | #ifndef EASYPR_API_HPP 5 | #define EASYPR_API_HPP 6 | 7 | #include 8 | #include 9 | #include "opencv2/opencv.hpp" 10 | #include "easypr/config.h" 11 | 12 | namespace easypr { 13 | 14 | namespace api { 15 | 16 | static bool plate_judge(const char* image, const char* model) { 17 | cv::Mat src = cv::imread(image); 18 | assert(!src.empty()); 19 | 20 | int result; 21 | result = PlateJudge::instance()->plateJudge(src); 22 | 23 | return result == 0; 24 | } 25 | 26 | static void plate_locate(const char* image, const bool life_mode = true) { 27 | cv::Mat src = cv::imread(image); 28 | 29 | assert(!src.empty()); 30 | 31 | CPlateLocate plate; 32 | plate.setDebug(1); 33 | plate.setLifemode(life_mode); 34 | 35 | std::vector results; 36 | plate.plateLocate(src, results); 37 | } 38 | 39 | static std::vector plate_recognize(const char* image, 40 | const char* model_svm, 41 | const char* model_ann, 42 | const bool life_mode = true) { 43 | cv::Mat img = cv::imread(image); 44 | assert(!img.empty()); 45 | 46 | CPlateRecognize pr; 47 | pr.setResultShow(false); 48 | pr.setLifemode(true); 49 | pr.setMaxPlates(1); 50 | pr.setDetectType(PR_DETECT_CMSER | PR_DETECT_COLOR); 51 | 52 | std::vector results; 53 | std::vector plates; 54 | pr.plateRecognize(img, plates, 0); 55 | 56 | for (auto plate : plates) { 57 | results.push_back(plate.getPlateStr()); 58 | 59 | } 60 | 61 | if (plates.size() == 1) { 62 | if (1) { 63 | std::stringstream ss(std::stringstream::in | std::stringstream::out); 64 | ss << "result.jpg"; 65 | imwrite(ss.str(), plates.at(0).getPlateMat()); 66 | } 67 | } 68 | 69 | return std::move(results); 70 | } 71 | 72 | static Color get_plate_color(const char* image) { 73 | cv::Mat img = cv::imread(image); 74 | 75 | assert(!img.empty()); 76 | 77 | return getPlateType(img, true); 78 | } 79 | } 80 | } 81 | 82 | #endif // EASYPR_API_HPP 83 | -------------------------------------------------------------------------------- /app/src/main/jni/include/easypr/core/chars_identify.h: -------------------------------------------------------------------------------- 1 | #ifndef EASYPR_CORE_CHARSIDENTIFY_H_ 2 | #define EASYPR_CORE_CHARSIDENTIFY_H_ 3 | 4 | #include 5 | #include "opencv2/opencv.hpp" 6 | 7 | #include "easypr/util/kv.h" 8 | #include "easypr/core/character.hpp" 9 | #include "easypr/core/feature.h" 10 | 11 | namespace easypr { 12 | 13 | class CharsIdentify { 14 | public: 15 | static CharsIdentify* instance(); 16 | 17 | int classify(cv::Mat f, float& maxVal, bool isChinses = false, bool isAlphabet = false); 18 | void classify(cv::Mat featureRows, std::vector& out_maxIndexs, 19 | std::vector& out_maxVals, std::vector isChineseVec); 20 | void classify(std::vector& charVec); 21 | 22 | void classifyChinese(std::vector& charVec); 23 | void classifyChineseGray(std::vector& charVec); 24 | 25 | std::pair identify(cv::Mat input, bool isChinese = false, bool isAlphabet = false); 26 | int identify(std::vector inputs, std::vector>& outputs, 27 | std::vector isChineseVec); 28 | 29 | std::pair identifyChinese(cv::Mat input, float& result, bool& isChinese); 30 | std::pair identifyChineseGray(cv::Mat input, float& result, bool& isChinese); 31 | 32 | bool isCharacter(cv::Mat input, std::string& label, float& maxVal, bool isChinese = false); 33 | 34 | void LoadModel(std::string path); 35 | void LoadChineseModel(std::string path); 36 | void LoadGrayChANN(std::string path); 37 | void LoadChineseMapping(std::string path); 38 | 39 | private: 40 | CharsIdentify(); 41 | annCallback extractFeature; 42 | static CharsIdentify* instance_; 43 | 44 | // binary character classifer 45 | cv::Ptr ann_; 46 | 47 | // binary character classifer, only for chinese 48 | cv::Ptr annChinese_; 49 | 50 | // gray classifer, only for chinese 51 | cv::Ptr annGray_; 52 | 53 | // used for chinese mapping 54 | std::shared_ptr kv_; 55 | }; 56 | } 57 | 58 | #endif // EASYPR_CORE_CHARSIDENTIFY_H_ -------------------------------------------------------------------------------- /app/src/main/jni/include/easypr/core/feature.h: -------------------------------------------------------------------------------- 1 | #ifndef EASYPR_CORE_FEATURE_H_ 2 | #define EASYPR_CORE_FEATURE_H_ 3 | 4 | #include "opencv2/opencv.hpp" 5 | 6 | using namespace cv; 7 | 8 | namespace easypr { 9 | 10 | //! 获得车牌的特征数 11 | cv::Mat getHistogram(cv::Mat in); 12 | 13 | //! EasyPR的getFeatures回调函数 14 | //! 用于从车牌的image生成svm的训练特征features 15 | typedef void (*svmCallback)(const cv::Mat& image, cv::Mat& features); 16 | 17 | //! EasyPR的getFeatures回调函数 18 | //! convert from images to features used by gray char ann 19 | typedef void (*annCallback)(const cv::Mat& image, cv::Mat& features); 20 | 21 | //! gray and project feature 22 | void getGrayPlusProject(const cv::Mat& grayChar, cv::Mat& features); 23 | 24 | //! EasyPR的getFeatures回调函数 25 | //! 本函数是获取垂直和水平的直方图图值 26 | void getHistogramFeatures(const cv::Mat& image, cv::Mat& features); 27 | 28 | //! 本函数是获取SIFT特征子 29 | void getSIFTFeatures(const cv::Mat& image, cv::Mat& features); 30 | 31 | //! 本函数是获取HOG特征子 32 | void getHOGFeatures(const cv::Mat& image, cv::Mat& features); 33 | 34 | //! 本函数是获取HSV空间量化的直方图特征子 35 | void getHSVHistFeatures(const cv::Mat& image, cv::Mat& features); 36 | 37 | //! LBP feature 38 | void getLBPFeatures(const cv::Mat& image, cv::Mat& features); 39 | 40 | //! color feature 41 | void getColorFeatures(const cv::Mat& src, cv::Mat& features); 42 | 43 | //! color feature and histom 44 | void getHistomPlusColoFeatures(const cv::Mat& image, cv::Mat& features); 45 | 46 | //! get character feature 47 | cv::Mat charFeatures(cv::Mat in, int sizeData); 48 | cv::Mat charFeatures2(cv::Mat in, int sizeData); 49 | 50 | //! LBP feature + Histom feature 51 | void getLBPplusHistFeatures(const cv::Mat& image, cv::Mat& features); 52 | 53 | //! grayChar feauter 54 | void getGrayCharFeatures(const cv::Mat& grayChar, cv::Mat& features); 55 | 56 | void getGrayPlusLBP(const Mat& grayChar, Mat& features); 57 | } /*! \namespace easypr*/ 58 | 59 | #endif // EASYPR_CORE_FEATURE_H_ -------------------------------------------------------------------------------- /app/src/main/jni/include/easypr/core/plate_judge.h: -------------------------------------------------------------------------------- 1 | #ifndef EASYPR_CORE_PLATEJUDGE_H_ 2 | #define EASYPR_CORE_PLATEJUDGE_H_ 3 | 4 | #include "easypr/core/plate.hpp" 5 | #include "easypr/core/feature.h" 6 | 7 | namespace easypr { 8 | 9 | class PlateJudge { 10 | public: 11 | static PlateJudge* instance(); 12 | void LoadModel(std::string path); 13 | 14 | int plateJudgeUsingNMS(const std::vector&, std::vector&, int maxPlates = 5); 15 | int plateSetScore(CPlate& plate); 16 | 17 | int plateJudge(const Mat& plateMat); 18 | int plateJudge(const std::vector &inVec, 19 | std::vector &resultVec); 20 | int plateJudge(const std::vector &inVec, 21 | std::vector &resultVec); 22 | 23 | private: 24 | // singleton 25 | PlateJudge(); 26 | 27 | static PlateJudge* instance_; 28 | 29 | svmCallback extractFeature; 30 | 31 | cv::Ptr svm_; 32 | 33 | }; 34 | } 35 | 36 | #endif // EASYPR_CORE_PLATEJUDGE_H_ -------------------------------------------------------------------------------- /app/src/main/jni/include/easypr/core/plate_recognize.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////// 2 | // Name: plate_recognize Header 3 | // Version: 1.0 4 | // Date: 2014-09-28 5 | // Author: liuruoze 6 | // Copyright: liuruoze 7 | // Reference: Mastering OpenCV with Practical Computer Vision Projects 8 | // Reference: CSDN Bloger taotao1233 9 | // Desciption: 10 | // Defines CPlateRecognize 11 | ////////////////////////////////////////////////////////////////////////// 12 | #ifndef EASYPR_CORE_PLATERECOGNIZE_H_ 13 | #define EASYPR_CORE_PLATERECOGNIZE_H_ 14 | 15 | #include "easypr/core/plate_detect.h" 16 | #include "easypr/core/chars_recognise.h" 17 | 18 | /*! \namespace easypr 19 | Namespace where all the C++ EasyPR functionality resides 20 | */ 21 | namespace easypr { 22 | 23 | class CPlateRecognize : public CPlateDetect, public CCharsRecognise { 24 | public: 25 | CPlateRecognize(); 26 | 27 | int plateRecognize(const Mat& src, std::vector &plateVec, int img_index = 0); 28 | int plateRecognize(const Mat& src, std::vector &licenseVec); 29 | 30 | inline void setLifemode(bool param) { CPlateDetect::setPDLifemode(param); } 31 | inline void setDetectType(int param) { CPlateDetect::setDetectType(param); } 32 | 33 | inline void setResultShow(bool param) { m_showResult = param; } 34 | inline bool getResultShow() const { return m_showResult; } 35 | inline void setDetectShow(bool param) { CPlateDetect::setDetectShow(param); } 36 | inline void setDebug(bool param) { setResultShow(param); } 37 | 38 | void LoadSVM(std::string path); 39 | void LoadANN(std::string path); 40 | void LoadChineseANN(std::string path); 41 | 42 | //v1.6 added 43 | void LoadGrayChANN(std::string path); 44 | void LoadChineseMapping(std::string path); 45 | 46 | private: 47 | // show the detect and recognition result image 48 | bool m_showResult; 49 | DISABLE_ASSIGN_AND_COPY(CPlateRecognize); 50 | }; 51 | 52 | } /* \namespace easypr */ 53 | 54 | #endif // EASYPR_CORE_PLATERECOGNIZE_H_ 55 | -------------------------------------------------------------------------------- /app/src/main/jni/include/easypr/train/annCh_train.h: -------------------------------------------------------------------------------- 1 | #ifndef EASYPR_TRAIN_ANNCHTRAIN_H_ 2 | #define EASYPR_TRAIN_ANNCHTRAIN_H_ 3 | 4 | #include "easypr/train/train.h" 5 | #include "easypr/util/kv.h" 6 | #include "easypr/core/feature.h" 7 | #include 8 | 9 | namespace easypr { 10 | 11 | class AnnChTrain : public ITrain { 12 | public: 13 | explicit AnnChTrain(const char* chars_folder, const char* xml); 14 | 15 | virtual void train(); 16 | 17 | virtual void test(); 18 | 19 | std::pair identifyGrayChinese(cv::Mat input); 20 | 21 | inline void setNumberForCount(int n) { 22 | m_number_for_count = n; 23 | } 24 | 25 | private: 26 | virtual cv::Ptr tdata(); 27 | 28 | void trainVal(size_t number_for_count = 100); 29 | 30 | cv::Ptr ann_; 31 | const char* ann_xml_; 32 | const char* chars_folder_; 33 | 34 | std::shared_ptr kv_; 35 | int type; 36 | 37 | int m_number_for_count; 38 | 39 | annCallback extractFeature; 40 | }; 41 | } 42 | 43 | #endif // EASYPR_TRAIN_ANNCHTRAIN_H_ -------------------------------------------------------------------------------- /app/src/main/jni/include/easypr/train/ann_train.h: -------------------------------------------------------------------------------- 1 | #ifndef EASYPR_TRAIN_ANNTRAIN_H_ 2 | #define EASYPR_TRAIN_ANNTRAIN_H_ 3 | 4 | #include "easypr/train/train.h" 5 | #include "easypr/util/kv.h" 6 | #include 7 | 8 | namespace easypr { 9 | 10 | class AnnTrain : public ITrain { 11 | public: 12 | explicit AnnTrain(const char* chars_folder, const char* xml); 13 | 14 | virtual void train(); 15 | 16 | virtual void test(); 17 | 18 | std::pair identifyChinese(cv::Mat input); 19 | std::pair identify(cv::Mat input); 20 | 21 | private: 22 | virtual cv::Ptr tdata(); 23 | 24 | cv::Ptr sdata(size_t number_for_count = 100); 25 | 26 | cv::Ptr ann_; 27 | const char* ann_xml_; 28 | const char* chars_folder_; 29 | 30 | std::shared_ptr kv_; 31 | int type; 32 | }; 33 | } 34 | 35 | #endif // EASYPR_TRAIN_ANNTRAIN_H_ -------------------------------------------------------------------------------- /app/src/main/jni/include/easypr/train/create_data.h: -------------------------------------------------------------------------------- 1 | #ifndef EASYPR_CREATE_DATA_H_ 2 | #define EASYPR_CREATE_DATA_H_ 3 | 4 | #include "opencv2/opencv.hpp" 5 | #include "easypr/config.h" 6 | 7 | using namespace cv; 8 | using namespace std; 9 | 10 | /*! \namespace easypr 11 | Namespace where all the C++ EasyPR functionality resides 12 | */ 13 | namespace easypr { 14 | 15 | // shift an image 16 | Mat translateImg(Mat img, int offsetx, int offsety, int bk = 0); 17 | // rotate an image 18 | Mat rotateImg(Mat source, float angle, int bk = 0); 19 | 20 | // crop the image 21 | Mat cropImg(Mat src, int x, int y, int shift, int bk = 0); 22 | 23 | Mat generateSyntheticImage(const Mat& image, int use_swap = 1); 24 | 25 | } /*! \namespace easypr*/ 26 | 27 | #endif // EASYPR_CREATE_DATA_H_ -------------------------------------------------------------------------------- /app/src/main/jni/include/easypr/train/svm_train.h: -------------------------------------------------------------------------------- 1 | #ifndef EASYPR_TRAIN_SVMTRAIN_H_ 2 | #define EASYPR_TRAIN_SVMTRAIN_H_ 3 | 4 | #include "easypr/train/train.h" 5 | #include 6 | #include "easypr/config.h" 7 | #include "easypr/core/feature.h" 8 | 9 | namespace easypr { 10 | 11 | //int svmTrain(bool dividePrepared, bool trainPrepared); 12 | 13 | class SvmTrain : public ITrain { 14 | public: 15 | typedef struct { 16 | std::string file; 17 | SvmLabel label; 18 | } TrainItem; 19 | 20 | SvmTrain(const char* plates_folder, const char* xml); 21 | 22 | virtual void train(); 23 | 24 | virtual void test(); 25 | 26 | private: 27 | void prepare(); 28 | 29 | virtual cv::Ptr tdata(); 30 | 31 | cv::Ptr svm_; 32 | const char* plates_folder_; 33 | const char* svm_xml_; 34 | std::vector train_file_list_; 35 | std::vector test_file_list_; 36 | 37 | svmCallback extractFeature; 38 | bool isPrepared = true; 39 | }; 40 | } 41 | 42 | #endif // EASYPR_TRAIN_SVMTRAIN_H_ 43 | -------------------------------------------------------------------------------- /app/src/main/jni/include/easypr/train/train.h: -------------------------------------------------------------------------------- 1 | #ifndef EASYPR_TRAIN_TRAIN_H_ 2 | #define EASYPR_TRAIN_TRAIN_H_ 3 | 4 | #include 5 | 6 | namespace easypr { 7 | 8 | class ITrain { 9 | public: 10 | ITrain(); 11 | 12 | virtual ~ITrain(); 13 | 14 | virtual void train() = 0; 15 | 16 | virtual void test() = 0; 17 | 18 | private: 19 | virtual cv::Ptr tdata() = 0; 20 | }; 21 | } 22 | 23 | #endif // EASYPR_TRAIN_TRAIN_H_ -------------------------------------------------------------------------------- /app/src/main/jni/include/easypr/util/kv.h: -------------------------------------------------------------------------------- 1 | #ifndef EASYPR_UTIL_KV_H_ 2 | #define EASYPR_UTIL_KV_H_ 3 | 4 | #include 5 | #include 6 | 7 | namespace easypr { 8 | 9 | class Kv { 10 | public: 11 | Kv(); 12 | 13 | void load(const std::string &file); 14 | 15 | std::string get(const std::string &key); 16 | 17 | void add(const std::string &key, const std::string &value); 18 | 19 | void remove(const std::string &key); 20 | 21 | void clear(); 22 | 23 | private: 24 | std::map data_; 25 | }; 26 | 27 | } 28 | 29 | #endif // EASYPR_UTIL_KV_H_ -------------------------------------------------------------------------------- /app/src/main/jni/include/easypr/version.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define CV_VERSION_ID CVAUX_STR(CV_MAJOR_VERSION) CVAUX_STR(CV_MINOR_VERSION) CVAUX_STR(CV_SUBMINOR_VERSION) 4 | 5 | #ifdef _DEBUG 6 | #define cvLIB(name) "opencv_" name CV_VERSION_ID "d" 7 | #else 8 | #define cvLIB(name) "opencv_" name CV_VERSION_ID 9 | #endif 10 | 11 | #pragma comment( lib, cvLIB("core") ) 12 | #pragma comment( lib, cvLIB("imgproc") ) 13 | #pragma comment( lib, cvLIB("highgui") ) 14 | #pragma comment( lib, cvLIB("flann") ) 15 | #pragma comment( lib, cvLIB("features2d") ) 16 | #pragma comment( lib, cvLIB("calib3d") ) 17 | #pragma comment( lib, cvLIB("gpu") ) 18 | #pragma comment( lib, cvLIB("legacy") ) 19 | #pragma comment( lib, cvLIB("ml") ) 20 | #pragma comment( lib, cvLIB("objdetect") ) 21 | #pragma comment( lib, cvLIB("ts") ) 22 | #pragma comment( lib, cvLIB("video") ) 23 | #pragma comment( lib, cvLIB("contrib") ) 24 | #pragma comment( lib, cvLIB("nonfree") ) -------------------------------------------------------------------------------- /app/src/main/jni/include/freetype/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file registers the FreeType modules compiled into the library. 3 | * 4 | * If you use GNU make, this file IS NOT USED! Instead, it is created in 5 | * the objects directory (normally `/objs/') based on information 6 | * from `/modules.cfg'. 7 | * 8 | * Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile 9 | * FreeType without GNU make. 10 | * 11 | */ 12 | 13 | //FT_USE_MODULE( FT_Module_Class, autofit_module_class ) 14 | FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) 15 | //FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) 16 | FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) 17 | //FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) 18 | //FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) 19 | //FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) 20 | //FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) 21 | //FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) 22 | //FT_USE_MODULE( FT_Module_Class, psaux_module_class ) 23 | FT_USE_MODULE( FT_Module_Class, psnames_module_class ) 24 | FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) 25 | FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) 26 | FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) 27 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) 28 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) 29 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) 30 | //FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) 31 | 32 | /* EOF */ 33 | -------------------------------------------------------------------------------- /app/src/main/jni/include/freetype/internal/pcftypes.h: -------------------------------------------------------------------------------- 1 | /* pcftypes.h 2 | 3 | FreeType font driver for pcf fonts 4 | 5 | Copyright (C) 2000, 2001, 2002 by 6 | Francesco Zappa Nardelli 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | */ 26 | 27 | 28 | #ifndef __PCFTYPES_H__ 29 | #define __PCFTYPES_H__ 30 | 31 | 32 | #include 33 | #include FT_FREETYPE_H 34 | 35 | 36 | FT_BEGIN_HEADER 37 | 38 | 39 | typedef struct PCF_Public_FaceRec_ 40 | { 41 | FT_FaceRec root; 42 | FT_StreamRec gzip_stream; 43 | FT_Stream gzip_source; 44 | 45 | char* charset_encoding; 46 | char* charset_registry; 47 | 48 | } PCF_Public_FaceRec, *PCF_Public_Face; 49 | 50 | 51 | FT_END_HEADER 52 | 53 | #endif /* __PCFTYPES_H__ */ 54 | 55 | 56 | /* END */ 57 | -------------------------------------------------------------------------------- /app/src/main/jni/include/freetype/internal/services/svkern.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svkern.h */ 4 | /* */ 5 | /* The FreeType Kerning service (specification). */ 6 | /* */ 7 | /* Copyright 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVKERN_H__ 20 | #define __SVKERN_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_TRUETYPE_TABLES_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | #define FT_SERVICE_ID_KERNING "kerning" 29 | 30 | 31 | typedef FT_Error 32 | (*FT_Kerning_TrackGetFunc)( FT_Face face, 33 | FT_Fixed point_size, 34 | FT_Int degree, 35 | FT_Fixed* akerning ); 36 | 37 | FT_DEFINE_SERVICE( Kerning ) 38 | { 39 | FT_Kerning_TrackGetFunc get_track; 40 | }; 41 | 42 | /* */ 43 | 44 | 45 | FT_END_HEADER 46 | 47 | 48 | #endif /* __SVKERN_H__ */ 49 | 50 | 51 | /* END */ 52 | -------------------------------------------------------------------------------- /app/src/main/jni/include/freetype/internal/services/svotval.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svotval.h */ 4 | /* */ 5 | /* The FreeType OpenType validation service (specification). */ 6 | /* */ 7 | /* Copyright 2004, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVOTVAL_H__ 20 | #define __SVOTVAL_H__ 21 | 22 | #include FT_OPENTYPE_VALIDATE_H 23 | #include FT_INTERNAL_VALIDATE_H 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | #define FT_SERVICE_ID_OPENTYPE_VALIDATE "opentype-validate" 29 | 30 | 31 | typedef FT_Error 32 | (*otv_validate_func)( FT_Face volatile face, 33 | FT_UInt ot_flags, 34 | FT_Bytes *base, 35 | FT_Bytes *gdef, 36 | FT_Bytes *gpos, 37 | FT_Bytes *gsub, 38 | FT_Bytes *jstf ); 39 | 40 | 41 | FT_DEFINE_SERVICE( OTvalidate ) 42 | { 43 | otv_validate_func validate; 44 | }; 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* __SVOTVAL_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /app/src/main/jni/include/freetype/internal/services/svtteng.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svtteng.h */ 4 | /* */ 5 | /* The FreeType TrueType engine query service (specification). */ 6 | /* */ 7 | /* Copyright 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVTTENG_H__ 20 | #define __SVTTENG_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_MODULE_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | /* 30 | * SFNT table loading service. 31 | */ 32 | 33 | #define FT_SERVICE_ID_TRUETYPE_ENGINE "truetype-engine" 34 | 35 | /* 36 | * Used to implement FT_Get_TrueType_Engine_Type 37 | */ 38 | 39 | FT_DEFINE_SERVICE( TrueTypeEngine ) 40 | { 41 | FT_TrueTypeEngineType engine_type; 42 | }; 43 | 44 | /* */ 45 | 46 | 47 | FT_END_HEADER 48 | 49 | 50 | #endif /* __SVTTENG_H__ */ 51 | 52 | 53 | /* END */ 54 | -------------------------------------------------------------------------------- /app/src/main/jni/include/freetype/internal/services/svwinfnt.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svwinfnt.h */ 4 | /* */ 5 | /* The FreeType Windows FNT/FONT service (specification). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVWINFNT_H__ 20 | #define __SVWINFNT_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | #include FT_WINFONTS_H 24 | 25 | 26 | FT_BEGIN_HEADER 27 | 28 | 29 | #define FT_SERVICE_ID_WINFNT "winfonts" 30 | 31 | typedef FT_Error 32 | (*FT_WinFnt_GetHeaderFunc)( FT_Face face, 33 | FT_WinFNT_HeaderRec *aheader ); 34 | 35 | 36 | FT_DEFINE_SERVICE( WinFnt ) 37 | { 38 | FT_WinFnt_GetHeaderFunc get_header; 39 | }; 40 | 41 | /* */ 42 | 43 | 44 | FT_END_HEADER 45 | 46 | 47 | #endif /* __SVWINFNT_H__ */ 48 | 49 | 50 | /* END */ 51 | -------------------------------------------------------------------------------- /app/src/main/jni/include/freetype/internal/services/svxf86nm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* svxf86nm.h */ 4 | /* */ 5 | /* The FreeType XFree86 services (specification only). */ 6 | /* */ 7 | /* Copyright 2003 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* This file is part of the FreeType project, and may only be used, */ 11 | /* modified, and distributed under the terms of the FreeType project */ 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 | /* this file you indicate that you have read the license and */ 14 | /* understand and accept it fully. */ 15 | /* */ 16 | /***************************************************************************/ 17 | 18 | 19 | #ifndef __SVXF86NM_H__ 20 | #define __SVXF86NM_H__ 21 | 22 | #include FT_INTERNAL_SERVICE_H 23 | 24 | 25 | FT_BEGIN_HEADER 26 | 27 | 28 | /* 29 | * A trivial service used to return the name of a face's font driver, 30 | * according to the XFree86 nomenclature. Note that the service data 31 | * is a simple constant string pointer. 32 | */ 33 | 34 | #define FT_SERVICE_ID_XF86_NAME "xf86-driver-name" 35 | 36 | #define FT_XF86_FORMAT_TRUETYPE "TrueType" 37 | #define FT_XF86_FORMAT_TYPE_1 "Type 1" 38 | #define FT_XF86_FORMAT_BDF "BDF" 39 | #define FT_XF86_FORMAT_PCF "PCF" 40 | #define FT_XF86_FORMAT_TYPE_42 "Type 42" 41 | #define FT_XF86_FORMAT_CID "CID Type 1" 42 | #define FT_XF86_FORMAT_CFF "CFF" 43 | #define FT_XF86_FORMAT_PFR "PFR" 44 | #define FT_XF86_FORMAT_WINFNT "Windows FNT" 45 | 46 | /* */ 47 | 48 | 49 | FT_END_HEADER 50 | 51 | 52 | #endif /* __SVXF86NM_H__ */ 53 | 54 | 55 | /* END */ 56 | -------------------------------------------------------------------------------- /app/src/main/jni/include/freetype/ttunpat.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttunpat.h */ 4 | /* */ 5 | /* Definitions for the unpatented TrueType hinting system */ 6 | /* */ 7 | /* Copyright 2003, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* Written by Graham Asher */ 11 | /* */ 12 | /* This file is part of the FreeType project, and may only be used, */ 13 | /* modified, and distributed under the terms of the FreeType project */ 14 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 15 | /* this file you indicate that you have read the license and */ 16 | /* understand and accept it fully. */ 17 | /* */ 18 | /***************************************************************************/ 19 | 20 | 21 | #ifndef __TTUNPAT_H__ 22 | #define __TTUNPAT_H__ 23 | 24 | 25 | #include 26 | #include FT_FREETYPE_H 27 | 28 | #ifdef FREETYPE_H 29 | #error "freetype.h of FreeType 1 has been loaded!" 30 | #error "Please fix the directory search order for header files" 31 | #error "so that freetype.h of FreeType 2 is found first." 32 | #endif 33 | 34 | 35 | FT_BEGIN_HEADER 36 | 37 | 38 | /*************************************************************************** 39 | * 40 | * @constant: 41 | * FT_PARAM_TAG_UNPATENTED_HINTING 42 | * 43 | * @description: 44 | * A constant used as the tag of an @FT_Parameter structure to indicate 45 | * that unpatented methods only should be used by the TrueType bytecode 46 | * interpreter for a typeface opened by @FT_Open_Face. 47 | * 48 | */ 49 | #define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) 50 | 51 | /* */ 52 | 53 | FT_END_HEADER 54 | 55 | 56 | #endif /* __TTUNPAT_H__ */ 57 | 58 | 59 | /* END */ 60 | -------------------------------------------------------------------------------- /app/src/main/jni/include/ft2build.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ft2build.h */ 4 | /* */ 5 | /* FreeType 2 build and setup macros. */ 6 | /* (Generic version) */ 7 | /* */ 8 | /* Copyright 1996-2001, 2006 by */ 9 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 | /* */ 11 | /* This file is part of the FreeType project, and may only be used, */ 12 | /* modified, and distributed under the terms of the FreeType project */ 13 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 14 | /* this file you indicate that you have read the license and */ 15 | /* understand and accept it fully. */ 16 | /* */ 17 | /***************************************************************************/ 18 | 19 | 20 | /*************************************************************************/ 21 | /* */ 22 | /* This file corresponds to the default `ft2build.h' file for */ 23 | /* FreeType 2. It uses the `freetype' include root. */ 24 | /* */ 25 | /* Note that specific platforms might use a different configuration. */ 26 | /* See builds/unix/ft2unix.h for an example. */ 27 | /* */ 28 | /*************************************************************************/ 29 | 30 | 31 | #ifndef __FT2_BUILD_GENERIC_H__ 32 | #define __FT2_BUILD_GENERIC_H__ 33 | 34 | #include 35 | 36 | #endif /* __FT2_BUILD_GENERIC_H__ */ 37 | 38 | 39 | /* END */ 40 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv/cvwimage.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 3 | // 4 | // By downloading, copying, installing or using the software you agree to 5 | // this license. If you do not agree to this license, do not download, 6 | // install, copy or use the software. 7 | // 8 | // License Agreement 9 | // For Open Source Computer Vision Library 10 | // 11 | // Copyright (C) 2008, Google, all rights reserved. 12 | // Third party copyrights are property of their respective owners. 13 | // 14 | // Redistribution and use in source and binary forms, with or without 15 | // modification, are permitted provided that the following conditions are met: 16 | // 17 | // * Redistribution's of source code must retain the above copyright notice, 18 | // this list of conditions and the following disclaimer. 19 | // 20 | // * Redistribution's in binary form must reproduce the above copyright notice, 21 | // this list of conditions and the following disclaimer in the documentation 22 | // and/or other materials provided with the distribution. 23 | // 24 | // * The name of Intel Corporation or contributors may not be used to endorse 25 | // or promote products derived from this software without specific 26 | // prior written permission. 27 | // 28 | // This software is provided by the copyright holders and contributors "as is" 29 | // and any express or implied warranties, including, but not limited to, the 30 | // implied warranties of merchantability and fitness for a particular purpose 31 | // are disclaimed. In no event shall the Intel Corporation or contributors be 32 | // liable for any direct, indirect, incidental, special, exemplary, or 33 | // consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | 40 | 41 | #ifndef OPENCV_OLD_WIMAGE_HPP 42 | #define OPENCV_OLD_WIMAGE_HPP 43 | 44 | #include "opencv2/core/wimage.hpp" 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv/cxeigen.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef OPENCV_OLD_EIGEN_HPP 44 | #define OPENCV_OLD_EIGEN_HPP 45 | 46 | #include "opencv2/core/eigen.hpp" 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv/cxmisc.h: -------------------------------------------------------------------------------- 1 | #ifndef OPENCV_OLD_CXMISC_H 2 | #define OPENCV_OLD_CXMISC_H 3 | 4 | #ifdef __cplusplus 5 | # include "opencv2/core/utility.hpp" 6 | #endif 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv/highgui.h: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // Intel License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000, Intel Corporation, all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of Intel Corporation may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the Intel Corporation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef OPENCV_OLD_HIGHGUI_H 43 | #define OPENCV_OLD_HIGHGUI_H 44 | 45 | #include "opencv2/core/core_c.h" 46 | #include "opencv2/highgui/highgui_c.h" 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv/ml.h: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // Intel License Agreement 11 | // 12 | // Copyright (C) 2000, Intel Corporation, all rights reserved. 13 | // Third party copyrights are property of their respective owners. 14 | // 15 | // Redistribution and use in source and binary forms, with or without modification, 16 | // are permitted provided that the following conditions are met: 17 | // 18 | // * Redistribution's of source code must retain the above copyright notice, 19 | // this list of conditions and the following disclaimer. 20 | // 21 | // * Redistribution's in binary form must reproduce the above copyright notice, 22 | // this list of conditions and the following disclaimer in the documentation 23 | // and/or other materials provided with the distribution. 24 | // 25 | // * The name of Intel Corporation may not be used to endorse or promote products 26 | // derived from this software without specific prior written permission. 27 | // 28 | // This software is provided by the copyright holders and contributors "as is" and 29 | // any express or implied warranties, including, but not limited to, the implied 30 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 31 | // In no event shall the Intel Corporation or contributors be liable for any direct, 32 | // indirect, incidental, special, exemplary, or consequential damages 33 | // (including, but not limited to, procurement of substitute goods or services; 34 | // loss of use, data, or profits; or business interruption) however caused 35 | // and on any theory of liability, whether in contract, strict liability, 36 | // or tort (including negligence or otherwise) arising in any way out of 37 | // the use of this software, even if advised of the possibility of such damage. 38 | // 39 | //M*/ 40 | 41 | #ifndef OPENCV_OLD_ML_H 42 | #define OPENCV_OLD_ML_H 43 | 44 | #include "opencv2/core/core_c.h" 45 | #include "opencv2/ml.hpp" 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/core/bufferpool.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | // 5 | // Copyright (C) 2014, Advanced Micro Devices, Inc., all rights reserved. 6 | 7 | #ifndef OPENCV_CORE_BUFFER_POOL_HPP 8 | #define OPENCV_CORE_BUFFER_POOL_HPP 9 | 10 | #ifdef _MSC_VER 11 | #pragma warning(push) 12 | #pragma warning(disable: 4265) 13 | #endif 14 | 15 | namespace cv 16 | { 17 | 18 | //! @addtogroup core 19 | //! @{ 20 | 21 | class BufferPoolController 22 | { 23 | protected: 24 | ~BufferPoolController() { } 25 | public: 26 | virtual size_t getReservedSize() const = 0; 27 | virtual size_t getMaxReservedSize() const = 0; 28 | virtual void setMaxReservedSize(size_t size) = 0; 29 | virtual void freeAllReservedBuffers() = 0; 30 | }; 31 | 32 | //! @} 33 | 34 | } 35 | 36 | #ifdef _MSC_VER 37 | #pragma warning(pop) 38 | #endif 39 | 40 | #endif // OPENCV_CORE_BUFFER_POOL_HPP 41 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/core/ovx.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | 5 | // Copyright (C) 2016, Intel Corporation, all rights reserved. 6 | // Third party copyrights are property of their respective owners. 7 | 8 | // OpenVX related definitions and declarations 9 | 10 | #pragma once 11 | #ifndef OPENCV_OVX_HPP 12 | #define OPENCV_OVX_HPP 13 | 14 | #include "cvdef.h" 15 | 16 | namespace cv 17 | { 18 | /// Check if use of OpenVX is possible 19 | CV_EXPORTS_W bool haveOpenVX(); 20 | 21 | /// Check if use of OpenVX is enabled 22 | CV_EXPORTS_W bool useOpenVX(); 23 | 24 | /// Enable/disable use of OpenVX 25 | CV_EXPORTS_W void setUseOpenVX(bool flag); 26 | } // namespace cv 27 | 28 | #endif // OPENCV_OVX_HPP 29 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/flann/config.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2011 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2011 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | *************************************************************************/ 28 | 29 | 30 | #ifndef OPENCV_FLANN_CONFIG_H_ 31 | #define OPENCV_FLANN_CONFIG_H_ 32 | 33 | #ifdef FLANN_VERSION_ 34 | #undef FLANN_VERSION_ 35 | #endif 36 | #define FLANN_VERSION_ "1.6.10" 37 | 38 | #endif /* OPENCV_FLANN_CONFIG_H_ */ 39 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/flann/dummy.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef OPENCV_FLANN_DUMMY_H_ 3 | #define OPENCV_FLANN_DUMMY_H_ 4 | 5 | namespace cvflann 6 | { 7 | 8 | #if (defined _WIN32 || defined WINCE) && defined CVAPI_EXPORTS 9 | __declspec(dllexport) 10 | #endif 11 | void dummyfunc(); 12 | 13 | } 14 | 15 | 16 | #endif /* OPENCV_FLANN_DUMMY_H_ */ 17 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/flann/general.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_GENERAL_H_ 32 | #define OPENCV_FLANN_GENERAL_H_ 33 | 34 | #include "opencv2/core.hpp" 35 | 36 | namespace cvflann 37 | { 38 | 39 | class FLANNException : public cv::Exception 40 | { 41 | public: 42 | FLANNException(const char* message) : cv::Exception(0, message, "", __FILE__, __LINE__) { } 43 | 44 | FLANNException(const cv::String& message) : cv::Exception(0, message, "", __FILE__, __LINE__) { } 45 | }; 46 | 47 | } 48 | 49 | 50 | #endif /* OPENCV_FLANN_GENERAL_H_ */ 51 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/img_hash/average_hash.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | 5 | #ifndef OPENCV_AVERAGE_HASH_HPP 6 | #define OPENCV_AVERAGE_HASH_HPP 7 | 8 | #include "img_hash_base.hpp" 9 | 10 | namespace cv { 11 | namespace img_hash { 12 | 13 | //! @addtogroup img_hash 14 | //! @{ 15 | 16 | /** @brief Computes average hash value of the input image 17 | 18 | This is a fast image hashing algorithm, but only work on simple case. For more details, please 19 | refer to @cite lookslikeit 20 | */ 21 | class CV_EXPORTS_W AverageHash : public ImgHashBase 22 | { 23 | public: 24 | CV_WRAP static Ptr create(); 25 | protected: 26 | AverageHash() {} 27 | }; 28 | 29 | /** @brief Calculates img_hash::AverageHash in one call 30 | @param inputArr input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1. 31 | @param outputArr Hash value of input, it will contain 16 hex decimal number, return type is CV_8U 32 | */ 33 | CV_EXPORTS_W void averageHash(cv::InputArray inputArr, cv::OutputArray outputArr); 34 | 35 | //! @} 36 | 37 | }} // cv::img_hash:: 38 | 39 | #endif // OPENCV_AVERAGE_HASH_HPP 40 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/img_hash/block_mean_hash.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | 5 | #ifndef OPENCV_BLOCK_MEAN_HASH_HPP 6 | #define OPENCV_BLOCK_MEAN_HASH_HPP 7 | 8 | #include "img_hash_base.hpp" 9 | 10 | namespace cv { 11 | namespace img_hash { 12 | 13 | //! @addtogroup img_hash 14 | //! @{ 15 | 16 | enum BlockMeanHashMode 17 | { 18 | BLOCK_MEAN_HASH_MODE_0 = 0, //!< use fewer block and generate 16*16/8 uchar hash value 19 | BLOCK_MEAN_HASH_MODE_1 = 1, //!< use block blocks(step sizes/2), generate 31*31/8 + 1 uchar hash value 20 | }; 21 | 22 | /** @brief Image hash based on block mean. 23 | 24 | See @cite zauner2010implementation for details. 25 | */ 26 | class CV_EXPORTS_W BlockMeanHash : public ImgHashBase 27 | { 28 | public: 29 | /** @brief Create BlockMeanHash object 30 | @param mode 31 | */ 32 | CV_WRAP void setMode(int mode); 33 | CV_WRAP std::vector getMean() const; 34 | CV_WRAP static Ptr create(int mode = BLOCK_MEAN_HASH_MODE_0); 35 | protected: 36 | BlockMeanHash() {} 37 | }; 38 | 39 | /** @brief Computes block mean hash of the input image 40 | @param inputArr input image want to compute hash value, type should be CV_8UC4, CV_8UC3 or CV_8UC1. 41 | @param outputArr Hash value of input, it will contain 16 hex decimal number, return type is CV_8U 42 | @param mode 43 | */ 44 | CV_EXPORTS_W void blockMeanHash(cv::InputArray inputArr, 45 | cv::OutputArray outputArr, 46 | int mode = BLOCK_MEAN_HASH_MODE_0); 47 | 48 | //! @} 49 | 50 | }} // cv::img_hash:: 51 | 52 | #endif // OPENCV_BLOCK_MEAN_HASH_HPP 53 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/img_hash/color_moment_hash.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | 5 | #ifndef OPENCV_COLOR_MOMENT_HASH_HPP 6 | #define OPENCV_COLOR_MOMENT_HASH_HPP 7 | 8 | #include "img_hash_base.hpp" 9 | 10 | namespace cv { 11 | namespace img_hash { 12 | 13 | //! @addtogroup img_hash 14 | //! @{ 15 | 16 | /** @brief Image hash based on color moments. 17 | 18 | See @cite tang2012perceptual for details. 19 | */ 20 | class CV_EXPORTS_W ColorMomentHash : public ImgHashBase 21 | { 22 | public: 23 | CV_WRAP static Ptr create(); 24 | protected: 25 | ColorMomentHash() {} 26 | }; 27 | 28 | /** @brief Computes color moment hash of the input, the algorithm 29 | is come from the paper "Perceptual Hashing for Color Images 30 | Using Invariant Moments" 31 | @param inputArr input image want to compute hash value, 32 | type should be CV_8UC4, CV_8UC3 or CV_8UC1. 33 | @param outputArr 42 hash values with type CV_64F(double) 34 | */ 35 | CV_EXPORTS_W void colorMomentHash(cv::InputArray inputArr, cv::OutputArray outputArr); 36 | 37 | //! @} 38 | 39 | }} // cv::img_hash:: 40 | 41 | #endif // OPENCV_COLOR_MOMENT_HASH_HPP 42 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/img_hash/img_hash_base.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | 5 | #ifndef OPENCV_IMG_HASH_BASE_HPP 6 | #define OPENCV_IMG_HASH_BASE_HPP 7 | 8 | #include "opencv2/core.hpp" 9 | 10 | namespace cv { 11 | namespace img_hash { 12 | 13 | //! @addtogroup img_hash 14 | //! @{ 15 | 16 | /** @brief The base class for image hash algorithms 17 | */ 18 | class CV_EXPORTS_W ImgHashBase : public Algorithm 19 | { 20 | public: 21 | class ImgHashImpl; 22 | 23 | ~ImgHashBase(); 24 | /** @brief Computes hash of the input image 25 | @param inputArr input image want to compute hash value 26 | @param outputArr hash of the image 27 | */ 28 | CV_WRAP void compute(cv::InputArray inputArr, cv::OutputArray outputArr); 29 | /** @brief Compare the hash value between inOne and inTwo 30 | @param hashOne Hash value one 31 | @param hashTwo Hash value two 32 | @return value indicate similarity between inOne and inTwo, the meaning 33 | of the value vary from algorithms to algorithms 34 | */ 35 | CV_WRAP double compare(cv::InputArray hashOne, cv::InputArray hashTwo) const; 36 | protected: 37 | ImgHashBase(); 38 | protected: 39 | Ptr pImpl; 40 | }; 41 | 42 | //! @} 43 | 44 | } } // cv::img_hash:: 45 | 46 | #endif // OPENCV_IMG_HASH_BASE_HPP 47 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/img_hash/marr_hildreth_hash.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | 5 | #ifndef OPENCV_MARR_HILDRETH_HASH_HPP 6 | #define OPENCV_MARR_HILDRETH_HASH_HPP 7 | 8 | #include "img_hash_base.hpp" 9 | 10 | namespace cv { 11 | namespace img_hash { 12 | 13 | //! @addtogroup img_hash 14 | //! @{ 15 | 16 | /** @brief Marr-Hildreth Operator Based Hash, slowest but more discriminative. 17 | 18 | See @cite zauner2010implementation for details. 19 | */ 20 | class CV_EXPORTS_W MarrHildrethHash : public ImgHashBase 21 | { 22 | public: 23 | /** 24 | * @brief self explain 25 | */ 26 | CV_WRAP float getAlpha() const; 27 | 28 | /** 29 | * @brief self explain 30 | */ 31 | CV_WRAP float getScale() const; 32 | 33 | /** @brief Set Mh kernel parameters 34 | @param alpha int scale factor for marr wavelet (default=2). 35 | @param scale int level of scale factor (default = 1) 36 | */ 37 | CV_WRAP void setKernelParam(float alpha, float scale); 38 | 39 | /** 40 | @param alpha int scale factor for marr wavelet (default=2). 41 | @param scale int level of scale factor (default = 1) 42 | */ 43 | CV_WRAP static Ptr create(float alpha = 2.0f, float scale = 1.0f); 44 | protected: 45 | MarrHildrethHash() {} 46 | }; 47 | 48 | /** @brief Computes average hash value of the input image 49 | @param inputArr input image want to compute hash value, 50 | type should be CV_8UC4, CV_8UC3, CV_8UC1. 51 | @param outputArr Hash value of input, it will contain 16 hex 52 | decimal number, return type is CV_8U 53 | @param alpha int scale factor for marr wavelet (default=2). 54 | @param scale int level of scale factor (default = 1) 55 | */ 56 | CV_EXPORTS_W void marrHildrethHash(cv::InputArray inputArr, 57 | cv::OutputArray outputArr, 58 | float alpha = 2.0f, float scale = 1.0f); 59 | 60 | //! @} 61 | 62 | }} // cv::img_hash:: 63 | 64 | #endif // OPENCV_MARR_HILDRETH_HASH_HPP 65 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/img_hash/phash.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | 5 | #ifndef OPENCV_PHASH_HPP 6 | #define OPENCV_PHASH_HPP 7 | 8 | #include "img_hash_base.hpp" 9 | 10 | namespace cv { 11 | namespace img_hash { 12 | 13 | //! @addtogroup img_hash 14 | //! @{ 15 | 16 | /** @brief pHash 17 | 18 | Slower than average_hash, but tolerant of minor modifications 19 | 20 | This algorithm can combat more variation than averageHash, for more details please refer to @cite lookslikeit 21 | */ 22 | class CV_EXPORTS_W PHash : public ImgHashBase 23 | { 24 | public: 25 | CV_WRAP static Ptr create(); 26 | protected: 27 | PHash() {} 28 | }; 29 | 30 | /** @brief Computes pHash value of the input image 31 | @param inputArr input image want to compute hash value, 32 | type should be CV_8UC4, CV_8UC3, CV_8UC1. 33 | @param outputArr Hash value of input, it will contain 8 uchar value 34 | */ 35 | CV_EXPORTS_W void pHash(cv::InputArray inputArr, cv::OutputArray outputArr); 36 | 37 | //! @} 38 | 39 | } } // cv::img_hash:: 40 | 41 | #endif // OPENCV_PHASH_HPP 42 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/img_hash/radial_variance_hash.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | 5 | #ifndef OPENCV_RADIAL_VARIANCE_HASH_HPP 6 | #define OPENCV_RADIAL_VARIANCE_HASH_HPP 7 | 8 | #include "img_hash_base.hpp" 9 | 10 | namespace cv { 11 | namespace img_hash { 12 | 13 | //! @addtogroup img_hash 14 | //! @{ 15 | 16 | 17 | /** @brief Image hash based on Radon transform. 18 | 19 | See @cite tang2012perceptual for details. 20 | */ 21 | class CV_EXPORTS_W RadialVarianceHash : public ImgHashBase 22 | { 23 | public: 24 | CV_WRAP static Ptr create(double sigma = 1, int numOfAngleLine = 180); 25 | 26 | CV_WRAP int getNumOfAngleLine() const; 27 | CV_WRAP double getSigma() const; 28 | 29 | CV_WRAP void setNumOfAngleLine(int value); 30 | CV_WRAP void setSigma(double value); 31 | 32 | // internals 33 | std::vector getFeatures(); 34 | cv::Mat getHash(); 35 | Mat getPixPerLine(Mat const &input); 36 | Mat getProjection(); 37 | protected: 38 | RadialVarianceHash() {} 39 | }; 40 | 41 | /** @brief Computes radial variance hash of the input image 42 | @param inputArr input image want to compute hash value, 43 | type should be CV_8UC4, CV_8UC3, CV_8UC1. 44 | @param outputArr Hash value of input 45 | @param sigma Gaussian kernel standard deviation 46 | @param numOfAngleLine The number of angles to consider 47 | */ 48 | CV_EXPORTS_W void radialVarianceHash(cv::InputArray inputArr, 49 | cv::OutputArray outputArr, 50 | double sigma = 1, 51 | int numOfAngleLine = 180); 52 | 53 | 54 | //! @} 55 | 56 | }} // cv::img_hash:: 57 | 58 | #endif // OPENCV_RADIAL_VARIANCE_HASH_HPP 59 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/imgproc/hal/interface.h: -------------------------------------------------------------------------------- 1 | #ifndef OPENCV_IMGPROC_HAL_INTERFACE_H 2 | #define OPENCV_IMGPROC_HAL_INTERFACE_H 3 | 4 | //! @addtogroup imgproc_hal_interface 5 | //! @{ 6 | 7 | //! @name Interpolation modes 8 | //! @sa cv::InterpolationFlags 9 | //! @{ 10 | #define CV_HAL_INTER_NEAREST 0 11 | #define CV_HAL_INTER_LINEAR 1 12 | #define CV_HAL_INTER_CUBIC 2 13 | #define CV_HAL_INTER_AREA 3 14 | #define CV_HAL_INTER_LANCZOS4 4 15 | //! @} 16 | 17 | //! @name Morphology operations 18 | //! @sa cv::MorphTypes 19 | //! @{ 20 | #define CV_HAL_MORPH_ERODE 0 21 | #define CV_HAL_MORPH_DILATE 1 22 | //! @} 23 | 24 | //! @} 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/opencv_modules.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ** File generated automatically, do not modify ** 3 | * 4 | * This file defines the list of modules available in current build configuration 5 | * 6 | * 7 | */ 8 | 9 | // This definition means that OpenCV is built with enabled non-free code. 10 | // For example, patented algorithms for non-profit/non-commercial use only. 11 | /* #undef OPENCV_ENABLE_NONFREE */ 12 | 13 | #define HAVE_OPENCV_ARUCO 14 | #define HAVE_OPENCV_BGSEGM 15 | #define HAVE_OPENCV_BIOINSPIRED 16 | #define HAVE_OPENCV_CALIB3D 17 | #define HAVE_OPENCV_CCALIB 18 | #define HAVE_OPENCV_CORE 19 | #define HAVE_OPENCV_DATASETS 20 | #define HAVE_OPENCV_DNN 21 | #define HAVE_OPENCV_DPM 22 | #define HAVE_OPENCV_FACE 23 | #define HAVE_OPENCV_FEATURES2D 24 | #define HAVE_OPENCV_FLANN 25 | #define HAVE_OPENCV_FUZZY 26 | #define HAVE_OPENCV_HIGHGUI 27 | #define HAVE_OPENCV_IMG_HASH 28 | #define HAVE_OPENCV_IMGCODECS 29 | #define HAVE_OPENCV_IMGPROC 30 | #define HAVE_OPENCV_LINE_DESCRIPTOR 31 | #define HAVE_OPENCV_ML 32 | #define HAVE_OPENCV_OBJDETECT 33 | #define HAVE_OPENCV_OPTFLOW 34 | #define HAVE_OPENCV_PHASE_UNWRAPPING 35 | #define HAVE_OPENCV_PHOTO 36 | #define HAVE_OPENCV_PLOT 37 | #define HAVE_OPENCV_REG 38 | #define HAVE_OPENCV_RGBD 39 | #define HAVE_OPENCV_SALIENCY 40 | #define HAVE_OPENCV_SHAPE 41 | #define HAVE_OPENCV_STEREO 42 | #define HAVE_OPENCV_STITCHING 43 | #define HAVE_OPENCV_STRUCTURED_LIGHT 44 | #define HAVE_OPENCV_SUPERRES 45 | #define HAVE_OPENCV_SURFACE_MATCHING 46 | #define HAVE_OPENCV_TEXT 47 | #define HAVE_OPENCV_TRACKING 48 | #define HAVE_OPENCV_VIDEO 49 | #define HAVE_OPENCV_VIDEOIO 50 | #define HAVE_OPENCV_VIDEOSTAB 51 | #define HAVE_OPENCV_XFEATURES2D 52 | #define HAVE_OPENCV_XIMGPROC 53 | #define HAVE_OPENCV_XOBJDETECT 54 | #define HAVE_OPENCV_XPHOTO 55 | 56 | 57 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/tracking/tracking.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of the copyright holders may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the Intel Corporation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifdef __OPENCV_BUILD 43 | #error this is a compatibility header which should not be used inside the OpenCV library 44 | #endif 45 | 46 | #include "opencv2/tracking.hpp" 47 | -------------------------------------------------------------------------------- /app/src/main/jni/include/opencv2/ximgproc/peilin.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | 5 | #ifndef __OPENCV_PEILIN_HPP__ 6 | #define __OPENCV_PEILIN_HPP__ 7 | 8 | #include 9 | 10 | namespace cv 11 | { 12 | //! @addtogroup ximgproc 13 | //! @{ 14 | 15 | /** 16 | * @brief Calculates an affine transformation that normalize given image using Pei&Lin Normalization. 17 | * 18 | * Assume given image \f$I=T(\bar{I})\f$ where \f$\bar{I}\f$ is a normalized image and \f$T\f$ is an affine transformation distorting this image by translation, rotation, scaling and skew. 19 | * The function returns an affine transformation matrix corresponding to the transformation \f$T^{-1}\f$ described in [PeiLin95]. 20 | * For more details about this implementation, please see 21 | * [PeiLin95] Soo-Chang Pei and Chao-Nan Lin. Image normalization for pattern recognition. Image and Vision Computing, Vol. 13, N.10, pp. 711-723, 1995. 22 | * 23 | * @param I Given transformed image. 24 | * @return Transformation matrix corresponding to inversed image transformation 25 | */ 26 | CV_EXPORTS Matx23d PeiLinNormalization ( InputArray I ); 27 | /** @overload */ 28 | CV_EXPORTS_W void PeiLinNormalization ( InputArray I, OutputArray T ); 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /app/src/main/jni/jni.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "util.h" 5 | #include "mrcar.h" 6 | 7 | using namespace std; 8 | using namespace cv; 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | static const char* JNI_CLASS_NAME = "yanyu/com/mrcar/MRCar"; 15 | 16 | jint registerNativesMethods(JNIEnv *); 17 | 18 | __attribute__((visibility("default"))) 19 | jint JNI_OnLoad(JavaVM *vm, void *reserved) { 20 | JNIEnv *env; 21 | if (vm->GetEnv(reinterpret_cast(&env), JNI_VERSION_1_6) != JNI_OK) { 22 | return JNI_ERR; 23 | } 24 | 25 | jint result = registerNativesMethods(env); 26 | if (result != JNI_OK) { 27 | return result; 28 | } 29 | return JNI_VERSION_1_6; 30 | } 31 | //得到签名方法 32 | //javac MRCar.java 33 | //javap -s MRCar 34 | static JNINativeMethod sNativeMethods[] = { 35 | {"init","(Ljava/lang/String;)Z",(void*) init}, 36 | {"plateRecognition", "(JJ)[Lyanyu/com/mrcar/MRPlate;", (void*) plateRecognition}, 37 | {"plateLive", "(J)[Lyanyu/com/mrcar/MRPlate;", (void*) plateLive}, 38 | {"plateNV21", "([BII)[Lyanyu/com/mrcar/MRPlate;",(void*)plateNV21}, 39 | {"release","()I",(void*)release}, 40 | }; 41 | 42 | jint registerNativesMethods(JNIEnv *env) { 43 | jclass clazz = env->FindClass(JNI_CLASS_NAME); 44 | if (clazz == NULL) 45 | { 46 | LOGE("Can't find class %s\n", JNI_CLASS_NAME); 47 | return -1; 48 | } 49 | jint result = env->RegisterNatives( 50 | clazz, 51 | sNativeMethods, 52 | std::extent::value); 53 | if (result!= JNI_OK) 54 | { 55 | LOGD("Failed registering methods for %s\n", JNI_CLASS_NAME); 56 | return -1; 57 | } 58 | return JNI_OK; 59 | } 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif -------------------------------------------------------------------------------- /app/src/main/jni/main.cpp: -------------------------------------------------------------------------------- 1 | #include "easypr.h" 2 | using namespace easypr; 3 | int main(int argc, const char* argv[]) { 4 | std::shared_ptr kv(new easypr::Kv); 5 | kv->load("etc/chinese_mapping.xml"); 6 | CPlateRecognize pr; 7 | pr.setResultShow(false); 8 | pr.setDetectType(PR_DETECT_CMSER); 9 | 10 | vector plateVec; 11 | Mat src = imread("resources/image/test.jpg"); 12 | imshow("img", src); 13 | int result = pr.plateRecognize(src, plateVec); 14 | for (int i = 0; i < plateVec.size(); i++) 15 | { 16 | CPlate plate = plateVec.at(i); 17 | Mat plateMat = plate.getPlateMat(); 18 | RotatedRect rrect = plate.getPlatePos(); 19 | string license = plate.getPlateStr(); 20 | cout << license << endl; 21 | } 22 | waitKey(); 23 | return 0; 24 | } -------------------------------------------------------------------------------- /app/src/main/jni/mrcar.h: -------------------------------------------------------------------------------- 1 | #ifndef MRCAR_H 2 | #define MRCAR_H 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | JNIEXPORT jboolean JNICALL 11 | init(JNIEnv *env, jclass type,jstring dir); 12 | 13 | JNIEXPORT jobjectArray JNICALL 14 | plateRecognition(JNIEnv *env, jclass type, jlong matImg, jlong matResult); 15 | 16 | JNIEXPORT jobjectArray JNICALL 17 | plateLive(JNIEnv *env, jclass type, jlong matImg); 18 | 19 | JNIEXPORT jobjectArray JNICALL 20 | plateNV21(JNIEnv *env, jclass type, jbyteArray img, jint height, jint width); 21 | 22 | JNIEXPORT jint JNICALL 23 | release(JNIEnv *env, jclass type); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif -------------------------------------------------------------------------------- /app/src/main/jni/src/core/params.cpp: -------------------------------------------------------------------------------- 1 | #include "easypr/core/params.h" 2 | 3 | namespace easypr { 4 | CParams* CParams::instance_ = nullptr; 5 | 6 | CParams* CParams::instance() { 7 | if (!instance_) { 8 | instance_ = new CParams; 9 | } 10 | return instance_; 11 | } 12 | }/*! \namespace easypr*/ -------------------------------------------------------------------------------- /app/src/main/jni/src/core/plate_detect.cpp: -------------------------------------------------------------------------------- 1 | #include "easypr/core/plate_detect.h" 2 | #include "easypr/util/util.h" 3 | #include "easypr/core/core_func.h" 4 | #include "easypr/config.h" 5 | 6 | namespace easypr { 7 | 8 | CPlateDetect::CPlateDetect() { 9 | m_plateLocate = new CPlateLocate(); 10 | m_maxPlates = 3; 11 | m_type = 0; 12 | m_showDetect = false; 13 | } 14 | 15 | CPlateDetect::~CPlateDetect() { SAFE_RELEASE(m_plateLocate); } 16 | 17 | int CPlateDetect::plateDetect(Mat src, std::vector &resultVec, int type, 18 | bool showDetectArea, int img_index) { 19 | std::vector sobel_Plates; 20 | sobel_Plates.reserve(16); 21 | std::vector color_Plates; 22 | color_Plates.reserve(16); 23 | std::vector mser_Plates; 24 | mser_Plates.reserve(16); 25 | std::vector all_result_Plates; 26 | all_result_Plates.reserve(64); 27 | #pragma omp parallel sections 28 | { 29 | #pragma omp section 30 | { 31 | if (!type || type & PR_DETECT_SOBEL) { 32 | m_plateLocate->plateSobelLocate(src, sobel_Plates, img_index); 33 | } 34 | } 35 | #pragma omp section 36 | { 37 | if (!type || type & PR_DETECT_COLOR) { 38 | m_plateLocate->plateColorLocate(src, color_Plates, img_index); 39 | } 40 | } 41 | #pragma omp section 42 | { 43 | if (!type || type & PR_DETECT_CMSER) { 44 | m_plateLocate->plateMserLocate(src, mser_Plates, img_index); 45 | } 46 | } 47 | } 48 | for (auto plate : sobel_Plates) { 49 | plate.setPlateLocateType(SOBEL); 50 | all_result_Plates.push_back(plate); 51 | } 52 | for (auto plate : color_Plates) { 53 | plate.setPlateLocateType(COLOR); 54 | all_result_Plates.push_back(plate); 55 | } 56 | for (auto plate : mser_Plates) { 57 | plate.setPlateLocateType(CMSER); 58 | all_result_Plates.push_back(plate); 59 | } 60 | // use nms to judge plate 61 | PlateJudge::instance()->plateJudgeUsingNMS(all_result_Plates, resultVec, m_maxPlates); 62 | 63 | if (0) 64 | showDectectResults(src, resultVec, m_maxPlates); 65 | return 0; 66 | } 67 | 68 | int CPlateDetect::plateDetect(Mat src, std::vector &resultVec, int img_index) { 69 | int result = plateDetect(src, resultVec, m_type, false, img_index); 70 | return result; 71 | } 72 | 73 | void CPlateDetect::LoadSVM(std::string path) { 74 | PlateJudge::instance()->LoadModel(path); 75 | } 76 | 77 | } -------------------------------------------------------------------------------- /app/src/main/jni/src/train/train.cpp: -------------------------------------------------------------------------------- 1 | #include "easypr/train/train.h" 2 | 3 | namespace easypr { 4 | 5 | ITrain::ITrain() {} 6 | 7 | ITrain::~ITrain() {} 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/jni/src/util/kv.cpp: -------------------------------------------------------------------------------- 1 | #include "easypr/util/kv.h" 2 | #include "easypr/util/util.h" 3 | 4 | namespace easypr { 5 | 6 | Kv::Kv() { } 7 | 8 | void Kv::load(const std::string &file) { 9 | this->clear(); 10 | std::ifstream reader(file); 11 | assert(reader); 12 | 13 | if (reader.is_open()) { 14 | while (!reader.eof()) { 15 | std::string line; 16 | std::getline(reader, line); 17 | if (line.empty()) continue; 18 | 19 | const auto parse = [](const std::string &str) { 20 | std::string tmp, key, value; 21 | for (size_t i = 0, len = str.length(); i < len; ++i) { 22 | const char ch = str[i]; 23 | if (ch == ' ') { 24 | if (i > 0 && str[i - 1] != ' ' && key.empty()) { 25 | key = tmp; 26 | tmp.clear(); 27 | } 28 | } 29 | else { 30 | tmp.push_back(ch); 31 | } 32 | if (i == len - 1) { 33 | value = tmp; 34 | } 35 | } 36 | return std::make_pair(key, value); 37 | }; 38 | 39 | auto kv = parse(line); 40 | this->add(kv.first, kv.second); 41 | } 42 | reader.close(); 43 | } 44 | } 45 | 46 | std::string Kv::get(const std::string &key) { 47 | if (data_.find(key) == data_.end()) { 48 | std::cerr << "[Kv] cannot find " << key << std::endl; 49 | return ""; 50 | } 51 | return data_.at(key); 52 | } 53 | 54 | void Kv::add(const std::string &key, const std::string &value) { 55 | if (data_.find(key) != data_.end()) { 56 | fprintf(stderr, 57 | "[Kv] find duplicate: %s = %s , ignore\n", 58 | key.c_str(), 59 | value.c_str()); 60 | } else { 61 | std::string v(value); 62 | #ifdef OS_WINDOWS 63 | v = utils::utf8_to_gbk(value.c_str()); 64 | #endif 65 | data_[key] = v; 66 | } 67 | } 68 | 69 | void Kv::remove(const std::string &key) { 70 | if (data_.find(key) == data_.end()) { 71 | std::cerr << "[Kv] cannot find " << key << std::endl; 72 | return; 73 | } 74 | data_.erase(key); 75 | } 76 | 77 | void Kv::clear() { 78 | data_.clear(); 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /app/src/main/jni/thirdparty/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1.0) 2 | project(thirdparty) 3 | 4 | # OpenVC3 required 5 | find_package(OpenCV 3.1.0 REQUIRED) 6 | 7 | # where to find header files 8 | include_directories(${OpenCV_INCLUDE_DIRS}) 9 | 10 | # sources to be compiled 11 | set(SOURCE_FILES 12 | xmlParser/xmlParser.cpp 13 | textDetect/erfilter.cpp 14 | LBP/helper.cpp 15 | LBP/lbp.cpp 16 | mser/mser2.cpp 17 | ) 18 | 19 | # pack objects to static library 20 | add_library(thirdparty STATIC ${SOURCE_FILES}) 21 | -------------------------------------------------------------------------------- /app/src/main/jni/thirdparty/mser/mser2.hpp: -------------------------------------------------------------------------------- 1 | #ifndef __OPENCV_PRECOMP_H__ 2 | #define __OPENCV_PRECOMP_H__ 3 | 4 | #include "opencv2/imgproc.hpp" 5 | 6 | #include "opencv2/core/utility.hpp" 7 | #include "opencv2/core/ocl.hpp" 8 | 9 | #include 10 | 11 | #ifdef HAVE_TEGRA_OPTIMIZATION 12 | #include "opencv2/features2d/features2d_tegra.hpp" 13 | #endif 14 | 15 | #endif 16 | 17 | #include "opencv2/imgproc/imgproc_c.h" 18 | #include 19 | 20 | namespace cv 21 | { 22 | 23 | using std::vector; 24 | 25 | class CV_EXPORTS_W MSER2 26 | { 27 | public: 28 | //! the full constructor 29 | CV_WRAP static Ptr create(int _delta = 5, int _min_area = 60, int _max_area = 14400, bool useBetter = true, 30 | double _max_variation = 0.25, double _min_diversity = .2, 31 | int _max_evolution = 200, double _area_threshold = 1.01, 32 | double _min_margin = 0.003, int _edge_blur_size = 5); 33 | 34 | CV_WRAP virtual void detectRegions(InputArray _src, vector>& msers_blue, vector& bboxes_blue, 35 | vector>& msers_yellow, vector& bboxes_yellow) = 0; 36 | CV_WRAP virtual void detectRegions(InputArray _src, vector>& msers, vector& bboxes, int type) = 0; 37 | 38 | CV_WRAP virtual void setDelta(int delta) = 0; 39 | CV_WRAP virtual int getDelta() const = 0; 40 | 41 | CV_WRAP virtual void setMinArea(int minArea) = 0; 42 | CV_WRAP virtual int getMinArea() const = 0; 43 | 44 | CV_WRAP virtual void setMaxArea(int maxArea) = 0; 45 | CV_WRAP virtual int getMaxArea() const = 0; 46 | 47 | CV_WRAP virtual void setPass2Only(bool f) = 0; 48 | CV_WRAP virtual bool getPass2Only() const = 0; 49 | }; 50 | } -------------------------------------------------------------------------------- /app/src/main/jni/util.h: -------------------------------------------------------------------------------- 1 | #ifndef MR_UTIL_H_ 2 | #define MR_UTIL_H_ 3 | 4 | #include 5 | #include "time.h" 6 | #define LOG_TAG "MRCar" 7 | #ifdef LOG_TAG 8 | #define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)) 9 | #define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)) 10 | #define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)) 11 | #else 12 | #define LOGI(...) 13 | #define LOGD(...) 14 | #define LOGE(...) 15 | #endif 16 | template 17 | std::string to_string(T value) 18 | { 19 | std::ostringstream os ; 20 | os << value ; 21 | return os.str() ; 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/arm64-v8a/libfreetype2-static.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/app/src/main/jniLibs/arm64-v8a/libfreetype2-static.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/arm64-v8a/libopencv_java3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/app/src/main/jniLibs/arm64-v8a/libopencv_java3.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libfreetype2-static.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/app/src/main/jniLibs/armeabi-v7a/libfreetype2-static.a -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libopencv_java3.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/app/src/main/jniLibs/armeabi-v7a/libopencv_java3.so -------------------------------------------------------------------------------- /app/src/main/res/drawable/camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/app/src/main/res/drawable/camera.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/app/src/main/res/drawable/folder.png -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_camera.xml: -------------------------------------------------------------------------------- 1 | 4 | 8 | 14 | 19 | 26 | 36 | 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_cvcamera.xml: -------------------------------------------------------------------------------- 1 | 4 | 8 | 15 | 18 | 19 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 14 | 15 | 25 | 26 | 35 | 36 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/raw/zxl_beep.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/app/src/main/res/raw/zxl_beep.mp3 -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /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 | MRCar 3 | Settings 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/test/java/yanyu/com/mrcar/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package yanyu.com.mrcar; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /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.1.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 | -------------------------------------------------------------------------------- /cameralive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/cameralive.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 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | android.useDeprecatedNdk=true -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imistyrain/EasyPR4Android/0ad380e2de45b15a09873337e72b3afac46a53a8/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 07 15:08:25 CST 2019 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.4-all.zip 7 | -------------------------------------------------------------------------------- /openCVLibrary320/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openCVLibrary320/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | google() 7 | mavenCentral() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.1.1' 11 | } 12 | } 13 | 14 | android { 15 | compileSdkVersion 28 16 | buildToolsVersion "28.0.3" 17 | 18 | defaultConfig { 19 | minSdkVersion 21 20 | targetSdkVersion 28 21 | versionCode 3200 22 | versionName "3.2.0" 23 | } 24 | 25 | sourceSets { 26 | main { 27 | manifest.srcFile 'AndroidManifest.xml' 28 | java.srcDirs = ['src'] 29 | resources.srcDirs = ['src'] 30 | res.srcDirs = ['res'] 31 | aidl.srcDirs = ['src'] 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /openCVLibrary320/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /openCVLibrary320/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | android.library=true 14 | # Project target. 15 | target=android-14 16 | -------------------------------------------------------------------------------- /openCVLibrary320/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/bioinspired/Bioinspired.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.bioinspired; 6 | 7 | 8 | 9 | public class Bioinspired { 10 | 11 | public static final int 12 | RETINA_COLOR_RANDOM = 0, 13 | RETINA_COLOR_DIAGONAL = 1, 14 | RETINA_COLOR_BAYER = 2; 15 | 16 | 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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) 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) 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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/img_hash/AverageHash.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.img_hash; 6 | 7 | 8 | 9 | // C++: class AverageHash 10 | //javadoc: AverageHash 11 | public class AverageHash extends ImgHashBase { 12 | 13 | protected AverageHash(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_AverageHash create() 18 | // 19 | 20 | //javadoc: AverageHash::create() 21 | public static AverageHash create() 22 | { 23 | 24 | AverageHash retVal = new AverageHash(create_0()); 25 | 26 | return retVal; 27 | } 28 | 29 | 30 | @Override 31 | protected void finalize() throws Throwable { 32 | delete(nativeObj); 33 | } 34 | 35 | 36 | 37 | // C++: static Ptr_AverageHash create() 38 | private static native long create_0(); 39 | 40 | // native support for java finalize() 41 | private static native void delete(long nativeObj); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/img_hash/BlockMeanHash.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.img_hash; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import org.opencv.core.Mat; 10 | import org.opencv.core.MatOfDouble; 11 | import org.opencv.utils.Converters; 12 | 13 | // C++: class BlockMeanHash 14 | //javadoc: BlockMeanHash 15 | public class BlockMeanHash extends ImgHashBase { 16 | 17 | protected BlockMeanHash(long addr) { super(addr); } 18 | 19 | 20 | // 21 | // C++: static Ptr_BlockMeanHash create(int mode = BLOCK_MEAN_HASH_MODE_0) 22 | // 23 | 24 | //javadoc: BlockMeanHash::create(mode) 25 | public static BlockMeanHash create(int mode) 26 | { 27 | 28 | BlockMeanHash retVal = new BlockMeanHash(create_0(mode)); 29 | 30 | return retVal; 31 | } 32 | 33 | //javadoc: BlockMeanHash::create() 34 | public static BlockMeanHash create() 35 | { 36 | 37 | BlockMeanHash retVal = new BlockMeanHash(create_1()); 38 | 39 | return retVal; 40 | } 41 | 42 | 43 | // 44 | // C++: vector_double getMean() 45 | // 46 | 47 | //javadoc: BlockMeanHash::getMean() 48 | public MatOfDouble getMean() 49 | { 50 | 51 | MatOfDouble retVal = MatOfDouble.fromNativeAddr(getMean_0(nativeObj)); 52 | 53 | return retVal; 54 | } 55 | 56 | 57 | // 58 | // C++: void setMode(int mode) 59 | // 60 | 61 | //javadoc: BlockMeanHash::setMode(mode) 62 | public void setMode(int mode) 63 | { 64 | 65 | setMode_0(nativeObj, mode); 66 | 67 | return; 68 | } 69 | 70 | 71 | @Override 72 | protected void finalize() throws Throwable { 73 | delete(nativeObj); 74 | } 75 | 76 | 77 | 78 | // C++: static Ptr_BlockMeanHash create(int mode = BLOCK_MEAN_HASH_MODE_0) 79 | private static native long create_0(int mode); 80 | private static native long create_1(); 81 | 82 | // C++: vector_double getMean() 83 | private static native long getMean_0(long nativeObj); 84 | 85 | // C++: void setMode(int mode) 86 | private static native void setMode_0(long nativeObj, int mode); 87 | 88 | // native support for java finalize() 89 | private static native void delete(long nativeObj); 90 | 91 | } 92 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/img_hash/ColorMomentHash.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.img_hash; 6 | 7 | 8 | 9 | // C++: class ColorMomentHash 10 | //javadoc: ColorMomentHash 11 | public class ColorMomentHash extends ImgHashBase { 12 | 13 | protected ColorMomentHash(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_ColorMomentHash create() 18 | // 19 | 20 | //javadoc: ColorMomentHash::create() 21 | public static ColorMomentHash create() 22 | { 23 | 24 | ColorMomentHash retVal = new ColorMomentHash(create_0()); 25 | 26 | return retVal; 27 | } 28 | 29 | 30 | @Override 31 | protected void finalize() throws Throwable { 32 | delete(nativeObj); 33 | } 34 | 35 | 36 | 37 | // C++: static Ptr_ColorMomentHash create() 38 | private static native long create_0(); 39 | 40 | // native support for java finalize() 41 | private static native void delete(long nativeObj); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/img_hash/ImgHashBase.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.img_hash; 6 | 7 | import org.opencv.core.Algorithm; 8 | import org.opencv.core.Mat; 9 | 10 | // C++: class ImgHashBase 11 | //javadoc: ImgHashBase 12 | public class ImgHashBase extends Algorithm { 13 | 14 | protected ImgHashBase(long addr) { super(addr); } 15 | 16 | 17 | // 18 | // C++: double compare(Mat hashOne, Mat hashTwo) 19 | // 20 | 21 | //javadoc: ImgHashBase::compare(hashOne, hashTwo) 22 | public double compare(Mat hashOne, Mat hashTwo) 23 | { 24 | 25 | double retVal = compare_0(nativeObj, hashOne.nativeObj, hashTwo.nativeObj); 26 | 27 | return retVal; 28 | } 29 | 30 | 31 | // 32 | // C++: void compute(Mat inputArr, Mat& outputArr) 33 | // 34 | 35 | //javadoc: ImgHashBase::compute(inputArr, outputArr) 36 | public void compute(Mat inputArr, Mat outputArr) 37 | { 38 | 39 | compute_0(nativeObj, inputArr.nativeObj, outputArr.nativeObj); 40 | 41 | return; 42 | } 43 | 44 | 45 | @Override 46 | protected void finalize() throws Throwable { 47 | delete(nativeObj); 48 | } 49 | 50 | 51 | 52 | // C++: double compare(Mat hashOne, Mat hashTwo) 53 | private static native double compare_0(long nativeObj, long hashOne_nativeObj, long hashTwo_nativeObj); 54 | 55 | // C++: void compute(Mat inputArr, Mat& outputArr) 56 | private static native void compute_0(long nativeObj, long inputArr_nativeObj, long outputArr_nativeObj); 57 | 58 | // native support for java finalize() 59 | private static native void delete(long nativeObj); 60 | 61 | } 62 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/img_hash/PHash.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.img_hash; 6 | 7 | 8 | 9 | // C++: class PHash 10 | //javadoc: PHash 11 | public class PHash extends ImgHashBase { 12 | 13 | protected PHash(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_PHash create() 18 | // 19 | 20 | //javadoc: PHash::create() 21 | public static PHash create() 22 | { 23 | 24 | PHash retVal = new PHash(create_0()); 25 | 26 | return retVal; 27 | } 28 | 29 | 30 | @Override 31 | protected void finalize() throws Throwable { 32 | delete(nativeObj); 33 | } 34 | 35 | 36 | 37 | // C++: static Ptr_PHash create() 38 | private static native long create_0(); 39 | 40 | // native support for java finalize() 41 | private static native void delete(long nativeObj); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/phase_unwrapping/HistogramPhaseUnwrapping.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.phase_unwrapping; 6 | 7 | import org.opencv.core.Mat; 8 | 9 | // C++: class HistogramPhaseUnwrapping 10 | //javadoc: HistogramPhaseUnwrapping 11 | public class HistogramPhaseUnwrapping extends PhaseUnwrapping { 12 | 13 | protected HistogramPhaseUnwrapping(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: void getInverseReliabilityMap(Mat& reliabilityMap) 18 | // 19 | 20 | //javadoc: HistogramPhaseUnwrapping::getInverseReliabilityMap(reliabilityMap) 21 | public void getInverseReliabilityMap(Mat reliabilityMap) 22 | { 23 | 24 | getInverseReliabilityMap_0(nativeObj, reliabilityMap.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 getInverseReliabilityMap(Mat& reliabilityMap) 38 | private static native void getInverseReliabilityMap_0(long nativeObj, long reliabilityMap_nativeObj); 39 | 40 | // native support for java finalize() 41 | private static native void delete(long nativeObj); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/phase_unwrapping/PhaseUnwrapping.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.phase_unwrapping; 6 | 7 | import org.opencv.core.Algorithm; 8 | import org.opencv.core.Mat; 9 | 10 | // C++: class PhaseUnwrapping 11 | //javadoc: PhaseUnwrapping 12 | public class PhaseUnwrapping extends Algorithm { 13 | 14 | protected PhaseUnwrapping(long addr) { super(addr); } 15 | 16 | 17 | // 18 | // C++: void unwrapPhaseMap(Mat wrappedPhaseMap, Mat& unwrappedPhaseMap, Mat shadowMask = Mat()) 19 | // 20 | 21 | //javadoc: PhaseUnwrapping::unwrapPhaseMap(wrappedPhaseMap, unwrappedPhaseMap, shadowMask) 22 | public void unwrapPhaseMap(Mat wrappedPhaseMap, Mat unwrappedPhaseMap, Mat shadowMask) 23 | { 24 | 25 | unwrapPhaseMap_0(nativeObj, wrappedPhaseMap.nativeObj, unwrappedPhaseMap.nativeObj, shadowMask.nativeObj); 26 | 27 | return; 28 | } 29 | 30 | //javadoc: PhaseUnwrapping::unwrapPhaseMap(wrappedPhaseMap, unwrappedPhaseMap) 31 | public void unwrapPhaseMap(Mat wrappedPhaseMap, Mat unwrappedPhaseMap) 32 | { 33 | 34 | unwrapPhaseMap_1(nativeObj, wrappedPhaseMap.nativeObj, unwrappedPhaseMap.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 unwrapPhaseMap(Mat wrappedPhaseMap, Mat& unwrappedPhaseMap, Mat shadowMask = Mat()) 48 | private static native void unwrapPhaseMap_0(long nativeObj, long wrappedPhaseMap_nativeObj, long unwrappedPhaseMap_nativeObj, long shadowMask_nativeObj); 49 | private static native void unwrapPhaseMap_1(long nativeObj, long wrappedPhaseMap_nativeObj, long unwrappedPhaseMap_nativeObj); 50 | 51 | // native support for java finalize() 52 | private static native void delete(long nativeObj); 53 | 54 | } 55 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/phase_unwrapping/Phase_unwrapping.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.phase_unwrapping; 6 | 7 | 8 | 9 | public class Phase_unwrapping { 10 | 11 | 12 | 13 | } 14 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/structured_light/StructuredLightPattern.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.structured_light; 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 StructuredLightPattern 14 | //javadoc: StructuredLightPattern 15 | public class StructuredLightPattern extends Algorithm { 16 | 17 | protected StructuredLightPattern(long addr) { super(addr); } 18 | 19 | 20 | // 21 | // C++: bool decode(vector_vector_Mat patternImages, Mat& disparityMap, vector_Mat blackImages = vector_Mat(), vector_Mat whiteImages = vector_Mat(), int flags = DECODE_3D_UNDERWORLD) 22 | // 23 | 24 | // Unknown type 'vector_vector_Mat' (I), skipping the function 25 | 26 | 27 | // 28 | // C++: bool generate(vector_Mat& patternImages) 29 | // 30 | 31 | //javadoc: StructuredLightPattern::generate(patternImages) 32 | public boolean generate(List patternImages) 33 | { 34 | Mat patternImages_mat = new Mat(); 35 | boolean retVal = generate_0(nativeObj, patternImages_mat.nativeObj); 36 | Converters.Mat_to_vector_Mat(patternImages_mat, patternImages); 37 | patternImages_mat.release(); 38 | return retVal; 39 | } 40 | 41 | 42 | @Override 43 | protected void finalize() throws Throwable { 44 | delete(nativeObj); 45 | } 46 | 47 | 48 | 49 | // C++: bool generate(vector_Mat& patternImages) 50 | private static native boolean generate_0(long nativeObj, long patternImages_mat_nativeObj); 51 | 52 | // native support for java finalize() 53 | private static native void delete(long nativeObj); 54 | 55 | } 56 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/structured_light/Structured_light.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.structured_light; 6 | 7 | 8 | 9 | public class Structured_light { 10 | 11 | public static final int 12 | FTP = 0, 13 | PSP = 1, 14 | FAPS = 2, 15 | DECODE_3D_UNDERWORLD = 0; 16 | 17 | 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/text/BaseOCR.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.text; 6 | 7 | 8 | 9 | // C++: class BaseOCR 10 | //javadoc: BaseOCR 11 | public class BaseOCR { 12 | 13 | protected final long nativeObj; 14 | protected BaseOCR(long addr) { nativeObj = addr; } 15 | 16 | public long getNativeObjAddr() { return nativeObj; } 17 | 18 | @Override 19 | protected void finalize() throws Throwable { 20 | delete(nativeObj); 21 | } 22 | 23 | 24 | 25 | // native support for java finalize() 26 | private static native void delete(long nativeObj); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/text/Callback.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.text; 6 | 7 | 8 | 9 | // C++: class Callback 10 | //javadoc: Callback 11 | public class Callback { 12 | 13 | protected final long nativeObj; 14 | protected Callback(long addr) { nativeObj = addr; } 15 | 16 | public long getNativeObjAddr() { return nativeObj; } 17 | 18 | @Override 19 | protected void finalize() throws Throwable { 20 | delete(nativeObj); 21 | } 22 | 23 | 24 | 25 | // native support for java finalize() 26 | private static native void delete(long nativeObj); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/text/ClassifierCallback.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.text; 6 | 7 | 8 | 9 | // C++: class ClassifierCallback 10 | //javadoc: ClassifierCallback 11 | public class ClassifierCallback { 12 | 13 | protected final long nativeObj; 14 | protected ClassifierCallback(long addr) { nativeObj = addr; } 15 | 16 | public long getNativeObjAddr() { return nativeObj; } 17 | 18 | @Override 19 | protected void finalize() throws Throwable { 20 | delete(nativeObj); 21 | } 22 | 23 | 24 | 25 | // native support for java finalize() 26 | private static native void delete(long nativeObj); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/text/ERFilter.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.text; 6 | 7 | import org.opencv.core.Algorithm; 8 | 9 | // C++: class ERFilter 10 | //javadoc: ERFilter 11 | public class ERFilter extends Algorithm { 12 | 13 | protected ERFilter(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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/tracking/Tracker.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.tracking; 6 | 7 | import org.opencv.core.Algorithm; 8 | import org.opencv.core.Mat; 9 | import org.opencv.core.Rect2d; 10 | 11 | // C++: class Tracker 12 | //javadoc: Tracker 13 | public class Tracker extends Algorithm { 14 | 15 | protected Tracker(long addr) { super(addr); } 16 | 17 | 18 | // 19 | // C++: bool init(Mat image, Rect2d boundingBox) 20 | // 21 | 22 | //javadoc: Tracker::init(image, boundingBox) 23 | public boolean init(Mat image, Rect2d boundingBox) 24 | { 25 | 26 | boolean retVal = init_0(nativeObj, image.nativeObj, boundingBox.x, boundingBox.y, boundingBox.width, boundingBox.height); 27 | 28 | return retVal; 29 | } 30 | 31 | 32 | // 33 | // C++: bool update(Mat image, Rect2d& boundingBox) 34 | // 35 | 36 | //javadoc: Tracker::update(image, boundingBox) 37 | public boolean update(Mat image, Rect2d boundingBox) 38 | { 39 | double[] boundingBox_out = new double[4]; 40 | boolean retVal = update_0(nativeObj, image.nativeObj, boundingBox_out); 41 | if(boundingBox!=null){ boundingBox.x = boundingBox_out[0]; boundingBox.y = boundingBox_out[1]; boundingBox.width = boundingBox_out[2]; boundingBox.height = boundingBox_out[3]; } 42 | return retVal; 43 | } 44 | 45 | 46 | @Override 47 | protected void finalize() throws Throwable { 48 | delete(nativeObj); 49 | } 50 | 51 | 52 | 53 | // C++: bool init(Mat image, Rect2d boundingBox) 54 | private static native boolean init_0(long nativeObj, long image_nativeObj, double boundingBox_x, double boundingBox_y, double boundingBox_width, double boundingBox_height); 55 | 56 | // C++: bool update(Mat image, Rect2d& boundingBox) 57 | private static native boolean update_0(long nativeObj, long image_nativeObj, double[] boundingBox_out); 58 | 59 | // native support for java finalize() 60 | private static native void delete(long nativeObj); 61 | 62 | } 63 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/tracking/TrackerBoosting.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.tracking; 6 | 7 | 8 | 9 | // C++: class TrackerBoosting 10 | //javadoc: TrackerBoosting 11 | public class TrackerBoosting extends Tracker { 12 | 13 | protected TrackerBoosting(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_TrackerBoosting create() 18 | // 19 | 20 | //javadoc: TrackerBoosting::create() 21 | public static TrackerBoosting create() 22 | { 23 | 24 | TrackerBoosting retVal = new TrackerBoosting(create_0()); 25 | 26 | return retVal; 27 | } 28 | 29 | 30 | @Override 31 | protected void finalize() throws Throwable { 32 | delete(nativeObj); 33 | } 34 | 35 | 36 | 37 | // C++: static Ptr_TrackerBoosting create() 38 | private static native long create_0(); 39 | 40 | // native support for java finalize() 41 | private static native void delete(long nativeObj); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/tracking/TrackerGOTURN.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.tracking; 6 | 7 | 8 | 9 | // C++: class TrackerGOTURN 10 | //javadoc: TrackerGOTURN 11 | public class TrackerGOTURN extends Tracker { 12 | 13 | protected TrackerGOTURN(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_TrackerGOTURN create() 18 | // 19 | 20 | //javadoc: TrackerGOTURN::create() 21 | public static TrackerGOTURN create() 22 | { 23 | 24 | TrackerGOTURN retVal = new TrackerGOTURN(create_0()); 25 | 26 | return retVal; 27 | } 28 | 29 | 30 | @Override 31 | protected void finalize() throws Throwable { 32 | delete(nativeObj); 33 | } 34 | 35 | 36 | 37 | // C++: static Ptr_TrackerGOTURN create() 38 | private static native long create_0(); 39 | 40 | // native support for java finalize() 41 | private static native void delete(long nativeObj); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/tracking/TrackerKCF.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.tracking; 6 | 7 | 8 | 9 | // C++: class TrackerKCF 10 | //javadoc: TrackerKCF 11 | public class TrackerKCF extends Tracker { 12 | 13 | protected TrackerKCF(long addr) { super(addr); } 14 | 15 | 16 | public static final int 17 | GRAY = (1 << 0), 18 | CN = (1 << 1), 19 | CUSTOM = (1 << 2); 20 | 21 | 22 | // 23 | // C++: static Ptr_TrackerKCF create() 24 | // 25 | 26 | //javadoc: TrackerKCF::create() 27 | public static TrackerKCF create() 28 | { 29 | 30 | TrackerKCF retVal = new TrackerKCF(create_0()); 31 | 32 | return retVal; 33 | } 34 | 35 | 36 | @Override 37 | protected void finalize() throws Throwable { 38 | delete(nativeObj); 39 | } 40 | 41 | 42 | 43 | // C++: static Ptr_TrackerKCF create() 44 | private static native long create_0(); 45 | 46 | // native support for java finalize() 47 | private static native void delete(long nativeObj); 48 | 49 | } 50 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/tracking/TrackerMIL.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.tracking; 6 | 7 | 8 | 9 | // C++: class TrackerMIL 10 | //javadoc: TrackerMIL 11 | public class TrackerMIL extends Tracker { 12 | 13 | protected TrackerMIL(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_TrackerMIL create() 18 | // 19 | 20 | //javadoc: TrackerMIL::create() 21 | public static TrackerMIL create() 22 | { 23 | 24 | TrackerMIL retVal = new TrackerMIL(create_0()); 25 | 26 | return retVal; 27 | } 28 | 29 | 30 | @Override 31 | protected void finalize() throws Throwable { 32 | delete(nativeObj); 33 | } 34 | 35 | 36 | 37 | // C++: static Ptr_TrackerMIL create() 38 | private static native long create_0(); 39 | 40 | // native support for java finalize() 41 | private static native void delete(long nativeObj); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/tracking/TrackerMedianFlow.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.tracking; 6 | 7 | 8 | 9 | // C++: class TrackerMedianFlow 10 | //javadoc: TrackerMedianFlow 11 | public class TrackerMedianFlow extends Tracker { 12 | 13 | protected TrackerMedianFlow(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_TrackerMedianFlow create() 18 | // 19 | 20 | //javadoc: TrackerMedianFlow::create() 21 | public static TrackerMedianFlow create() 22 | { 23 | 24 | TrackerMedianFlow retVal = new TrackerMedianFlow(create_0()); 25 | 26 | return retVal; 27 | } 28 | 29 | 30 | @Override 31 | protected void finalize() throws Throwable { 32 | delete(nativeObj); 33 | } 34 | 35 | 36 | 37 | // C++: static Ptr_TrackerMedianFlow create() 38 | private static native long create_0(); 39 | 40 | // native support for java finalize() 41 | private static native void delete(long nativeObj); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/tracking/TrackerTLD.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.tracking; 6 | 7 | 8 | 9 | // C++: class TrackerTLD 10 | //javadoc: TrackerTLD 11 | public class TrackerTLD extends Tracker { 12 | 13 | protected TrackerTLD(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_TrackerTLD create() 18 | // 19 | 20 | //javadoc: TrackerTLD::create() 21 | public static TrackerTLD create() 22 | { 23 | 24 | TrackerTLD retVal = new TrackerTLD(create_0()); 25 | 26 | return retVal; 27 | } 28 | 29 | 30 | @Override 31 | protected void finalize() throws Throwable { 32 | delete(nativeObj); 33 | } 34 | 35 | 36 | 37 | // C++: static Ptr_TrackerTLD create() 38 | private static native long create_0(); 39 | 40 | // native support for java finalize() 41 | private static native void delete(long nativeObj); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/tracking/Tracking.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.tracking; 6 | 7 | 8 | 9 | public class Tracking { 10 | 11 | 12 | 13 | } 14 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/xfeatures2d/BoostDesc.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.xfeatures2d; 6 | 7 | import org.opencv.features2d.Feature2D; 8 | 9 | // C++: class BoostDesc 10 | //javadoc: BoostDesc 11 | public class BoostDesc extends Feature2D { 12 | 13 | protected BoostDesc(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_BoostDesc create(int desc = BoostDesc::BINBOOST_256, bool use_scale_orientation = true, float scale_factor = 6.25f) 18 | // 19 | 20 | //javadoc: BoostDesc::create(desc, use_scale_orientation, scale_factor) 21 | public static BoostDesc create(int desc, boolean use_scale_orientation, float scale_factor) 22 | { 23 | 24 | BoostDesc retVal = new BoostDesc(create_0(desc, use_scale_orientation, scale_factor)); 25 | 26 | return retVal; 27 | } 28 | 29 | //javadoc: BoostDesc::create() 30 | public static BoostDesc create() 31 | { 32 | 33 | BoostDesc retVal = new BoostDesc(create_1()); 34 | 35 | return retVal; 36 | } 37 | 38 | 39 | @Override 40 | protected void finalize() throws Throwable { 41 | delete(nativeObj); 42 | } 43 | 44 | 45 | 46 | // C++: static Ptr_BoostDesc create(int desc = BoostDesc::BINBOOST_256, bool use_scale_orientation = true, float scale_factor = 6.25f) 47 | private static native long create_0(int desc, boolean use_scale_orientation, float scale_factor); 48 | private static native long create_1(); 49 | 50 | // native support for java finalize() 51 | private static native void delete(long nativeObj); 52 | 53 | } 54 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/xfeatures2d/BriefDescriptorExtractor.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.xfeatures2d; 6 | 7 | import org.opencv.features2d.Feature2D; 8 | 9 | // C++: class BriefDescriptorExtractor 10 | //javadoc: BriefDescriptorExtractor 11 | public class BriefDescriptorExtractor extends Feature2D { 12 | 13 | protected BriefDescriptorExtractor(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_BriefDescriptorExtractor create(int bytes = 32, bool use_orientation = false) 18 | // 19 | 20 | //javadoc: BriefDescriptorExtractor::create(bytes, use_orientation) 21 | public static BriefDescriptorExtractor create(int bytes, boolean use_orientation) 22 | { 23 | 24 | BriefDescriptorExtractor retVal = new BriefDescriptorExtractor(create_0(bytes, use_orientation)); 25 | 26 | return retVal; 27 | } 28 | 29 | //javadoc: BriefDescriptorExtractor::create() 30 | public static BriefDescriptorExtractor create() 31 | { 32 | 33 | BriefDescriptorExtractor retVal = new BriefDescriptorExtractor(create_1()); 34 | 35 | return retVal; 36 | } 37 | 38 | 39 | @Override 40 | protected void finalize() throws Throwable { 41 | delete(nativeObj); 42 | } 43 | 44 | 45 | 46 | // C++: static Ptr_BriefDescriptorExtractor create(int bytes = 32, bool use_orientation = false) 47 | private static native long create_0(int bytes, boolean use_orientation); 48 | private static native long create_1(); 49 | 50 | // native support for java finalize() 51 | private static native void delete(long nativeObj); 52 | 53 | } 54 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/xfeatures2d/DAISY.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.xfeatures2d; 6 | 7 | import org.opencv.core.Mat; 8 | import org.opencv.features2d.Feature2D; 9 | 10 | // C++: class DAISY 11 | //javadoc: DAISY 12 | public class DAISY extends Feature2D { 13 | 14 | protected DAISY(long addr) { super(addr); } 15 | 16 | 17 | public static final int 18 | NRM_NONE = 100, 19 | NRM_PARTIAL = 101, 20 | NRM_FULL = 102, 21 | NRM_SIFT = 103; 22 | 23 | 24 | // 25 | // C++: static Ptr_DAISY create(float radius = 15, int q_radius = 3, int q_theta = 8, int q_hist = 8, int norm = DAISY::NRM_NONE, Mat H = Mat(), bool interpolation = true, bool use_orientation = false) 26 | // 27 | 28 | //javadoc: DAISY::create(radius, q_radius, q_theta, q_hist, norm, H, interpolation, use_orientation) 29 | public static DAISY create(float radius, int q_radius, int q_theta, int q_hist, int norm, Mat H, boolean interpolation, boolean use_orientation) 30 | { 31 | 32 | DAISY retVal = new DAISY(create_0(radius, q_radius, q_theta, q_hist, norm, H.nativeObj, interpolation, use_orientation)); 33 | 34 | return retVal; 35 | } 36 | 37 | //javadoc: DAISY::create() 38 | public static DAISY create() 39 | { 40 | 41 | DAISY retVal = new DAISY(create_1()); 42 | 43 | return retVal; 44 | } 45 | 46 | 47 | @Override 48 | protected void finalize() throws Throwable { 49 | delete(nativeObj); 50 | } 51 | 52 | 53 | 54 | // C++: static Ptr_DAISY create(float radius = 15, int q_radius = 3, int q_theta = 8, int q_hist = 8, int norm = DAISY::NRM_NONE, Mat H = Mat(), bool interpolation = true, bool use_orientation = false) 55 | private static native long create_0(float radius, int q_radius, int q_theta, int q_hist, int norm, long H_nativeObj, boolean interpolation, boolean use_orientation); 56 | private static native long create_1(); 57 | 58 | // native support for java finalize() 59 | private static native void delete(long nativeObj); 60 | 61 | } 62 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/xfeatures2d/FREAK.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.xfeatures2d; 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.features2d.Feature2D; 12 | import org.opencv.utils.Converters; 13 | 14 | // C++: class FREAK 15 | //javadoc: FREAK 16 | public class FREAK extends Feature2D { 17 | 18 | protected FREAK(long addr) { super(addr); } 19 | 20 | 21 | public static final int 22 | NB_SCALES = 64, 23 | NB_PAIRS = 512, 24 | NB_ORIENPAIRS = 45; 25 | 26 | 27 | // 28 | // C++: static Ptr_FREAK create(bool orientationNormalized = true, bool scaleNormalized = true, float patternScale = 22.0f, int nOctaves = 4, vector_int selectedPairs = std::vector()) 29 | // 30 | 31 | //javadoc: FREAK::create(orientationNormalized, scaleNormalized, patternScale, nOctaves, selectedPairs) 32 | public static FREAK create(boolean orientationNormalized, boolean scaleNormalized, float patternScale, int nOctaves, MatOfInt selectedPairs) 33 | { 34 | Mat selectedPairs_mat = selectedPairs; 35 | FREAK retVal = new FREAK(create_0(orientationNormalized, scaleNormalized, patternScale, nOctaves, selectedPairs_mat.nativeObj)); 36 | 37 | return retVal; 38 | } 39 | 40 | //javadoc: FREAK::create() 41 | public static FREAK create() 42 | { 43 | 44 | FREAK retVal = new FREAK(create_1()); 45 | 46 | return retVal; 47 | } 48 | 49 | 50 | @Override 51 | protected void finalize() throws Throwable { 52 | delete(nativeObj); 53 | } 54 | 55 | 56 | 57 | // C++: static Ptr_FREAK create(bool orientationNormalized = true, bool scaleNormalized = true, float patternScale = 22.0f, int nOctaves = 4, vector_int selectedPairs = std::vector()) 58 | private static native long create_0(boolean orientationNormalized, boolean scaleNormalized, float patternScale, int nOctaves, long selectedPairs_mat_nativeObj); 59 | private static native long create_1(); 60 | 61 | // native support for java finalize() 62 | private static native void delete(long nativeObj); 63 | 64 | } 65 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/xfeatures2d/HarrisLaplaceFeatureDetector.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.xfeatures2d; 6 | 7 | import org.opencv.features2d.Feature2D; 8 | 9 | // C++: class HarrisLaplaceFeatureDetector 10 | //javadoc: HarrisLaplaceFeatureDetector 11 | public class HarrisLaplaceFeatureDetector extends Feature2D { 12 | 13 | protected HarrisLaplaceFeatureDetector(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_HarrisLaplaceFeatureDetector create(int numOctaves = 6, float corn_thresh = 0.01f, float DOG_thresh = 0.01f, int maxCorners = 5000, int num_layers = 4) 18 | // 19 | 20 | //javadoc: HarrisLaplaceFeatureDetector::create(numOctaves, corn_thresh, DOG_thresh, maxCorners, num_layers) 21 | public static HarrisLaplaceFeatureDetector create(int numOctaves, float corn_thresh, float DOG_thresh, int maxCorners, int num_layers) 22 | { 23 | 24 | HarrisLaplaceFeatureDetector retVal = new HarrisLaplaceFeatureDetector(create_0(numOctaves, corn_thresh, DOG_thresh, maxCorners, num_layers)); 25 | 26 | return retVal; 27 | } 28 | 29 | //javadoc: HarrisLaplaceFeatureDetector::create() 30 | public static HarrisLaplaceFeatureDetector create() 31 | { 32 | 33 | HarrisLaplaceFeatureDetector retVal = new HarrisLaplaceFeatureDetector(create_1()); 34 | 35 | return retVal; 36 | } 37 | 38 | 39 | @Override 40 | protected void finalize() throws Throwable { 41 | delete(nativeObj); 42 | } 43 | 44 | 45 | 46 | // C++: static Ptr_HarrisLaplaceFeatureDetector create(int numOctaves = 6, float corn_thresh = 0.01f, float DOG_thresh = 0.01f, int maxCorners = 5000, int num_layers = 4) 47 | private static native long create_0(int numOctaves, float corn_thresh, float DOG_thresh, int maxCorners, int num_layers); 48 | private static native long create_1(); 49 | 50 | // native support for java finalize() 51 | private static native void delete(long nativeObj); 52 | 53 | } 54 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/xfeatures2d/LATCH.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.xfeatures2d; 6 | 7 | import org.opencv.features2d.Feature2D; 8 | 9 | // C++: class LATCH 10 | //javadoc: LATCH 11 | public class LATCH extends Feature2D { 12 | 13 | protected LATCH(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_LATCH create(int bytes = 32, bool rotationInvariance = true, int half_ssd_size = 3) 18 | // 19 | 20 | //javadoc: LATCH::create(bytes, rotationInvariance, half_ssd_size) 21 | public static LATCH create(int bytes, boolean rotationInvariance, int half_ssd_size) 22 | { 23 | 24 | LATCH retVal = new LATCH(create_0(bytes, rotationInvariance, half_ssd_size)); 25 | 26 | return retVal; 27 | } 28 | 29 | //javadoc: LATCH::create() 30 | public static LATCH create() 31 | { 32 | 33 | LATCH retVal = new LATCH(create_1()); 34 | 35 | return retVal; 36 | } 37 | 38 | 39 | @Override 40 | protected void finalize() throws Throwable { 41 | delete(nativeObj); 42 | } 43 | 44 | 45 | 46 | // C++: static Ptr_LATCH create(int bytes = 32, bool rotationInvariance = true, int half_ssd_size = 3) 47 | private static native long create_0(int bytes, boolean rotationInvariance, int half_ssd_size); 48 | private static native long create_1(); 49 | 50 | // native support for java finalize() 51 | private static native void delete(long nativeObj); 52 | 53 | } 54 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/xfeatures2d/LUCID.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.xfeatures2d; 6 | 7 | import org.opencv.features2d.Feature2D; 8 | 9 | // C++: class LUCID 10 | //javadoc: LUCID 11 | public class LUCID extends Feature2D { 12 | 13 | protected LUCID(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_LUCID create(int lucid_kernel = 1, int blur_kernel = 2) 18 | // 19 | 20 | //javadoc: LUCID::create(lucid_kernel, blur_kernel) 21 | public static LUCID create(int lucid_kernel, int blur_kernel) 22 | { 23 | 24 | LUCID retVal = new LUCID(create_0(lucid_kernel, blur_kernel)); 25 | 26 | return retVal; 27 | } 28 | 29 | //javadoc: LUCID::create() 30 | public static LUCID create() 31 | { 32 | 33 | LUCID retVal = new LUCID(create_1()); 34 | 35 | return retVal; 36 | } 37 | 38 | 39 | @Override 40 | protected void finalize() throws Throwable { 41 | delete(nativeObj); 42 | } 43 | 44 | 45 | 46 | // C++: static Ptr_LUCID create(int lucid_kernel = 1, int blur_kernel = 2) 47 | private static native long create_0(int lucid_kernel, int blur_kernel); 48 | private static native long create_1(); 49 | 50 | // native support for java finalize() 51 | private static native void delete(long nativeObj); 52 | 53 | } 54 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/xfeatures2d/MSDDetector.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.xfeatures2d; 6 | 7 | import org.opencv.features2d.Feature2D; 8 | 9 | // C++: class MSDDetector 10 | //javadoc: MSDDetector 11 | public class MSDDetector extends Feature2D { 12 | 13 | protected MSDDetector(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 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/xfeatures2d/SIFT.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.xfeatures2d; 6 | 7 | import org.opencv.features2d.Feature2D; 8 | 9 | // C++: class SIFT 10 | //javadoc: SIFT 11 | public class SIFT extends Feature2D { 12 | 13 | protected SIFT(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_SIFT create(int nfeatures = 0, int nOctaveLayers = 3, double contrastThreshold = 0.04, double edgeThreshold = 10, double sigma = 1.6) 18 | // 19 | 20 | //javadoc: SIFT::create(nfeatures, nOctaveLayers, contrastThreshold, edgeThreshold, sigma) 21 | public static SIFT create(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma) 22 | { 23 | 24 | SIFT retVal = new SIFT(create_0(nfeatures, nOctaveLayers, contrastThreshold, edgeThreshold, sigma)); 25 | 26 | return retVal; 27 | } 28 | 29 | //javadoc: SIFT::create() 30 | public static SIFT create() 31 | { 32 | 33 | SIFT retVal = new SIFT(create_1()); 34 | 35 | return retVal; 36 | } 37 | 38 | 39 | @Override 40 | protected void finalize() throws Throwable { 41 | delete(nativeObj); 42 | } 43 | 44 | 45 | 46 | // C++: static Ptr_SIFT create(int nfeatures = 0, int nOctaveLayers = 3, double contrastThreshold = 0.04, double edgeThreshold = 10, double sigma = 1.6) 47 | private static native long create_0(int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma); 48 | private static native long create_1(); 49 | 50 | // native support for java finalize() 51 | private static native void delete(long nativeObj); 52 | 53 | } 54 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/xfeatures2d/StarDetector.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.xfeatures2d; 6 | 7 | import org.opencv.features2d.Feature2D; 8 | 9 | // C++: class StarDetector 10 | //javadoc: StarDetector 11 | public class StarDetector extends Feature2D { 12 | 13 | protected StarDetector(long addr) { super(addr); } 14 | 15 | 16 | // 17 | // C++: static Ptr_StarDetector create(int maxSize = 45, int responseThreshold = 30, int lineThresholdProjected = 10, int lineThresholdBinarized = 8, int suppressNonmaxSize = 5) 18 | // 19 | 20 | //javadoc: StarDetector::create(maxSize, responseThreshold, lineThresholdProjected, lineThresholdBinarized, suppressNonmaxSize) 21 | public static StarDetector create(int maxSize, int responseThreshold, int lineThresholdProjected, int lineThresholdBinarized, int suppressNonmaxSize) 22 | { 23 | 24 | StarDetector retVal = new StarDetector(create_0(maxSize, responseThreshold, lineThresholdProjected, lineThresholdBinarized, suppressNonmaxSize)); 25 | 26 | return retVal; 27 | } 28 | 29 | //javadoc: StarDetector::create() 30 | public static StarDetector create() 31 | { 32 | 33 | StarDetector retVal = new StarDetector(create_1()); 34 | 35 | return retVal; 36 | } 37 | 38 | 39 | @Override 40 | protected void finalize() throws Throwable { 41 | delete(nativeObj); 42 | } 43 | 44 | 45 | 46 | // C++: static Ptr_StarDetector create(int maxSize = 45, int responseThreshold = 30, int lineThresholdProjected = 10, int lineThresholdBinarized = 8, int suppressNonmaxSize = 5) 47 | private static native long create_0(int maxSize, int responseThreshold, int lineThresholdProjected, int lineThresholdBinarized, int suppressNonmaxSize); 48 | private static native long create_1(); 49 | 50 | // native support for java finalize() 51 | private static native void delete(long nativeObj); 52 | 53 | } 54 | -------------------------------------------------------------------------------- /openCVLibrary320/src/org/opencv/xfeatures2d/Xfeatures2d.java: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is auto-generated. Please don't modify it! 4 | // 5 | package org.opencv.xfeatures2d; 6 | 7 | 8 | 9 | public class Xfeatures2d { 10 | 11 | 12 | 13 | } 14 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | include ':openCVLibrary320' --------------------------------------------------------------------------------