├── .gitignore ├── AppProject └── EmbVisionTrack │ ├── .gitignore │ ├── .idea │ ├── codeStyles │ │ └── Project.xml │ ├── gradle.xml │ ├── jarRepositories.xml │ ├── misc.xml │ ├── runConfigurations.xml │ └── vcs.xml │ ├── app │ ├── .gitignore │ ├── build.gradle │ ├── libs │ │ └── guava-18.0.jar │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── pers │ │ │ └── hw │ │ │ └── evtrack │ │ │ └── ExampleInstrumentedTest.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── pers │ │ │ │ └── hw │ │ │ │ └── evtrack │ │ │ │ ├── Client.java │ │ │ │ ├── Command.java │ │ │ │ ├── DynamicLineChart.java │ │ │ │ ├── FirstFragment.java │ │ │ │ ├── FourthFragment.java │ │ │ │ ├── ImageConvert.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── SecondFragment.java │ │ │ │ ├── ThirdFragment.java │ │ │ │ ├── net │ │ │ │ ├── Buffer.java │ │ │ │ ├── TcpClient.java │ │ │ │ └── TcpConnection.java │ │ │ │ └── view │ │ │ │ ├── DialogUtils.java │ │ │ │ ├── ImageSurfaceView.java │ │ │ │ ├── RoundMenuView.java │ │ │ │ └── SteerView.java │ │ └── res │ │ │ ├── anim │ │ │ ├── dialog_enter.xml │ │ │ ├── dialog_exit.xml │ │ │ └── rotate_animation.xml │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ ├── ahead.png │ │ │ ├── circle.xml │ │ │ ├── dialog_loading.xml │ │ │ ├── dialog_loading_img.png │ │ │ ├── ic_launcher_background.xml │ │ │ ├── loading_bg.png │ │ │ ├── lock.png │ │ │ ├── menu_add.png │ │ │ ├── mode_chg.jpg │ │ │ ├── ok.png │ │ │ ├── reverse.png │ │ │ ├── shape_btn.xml │ │ │ ├── shape_tv.xml │ │ │ ├── stop.png │ │ │ └── user.png │ │ │ ├── layout │ │ │ ├── activity_main.xml │ │ │ ├── bottom.xml │ │ │ ├── connect.xml │ │ │ ├── dialog_loading.xml │ │ │ ├── dialog_notice.xml │ │ │ ├── dialog_server_addr.xml │ │ │ ├── tab_first.xml │ │ │ ├── tab_fourth.xml │ │ │ ├── tab_second.xml │ │ │ ├── tab_third.xml │ │ │ └── top.xml │ │ │ ├── menu │ │ │ └── main.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── icon_launcher.png │ │ │ └── icon_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── icon_launcher.png │ │ │ └── icon_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── icon_launcher.png │ │ │ └── icon_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── icon_launcher.png │ │ │ └── icon_launcher_round.png │ │ │ └── values │ │ │ ├── attrs.xml │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── test │ │ └── java │ │ └── pers │ │ └── hw │ │ └── evtrack │ │ └── ExampleUnitTest.java │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── LICENSE ├── README.md ├── assets ├── .gitignore ├── Makefile ├── Makefile.link ├── check_built_deps.sh ├── collect_dir.sh ├── common.mk ├── conf │ ├── user.conf │ └── var.conf ├── drivers │ ├── .gitignore │ ├── Makefile │ ├── mach │ │ ├── gpio.c │ │ ├── gpio.h │ │ ├── pwm.c │ │ └── pwm.h │ ├── motor │ │ └── motor.c │ └── servo │ │ └── servo.c ├── include │ └── 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 │ │ ├── async.hpp │ │ ├── base.hpp │ │ ├── bindings_utils.hpp │ │ ├── bufferpool.hpp │ │ ├── check.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 │ │ ├── cvstd_wrapper.hpp │ │ ├── detail │ │ │ ├── async_promise.hpp │ │ │ └── exception_ptr.hpp │ │ ├── directx.hpp │ │ ├── eigen.hpp │ │ ├── fast_math.hpp │ │ ├── hal │ │ │ ├── hal.hpp │ │ │ ├── interface.h │ │ │ ├── intrin.hpp │ │ │ ├── intrin_avx.hpp │ │ │ ├── intrin_avx512.hpp │ │ │ ├── intrin_cpp.hpp │ │ │ ├── intrin_forward.hpp │ │ │ ├── intrin_msa.hpp │ │ │ ├── intrin_neon.hpp │ │ │ ├── intrin_sse.hpp │ │ │ ├── intrin_sse_em.hpp │ │ │ ├── intrin_vsx.hpp │ │ │ ├── intrin_wasm.hpp │ │ │ └── msa_macros.h │ │ ├── mat.hpp │ │ ├── mat.inl.hpp │ │ ├── matx.hpp │ │ ├── neon_utils.hpp │ │ ├── ocl.hpp │ │ ├── ocl_genbase.hpp │ │ ├── opencl │ │ │ ├── ocl_defs.hpp │ │ │ ├── opencl_info.hpp │ │ │ ├── opencl_svm.hpp │ │ │ └── runtime │ │ │ │ ├── autogenerated │ │ │ │ ├── opencl_clamdblas.hpp │ │ │ │ ├── opencl_clamdfft.hpp │ │ │ │ ├── opencl_core.hpp │ │ │ │ ├── opencl_core_wrappers.hpp │ │ │ │ ├── opencl_gl.hpp │ │ │ │ └── opencl_gl_wrappers.hpp │ │ │ │ ├── opencl_clamdblas.hpp │ │ │ │ ├── opencl_clamdfft.hpp │ │ │ │ ├── opencl_core.hpp │ │ │ │ ├── opencl_core_wrappers.hpp │ │ │ │ ├── opencl_gl.hpp │ │ │ │ ├── opencl_gl_wrappers.hpp │ │ │ │ ├── opencl_svm_20.hpp │ │ │ │ ├── opencl_svm_definitions.hpp │ │ │ │ └── opencl_svm_hsa_extension.hpp │ │ ├── opengl.hpp │ │ ├── operations.hpp │ │ ├── optim.hpp │ │ ├── ovx.hpp │ │ ├── persistence.hpp │ │ ├── saturate.hpp │ │ ├── simd_intrinsics.hpp │ │ ├── softfloat.hpp │ │ ├── sse_utils.hpp │ │ ├── traits.hpp │ │ ├── types.hpp │ │ ├── types_c.h │ │ ├── utility.hpp │ │ ├── utils │ │ │ ├── allocator_stats.hpp │ │ │ ├── allocator_stats.impl.hpp │ │ │ ├── filesystem.hpp │ │ │ ├── logger.defines.hpp │ │ │ ├── logger.hpp │ │ │ ├── logtag.hpp │ │ │ └── trace.hpp │ │ ├── va_intel.hpp │ │ ├── version.hpp │ │ └── vsx_utils.hpp │ │ ├── core_detect.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 │ │ ├── sr_bsds.hpp │ │ ├── sr_div2k.hpp │ │ ├── sr_general100.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 │ │ ├── utils │ │ │ └── inference_engine.hpp │ │ └── version.hpp │ │ ├── dnn_superres.hpp │ │ ├── dpm.hpp │ │ ├── face.hpp │ │ ├── face │ │ ├── bif.hpp │ │ ├── face_alignment.hpp │ │ ├── facemark.hpp │ │ ├── facemarkAAM.hpp │ │ ├── facemarkLBF.hpp │ │ ├── facemark_train.hpp │ │ ├── facerec.hpp │ │ ├── mace.hpp │ │ └── predict_collector.hpp │ │ ├── features2d.hpp │ │ ├── features2d │ │ ├── features2d.hpp │ │ └── hal │ │ │ └── interface.h │ │ ├── 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 │ │ ├── gapi.hpp │ │ ├── gapi │ │ ├── core.hpp │ │ ├── cpu │ │ │ ├── core.hpp │ │ │ ├── gcpukernel.hpp │ │ │ └── imgproc.hpp │ │ ├── fluid │ │ │ ├── core.hpp │ │ │ ├── gfluidbuffer.hpp │ │ │ ├── gfluidkernel.hpp │ │ │ └── imgproc.hpp │ │ ├── garg.hpp │ │ ├── garray.hpp │ │ ├── gasync_context.hpp │ │ ├── gcall.hpp │ │ ├── gcommon.hpp │ │ ├── gcompiled.hpp │ │ ├── gcompiled_async.hpp │ │ ├── gcompoundkernel.hpp │ │ ├── gcomputation.hpp │ │ ├── gcomputation_async.hpp │ │ ├── gkernel.hpp │ │ ├── gmat.hpp │ │ ├── gmetaarg.hpp │ │ ├── gproto.hpp │ │ ├── gpu │ │ │ ├── core.hpp │ │ │ ├── ggpukernel.hpp │ │ │ └── imgproc.hpp │ │ ├── gscalar.hpp │ │ ├── gtransform.hpp │ │ ├── gtype_traits.hpp │ │ ├── gtyped.hpp │ │ ├── imgproc.hpp │ │ ├── infer.hpp │ │ ├── infer │ │ │ └── ie.hpp │ │ ├── ocl │ │ │ ├── core.hpp │ │ │ ├── goclkernel.hpp │ │ │ └── imgproc.hpp │ │ ├── opencv_includes.hpp │ │ ├── operators.hpp │ │ ├── own │ │ │ ├── assert.hpp │ │ │ ├── convert.hpp │ │ │ ├── cvdefs.hpp │ │ │ ├── exports.hpp │ │ │ ├── mat.hpp │ │ │ ├── saturate.hpp │ │ │ ├── scalar.hpp │ │ │ └── types.hpp │ │ ├── render.hpp │ │ └── util │ │ │ ├── any.hpp │ │ │ ├── compiler_hints.hpp │ │ │ ├── optional.hpp │ │ │ ├── throw.hpp │ │ │ ├── util.hpp │ │ │ └── variant.hpp │ │ ├── hfs.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 │ │ └── legacy │ │ │ └── constants_c.h │ │ ├── imgproc.hpp │ │ ├── imgproc │ │ ├── detail │ │ │ └── gcgraph.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 │ │ └── ml.inl.hpp │ │ ├── objdetect.hpp │ │ ├── objdetect │ │ ├── detection_based_tracker.hpp │ │ └── objdetect.hpp │ │ ├── opencv.hpp │ │ ├── opencv_modules.hpp │ │ ├── optflow.hpp │ │ ├── optflow │ │ ├── motempl.hpp │ │ ├── pcaflow.hpp │ │ ├── rlofflow.hpp │ │ └── sparse_matching_gpc.hpp │ │ ├── phase_unwrapping.hpp │ │ ├── phase_unwrapping │ │ ├── histogramphaseunwrapping.hpp │ │ └── phase_unwrapping.hpp │ │ ├── photo.hpp │ │ ├── photo │ │ ├── cuda.hpp │ │ ├── legacy │ │ │ └── constants_c.h │ │ └── photo.hpp │ │ ├── plot.hpp │ │ ├── quality.hpp │ │ ├── quality │ │ ├── quality_utils.hpp │ │ ├── qualitybase.hpp │ │ ├── qualitybrisque.hpp │ │ ├── qualitygmsd.hpp │ │ ├── qualitymse.hpp │ │ ├── qualitypsnr.hpp │ │ └── qualityssim.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 │ │ ├── depth.hpp │ │ ├── kinfu.hpp │ │ └── 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 │ │ ├── quasi_dense_stereo.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 │ │ └── textDetector.hpp │ │ ├── tracking.hpp │ │ ├── tracking │ │ ├── feature.hpp │ │ ├── kalman_filters.hpp │ │ ├── onlineBoosting.hpp │ │ ├── onlineMIL.hpp │ │ ├── tldDataset.hpp │ │ ├── tracker.hpp │ │ ├── tracking.hpp │ │ └── tracking_by_matching.hpp │ │ ├── video.hpp │ │ ├── video │ │ ├── background_segm.hpp │ │ ├── legacy │ │ │ └── constants_c.h │ │ ├── tracking.hpp │ │ └── video.hpp │ │ ├── videoio.hpp │ │ ├── videoio │ │ ├── cap_ios.h │ │ ├── legacy │ │ │ └── constants_c.h │ │ ├── registry.hpp │ │ ├── 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 │ │ ├── brightedges.hpp │ │ ├── color_match.hpp │ │ ├── deriche_filter.hpp │ │ ├── disparity_filter.hpp │ │ ├── edge_filter.hpp │ │ ├── edgeboxes.hpp │ │ ├── edgepreserving_filter.hpp │ │ ├── estimated_covariance.hpp │ │ ├── fast_hough_transform.hpp │ │ ├── fast_line_detector.hpp │ │ ├── fourier_descriptors.hpp │ │ ├── lsc.hpp │ │ ├── paillou_filter.hpp │ │ ├── peilin.hpp │ │ ├── ridgefilter.hpp │ │ ├── run_length_morphology.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 │ │ ├── oilpainting.hpp │ │ ├── tonemap.hpp │ │ └── white_balance.hpp ├── lib │ └── opencv-4.1.2 │ │ ├── libopencv_aruco.so │ │ ├── libopencv_aruco.so.4.1 │ │ ├── libopencv_aruco.so.4.1.2 │ │ ├── libopencv_bgsegm.so │ │ ├── libopencv_bgsegm.so.4.1 │ │ ├── libopencv_bgsegm.so.4.1.2 │ │ ├── libopencv_bioinspired.so │ │ ├── libopencv_bioinspired.so.4.1 │ │ ├── libopencv_bioinspired.so.4.1.2 │ │ ├── libopencv_calib3d.so │ │ ├── libopencv_calib3d.so.4.1 │ │ ├── libopencv_calib3d.so.4.1.2 │ │ ├── libopencv_ccalib.so │ │ ├── libopencv_ccalib.so.4.1 │ │ ├── libopencv_ccalib.so.4.1.2 │ │ ├── libopencv_core.so │ │ ├── libopencv_core.so.4.1 │ │ ├── libopencv_core.so.4.1.2 │ │ ├── libopencv_datasets.so │ │ ├── libopencv_datasets.so.4.1 │ │ ├── libopencv_datasets.so.4.1.2 │ │ ├── libopencv_dnn.so │ │ ├── libopencv_dnn.so.4.1 │ │ ├── libopencv_dnn.so.4.1.2 │ │ ├── libopencv_dnn_objdetect.so │ │ ├── libopencv_dnn_objdetect.so.4.1 │ │ ├── libopencv_dnn_objdetect.so.4.1.2 │ │ ├── libopencv_dnn_superres.so │ │ ├── libopencv_dnn_superres.so.4.1 │ │ ├── libopencv_dnn_superres.so.4.1.2 │ │ ├── libopencv_dpm.so │ │ ├── libopencv_dpm.so.4.1 │ │ ├── libopencv_dpm.so.4.1.2 │ │ ├── libopencv_face.so │ │ ├── libopencv_face.so.4.1 │ │ ├── libopencv_face.so.4.1.2 │ │ ├── libopencv_features2d.so │ │ ├── libopencv_features2d.so.4.1 │ │ ├── libopencv_features2d.so.4.1.2 │ │ ├── libopencv_flann.so │ │ ├── libopencv_flann.so.4.1 │ │ ├── libopencv_flann.so.4.1.2 │ │ ├── libopencv_fuzzy.so │ │ ├── libopencv_fuzzy.so.4.1 │ │ ├── libopencv_fuzzy.so.4.1.2 │ │ ├── libopencv_gapi.so │ │ ├── libopencv_gapi.so.4.1 │ │ ├── libopencv_gapi.so.4.1.2 │ │ ├── libopencv_hfs.so │ │ ├── libopencv_hfs.so.4.1 │ │ ├── libopencv_hfs.so.4.1.2 │ │ ├── libopencv_highgui.so │ │ ├── libopencv_highgui.so.4.1 │ │ ├── libopencv_highgui.so.4.1.2 │ │ ├── libopencv_img_hash.so │ │ ├── libopencv_img_hash.so.4.1 │ │ ├── libopencv_img_hash.so.4.1.2 │ │ ├── libopencv_imgcodecs.so │ │ ├── libopencv_imgcodecs.so.4.1 │ │ ├── libopencv_imgcodecs.so.4.1.2 │ │ ├── libopencv_imgproc.so │ │ ├── libopencv_imgproc.so.4.1 │ │ ├── libopencv_imgproc.so.4.1.2 │ │ ├── libopencv_line_descriptor.so │ │ ├── libopencv_line_descriptor.so.4.1 │ │ ├── libopencv_line_descriptor.so.4.1.2 │ │ ├── libopencv_ml.so │ │ ├── libopencv_ml.so.4.1 │ │ ├── libopencv_ml.so.4.1.2 │ │ ├── libopencv_objdetect.so │ │ ├── libopencv_objdetect.so.4.1 │ │ ├── libopencv_objdetect.so.4.1.2 │ │ ├── libopencv_optflow.so │ │ ├── libopencv_optflow.so.4.1 │ │ ├── libopencv_optflow.so.4.1.2 │ │ ├── libopencv_phase_unwrapping.so │ │ ├── libopencv_phase_unwrapping.so.4.1 │ │ ├── libopencv_phase_unwrapping.so.4.1.2 │ │ ├── libopencv_photo.so │ │ ├── libopencv_photo.so.4.1 │ │ ├── libopencv_photo.so.4.1.2 │ │ ├── libopencv_plot.so │ │ ├── libopencv_plot.so.4.1 │ │ ├── libopencv_plot.so.4.1.2 │ │ ├── libopencv_quality.so │ │ ├── libopencv_quality.so.4.1 │ │ ├── libopencv_quality.so.4.1.2 │ │ ├── libopencv_reg.so │ │ ├── libopencv_reg.so.4.1 │ │ ├── libopencv_reg.so.4.1.2 │ │ ├── libopencv_rgbd.so │ │ ├── libopencv_rgbd.so.4.1 │ │ ├── libopencv_rgbd.so.4.1.2 │ │ ├── libopencv_saliency.so │ │ ├── libopencv_saliency.so.4.1 │ │ ├── libopencv_saliency.so.4.1.2 │ │ ├── libopencv_shape.so │ │ ├── libopencv_shape.so.4.1 │ │ ├── libopencv_shape.so.4.1.2 │ │ ├── libopencv_stereo.so │ │ ├── libopencv_stereo.so.4.1 │ │ ├── libopencv_stereo.so.4.1.2 │ │ ├── libopencv_stitching.so │ │ ├── libopencv_stitching.so.4.1 │ │ ├── libopencv_stitching.so.4.1.2 │ │ ├── libopencv_structured_light.so │ │ ├── libopencv_structured_light.so.4.1 │ │ ├── libopencv_structured_light.so.4.1.2 │ │ ├── libopencv_superres.so │ │ ├── libopencv_superres.so.4.1 │ │ ├── libopencv_superres.so.4.1.2 │ │ ├── libopencv_surface_matching.so │ │ ├── libopencv_surface_matching.so.4.1 │ │ ├── libopencv_surface_matching.so.4.1.2 │ │ ├── libopencv_text.so │ │ ├── libopencv_text.so.4.1 │ │ ├── libopencv_text.so.4.1.2 │ │ ├── libopencv_tracking.so │ │ ├── libopencv_tracking.so.4.1 │ │ ├── libopencv_tracking.so.4.1.2 │ │ ├── libopencv_video.so │ │ ├── libopencv_video.so.4.1 │ │ ├── libopencv_video.so.4.1.2 │ │ ├── libopencv_videoio.so │ │ ├── libopencv_videoio.so.4.1 │ │ ├── libopencv_videoio.so.4.1.2 │ │ ├── libopencv_videostab.so │ │ ├── libopencv_videostab.so.4.1 │ │ ├── libopencv_videostab.so.4.1.2 │ │ ├── libopencv_xfeatures2d.so │ │ ├── libopencv_xfeatures2d.so.4.1 │ │ ├── libopencv_xfeatures2d.so.4.1.2 │ │ ├── libopencv_ximgproc.so │ │ ├── libopencv_ximgproc.so.4.1 │ │ ├── libopencv_ximgproc.so.4.1.2 │ │ ├── libopencv_xobjdetect.so │ │ ├── libopencv_xobjdetect.so.4.1 │ │ ├── libopencv_xobjdetect.so.4.1.2 │ │ ├── libopencv_xphoto.so │ │ ├── libopencv_xphoto.so.4.1 │ │ └── libopencv_xphoto.so.4.1.2 └── src │ ├── Makefile │ ├── account.cpp │ ├── account.h │ ├── broadcast_service.cpp │ ├── broadcast_service.h │ ├── command.h │ ├── control │ ├── Makefile │ ├── control_event_loop.cpp │ ├── control_event_loop.h │ ├── control_params.h │ ├── field_control.cpp │ ├── field_control.h │ ├── motion_control.cpp │ ├── motion_control.h │ ├── pid.cpp │ └── pid.h │ ├── data_stream.h │ ├── main.cpp │ ├── net │ ├── Makefile │ ├── acceptor.cpp │ ├── acceptor.h │ ├── buffer.cpp │ ├── buffer.h │ ├── callbacks.h │ ├── channel.cpp │ ├── channel.h │ ├── connector.cpp │ ├── connector.h │ ├── endian.h │ ├── event_loop.cpp │ ├── event_loop.h │ ├── event_loop_thread_pool.cpp │ ├── event_loop_thread_pool.h │ ├── inet_address.cpp │ ├── inet_address.h │ ├── poller.cpp │ ├── poller.h │ ├── socket.cpp │ ├── socket.h │ ├── tcp_client.cpp │ ├── tcp_client.h │ ├── tcp_connection.cpp │ ├── tcp_connection.h │ ├── tcp_server.cpp │ ├── tcp_server.h │ ├── timer_list.cpp │ └── timer_list.h │ ├── server.cpp │ ├── server.h │ ├── session.cpp │ ├── session.h │ ├── util │ ├── Makefile │ ├── any.hpp │ ├── async_logger.cpp │ ├── async_logger.h │ ├── common.h │ ├── concurrent_queue.hpp │ ├── config_file_reader.cpp │ ├── config_file_reader.h │ ├── count_down_latch.h │ ├── log_stream.h │ ├── logger.cpp │ ├── logger.h │ ├── singleton.hpp │ ├── string_util.cpp │ ├── string_util.h │ ├── string_view.h │ ├── sys_cmd.cpp │ ├── sys_cmd.h │ ├── timestamp.cpp │ ├── timestamp.h │ └── type.h │ └── vision │ ├── Makefile │ ├── kcf_tracker │ ├── Makefile │ ├── fft_tools.cpp │ ├── fft_tools.h │ ├── kcf_tracker.cpp │ ├── kcf_tracker.h │ └── rect_tools.hpp │ ├── video_device.cpp │ ├── video_device.h │ ├── vision_event_loop.cpp │ ├── vision_event_loop.h │ ├── yuyv2bgr.cpp │ └── yuyv2bgr.h └── shell └── init.sh /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | tmp/ 3 | *.log 4 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 19 | 20 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | 34 | 35 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 29 5 | buildToolsVersion "29.0.3" 6 | defaultConfig { 7 | applicationId "pers.hw.evtrack" 8 | minSdkVersion 21 9 | targetSdkVersion 29 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | 21 | } 22 | 23 | dependencies { 24 | implementation fileTree(dir: 'libs', include: ['*.jar']) 25 | implementation 'androidx.appcompat:appcompat:1.0.0+' 26 | implementation 'androidx.fragment:fragment:1.0.0+' 27 | implementation 'androidx.lifecycle:lifecycle-livedata:2.0.0-beta1' 28 | implementation 'androidx.lifecycle:lifecycle-viewmodel:2.0.0-beta1' 29 | implementation 'com.github.PhilJay:MPAndroidChart:v3.0.0' 30 | /* 31 | testImplementation 'junit:junit:4.12' 32 | androidTestImplementation 'androidx.test.ext:junit:1.1.0' 33 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 34 | */ 35 | } 36 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/libs/guava-18.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/libs/guava-18.0.jar -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/androidTest/java/pers/hw/evtrack/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package pers.hw.evtrack; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | 25 | assertEquals("pers.hw.evtrack", appContext.getPackageName()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 22 | 23 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/java/pers/hw/evtrack/Command.java: -------------------------------------------------------------------------------- 1 | package pers.hw.evtrack; 2 | 3 | 4 | public enum Command { 5 | INIT, 6 | RESET, 7 | NOTICE, 8 | MESSAGE, 9 | IMAGE, 10 | LOCATE, 11 | SET_TARGET, 12 | START_TRACK, 13 | STOP_TRACK, 14 | ENABLE_MOTION_AUTOCTL, 15 | DISABLE_MOTION_AUTOCTL, 16 | START_MOTOR, 17 | STOP_MOTOR, 18 | SET_MOTOR_VAL, 19 | GET_MOTOR_VAL, 20 | SET_MOTION_CTL_PID, 21 | ENABLE_FIELD_AUTOCTL, 22 | DISABLE_FIELD_AUTOCTL, 23 | SET_SERVO_VAL, 24 | GET_SERVO_VAL, 25 | SET_FIELD_CTL_PID, 26 | GET_CLIENT_CNT, 27 | SEND_TO_ALL_CLIENTS, 28 | SEND_TO_CLIENT, 29 | ENABLE_MULTI_SCALE, 30 | DISABLE_MULTI_SCALE, 31 | SYSTEM_CMD, 32 | RESTART_SERVER, 33 | HALT, 34 | REBOOT, 35 | UPDATE_CLIENT_CNT, 36 | LOGOUT, 37 | UPDATE_PID, 38 | LOGIN, 39 | ENUM_COUNT 40 | } 41 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/java/pers/hw/evtrack/view/DialogUtils.java: -------------------------------------------------------------------------------- 1 | package pers.hw.evtrack.view; 2 | 3 | 4 | import android.app.Dialog; 5 | import android.content.Context; 6 | import android.view.Gravity; 7 | import android.view.LayoutInflater; 8 | import android.view.View; 9 | import android.view.Window; 10 | import android.view.WindowManager; 11 | import android.widget.LinearLayout; 12 | import android.widget.TextView; 13 | 14 | import pers.hw.evtrack.R; 15 | 16 | 17 | public class DialogUtils { 18 | public static Dialog createLoadingDialog(Context context, String msg) { 19 | LayoutInflater inflater = LayoutInflater.from(context); 20 | View v = inflater.inflate(R.layout.dialog_loading, null);// 得到加载view 21 | LinearLayout layout = v.findViewById(R.id.dialog_loading_view);// 加载布局 22 | TextView tipTextView = v.findViewById(R.id.tipTextView);// 提示文字 23 | tipTextView.setText(msg);// 设置加载信息 24 | 25 | Dialog loadingDialog = new Dialog(context, R.style.MyDialogStyle);// 创建自定义样式dialog 26 | loadingDialog.setCancelable(false); // 是否可以按“返回键”消失 27 | loadingDialog.setCanceledOnTouchOutside(false); // 点击加载框以外的区域 28 | loadingDialog.setContentView(layout, new LinearLayout.LayoutParams( 29 | LinearLayout.LayoutParams.MATCH_PARENT, 30 | LinearLayout.LayoutParams.MATCH_PARENT));// 设置布局 31 | 32 | Window window = loadingDialog.getWindow(); 33 | WindowManager.LayoutParams lp = window.getAttributes(); 34 | lp.width = WindowManager.LayoutParams.MATCH_PARENT; 35 | lp.height = WindowManager.LayoutParams.WRAP_CONTENT; 36 | window.setGravity(Gravity.CENTER); 37 | window.setAttributes(lp); 38 | window.setWindowAnimations(R.style.PopWindowAnimStyle); 39 | loadingDialog.show(); 40 | 41 | return loadingDialog; 42 | } 43 | 44 | 45 | public static void closeDialog(Dialog mDialogUtils) { 46 | if (mDialogUtils != null && mDialogUtils.isShowing()) { 47 | mDialogUtils.dismiss(); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/anim/dialog_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/anim/dialog_exit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/anim/rotate_animation.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 14 | 15 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable/ahead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/drawable/ahead.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable/circle.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 11 | 12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable/dialog_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable/dialog_loading_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/drawable/dialog_loading_img.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable/loading_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/drawable/loading_bg.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/drawable/lock.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable/menu_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/drawable/menu_add.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable/mode_chg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/drawable/mode_chg.jpg -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/drawable/ok.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable/reverse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/drawable/reverse.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable/shape_btn.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable/shape_tv.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/drawable/stop.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/drawable/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/drawable/user.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 20 | 21 | 25 | 26 | 27 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/layout/bottom.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 24 | 25 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | 41 | 42 | 43 | 44 | 45 | 48 | 49 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/layout/dialog_loading.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | 19 | 27 | 28 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/layout/dialog_notice.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 14 | 15 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/layout/dialog_server_addr.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 17 | 18 | 28 | 29 | 30 | 31 | 32 | 35 | 36 | 42 | 43 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/layout/top.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 24 | 25 | 29 | 30 | 31 | 37 | 38 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 10 | 15 | 16 | 21 | 22 | 27 | 28 | 33 | 34 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/mipmap-hdpi/icon_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/mipmap-hdpi/icon_launcher.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/mipmap-hdpi/icon_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/mipmap-hdpi/icon_launcher_round.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/mipmap-mdpi/icon_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/mipmap-mdpi/icon_launcher.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/mipmap-mdpi/icon_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/mipmap-mdpi/icon_launcher_round.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/mipmap-xxhdpi/icon_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/mipmap-xxhdpi/icon_launcher.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/mipmap-xxhdpi/icon_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/mipmap-xxhdpi/icon_launcher_round.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/mipmap-xxxhdpi/icon_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/mipmap-xxxhdpi/icon_launcher.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/mipmap-xxxhdpi/icon_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/app/src/main/res/mipmap-xxxhdpi/icon_launcher_round.png -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 16dp 4 | 5 | 6 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | VisionTrack 4 | 5 | 系统控制 6 | 实时画面 7 | 状态监测 8 | 用户管理 9 | 10 | 关闭连接 11 | 状态复位 12 | 摄像头复位 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/app/src/test/java/pers/hw/evtrack/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package pers.hw.evtrack; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'} 6 | google() 7 | jcenter() 8 | 9 | } 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:3.5.3' 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 | maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'} 21 | maven { url 'https://jitpack.io' } 22 | google() 23 | jcenter() 24 | 25 | } 26 | } 27 | 28 | task clean(type: Delete) { 29 | delete rootProject.buildDir 30 | } 31 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | 21 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/AppProject/EmbVisionTrack/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Mar 02 21:49:23 CST 2020 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-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /AppProject/EmbVisionTrack/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | rootProject.name='EmbVisionTrack' 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # emb_vision_track 2 | 3 | ## 基于ARM-Linux的嵌入式视觉移动追踪系统 4 | ## 搭载舵机云台的机器人小车通过视觉追踪设定目标,并通过 Android APP 回传画面和无线控制 5 | 6 | ### 系统描述 7 | 1. 在ARM Cortex A9 (S5P4418) 开发板上利用多线程分别实现网络 IO、图像采集、图像处理、硬件控制功能 8 | 2. 在 Linux 环境下搭建 Reactor 模型 TCP 服务器,支持多用户的连接访问 9 | 3. 利用 V4L2 接口采集相机图像,使用 OpenCV 实现的 KCF 算法进行任意设定目标的视觉跟踪(单尺度和多尺度追踪两种模式) 10 | 4. 编写 Linux 内核模块实现舵机和电机驱动,分别控制摄像头云台和机器人小车,并在用户层实现手动控制和自动控制逻辑 11 | 5. 开发 Android APP 进行 TCP 通信,以控制系统运行、接收相机画面、监测运行数据 12 | 13 | ### 说明 14 | 嵌入式系统中,内核层代码将硬件驱动编译成内核模块,使用了两个PWM控制舵机云台,两个PWM及两个GPIO控制机器人小车,可以参考移植到其它平台;应用层利用C++11实现网络通讯、视觉处理、硬件控制功能,代码可运行在任意的32位ARM-Linux平台(包含树莓派3B+),未安装内核模块时会自动忽略底层的硬件控制指令,可以预览视觉跟踪功能。 15 | 16 | Android APP在Android Studio下开发。 17 | 18 | ### 编译安装 19 | 安装支持32位ARM-Linux的交叉编译器 20 | 21 | 进入assets目录:`cd assets/` 22 | 23 | 编译代码:`make -j` 24 | 25 | 编译完成后在bin目录下生成可执行文件,将bin、lib、conf三个目录拷贝到开发板上,运行bin目录下的可执行文件即可 26 | 27 | ### 编译内核模块 28 | 29 | 下载Linux内核源码(本项目使用的是支持S5P4418的linux-3.4.y-nanopi2-lollipop-mr1,其它平台可根据引脚功能分布加以调整),编译内核 30 | 31 | 打开工程assets/drivers目录下的Makefile,修改KERNEL_DIR为内核源码目录 32 | 33 | 编译内核模块,在assets目录下执行:`make modules` 34 | 35 | 生成的内核模块ko文件在assets/build/modules目录下,通过insmod命令加载 36 | 37 | -------------------------------------------------------------------------------- /assets/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | build/ 3 | tmp/ 4 | /bin/* 5 | !/bin/*.sh 6 | 7 | -------------------------------------------------------------------------------- /assets/Makefile: -------------------------------------------------------------------------------- 1 | 2 | CXX:=arm-linux-g++ 3 | CXXFLAGS:=-std=c++11 -Wall 4 | LINKFLAGS:=-pthread -lm 5 | 6 | OUTPUT_NAME:=emb_vision_track 7 | 8 | TYPE?=Release 9 | ifeq ($(TYPE), Debug) 10 | CXXFLAGS+= -O -g 11 | else ifeq ($(TYPE), Release) 12 | CXXFLAGS+= -O2 -DNDEBUG 13 | else 14 | $(error TYPE invalid) 15 | endif 16 | 17 | ifneq ("$(MACRO)", "") 18 | CXXFLAGS+=$(addprefix -D,$(MACRO)) 19 | endif 20 | 21 | 22 | ifeq ($(TYPE), Debug) 23 | BIN_NAME?=$(OUTPUT_NAME).d 24 | else 25 | BIN_NAME?=$(OUTPUT_NAME) 26 | endif 27 | 28 | 29 | ifeq ($(TYPE), Debug) 30 | OBJ_DIR_NAME?=obj.d 31 | DEP_DIR_NAME?=dep.d 32 | else 33 | OBJ_DIR_NAME?=obj 34 | DEP_DIR_NAME?=dep 35 | endif 36 | 37 | TOPDIR:=$(shell pwd) 38 | SRC_TOPDIR:=src 39 | OBJ_TOPDIR:=build/$(OBJ_DIR_NAME) 40 | DEP_TOPDIR:=build/$(DEP_DIR_NAME) 41 | LIB_DIR:=lib 42 | LOG_DIR:=logs 43 | BIN_DIR:=bin 44 | BIN:=$(BIN_DIR)/$(BIN_NAME) 45 | 46 | export CXX CXXFLAGS TOPDIR SRC_TOPDIR OBJ_TOPDIR DEP_TOPDIR EXTRA_INCLUDE_DIR INSTALL_DIR 47 | 48 | 49 | # Compile CXX project 50 | 51 | .PHONY: all $(SRC_TOPDIR) 52 | all: $(SRC_TOPDIR) $(BIN_DIR) 53 | 54 | $(SRC_TOPDIR): 55 | $(MAKE) -C $@ 56 | @echo 57 | @echo "Check object files..." 58 | @$(MAKE) -f Makefile.link BIN=$(BIN) LINKFLAGS="$(LINKFLAGS)" \ 59 | LIB_DIR="$(LIB_DIR)" OBJ_DIR_NAME="$(OBJ_DIR_NAME)" \ 60 | EXTRA_LIB_DIR="$(EXTRA_LIB_DIR)" EXTRA_LIB_NAME="$(EXTRA_LIB_NAME)" 61 | @echo 62 | 63 | $(BIN_DIR): 64 | mkdir -p $@ 65 | 66 | .PHONY: clean exec test install 67 | 68 | clean: 69 | rm -rf build/ $(LOG_DIR) 70 | rm -f `find $(BIN_DIR) -type f | egrep -v "(.sh$$|.bat$$)"` 71 | 72 | exec: 73 | $(BIN) 74 | 75 | test: 76 | $(MAKE) -C $@ 77 | 78 | 79 | INSTALL_DIR:=$(abspath $(PREFIX)) 80 | INSTALL_LIB_DIR:=$(INSTALL_DIR)/lib 81 | INSTALL_LIB:=$(INSTALL_LIB_DIR)/$(BIN_NAME) 82 | 83 | install: $(INSTALL_LIB) 84 | $(MAKE) -C src $@ 85 | @echo 86 | @echo "installed to: $(INSTALL_DIR)" 87 | @echo 88 | 89 | ifeq ("$(wildcard $(INSTALL_LIB_DIR))", "") 90 | $(INSTALL_LIB):$(BIN) $(INSTALL_LIB_DIR) 91 | else 92 | $(INSTALL_LIB):$(BIN) 93 | endif 94 | cp $< $@ 95 | 96 | $(INSTALL_LIB_DIR): 97 | mkdir -p $@ 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /assets/Makefile.link: -------------------------------------------------------------------------------- 1 | #Link object files 2 | 3 | 4 | #LIST_FILES:=$(shell find build/$(OBJ_DIR_NAME) -name list) 5 | DIR_LIST:=$(shell bash collect_dir.sh build/$(OBJ_DIR_NAME)) 6 | OBJS:=$(foreach n, $(DIR_LIST), $(addprefix $(n)/, $(shell cat $(n)/list))) 7 | 8 | 9 | ifneq ("$(wildcard $(LIB_DIR))", "") 10 | LIB_DIRS?=$(shell find -L $(LIB_DIR) -type d) 11 | LIB_LINK_FLAG:=$(addprefix $$ORIGIN/../,$(LIB_DIRS)) 12 | LIB_LINK_FLAG:=$(shell echo '$(LIB_LINK_FLAG)' | sed -e 's/ /:/g') 13 | 14 | LIB_DIRS+=$(EXTRA_LIB_DIR) 15 | LIB_NAMES:=$(notdir $(foreach n,$(LIB_DIRS),$(wildcard $(n)/*.so))) 16 | 17 | LIB_DIR_FLAG:=$(addprefix -L ,$(LIB_DIRS)) 18 | LIB_NAME_FLAG:=$(patsubst lib%.so,-l%,$(LIB_NAMES)) 19 | LIB_NAME_FLAG+=$(addprefix -l,$(EXTRA_LIB_NAME)) 20 | 21 | LIB_LINK_FLAGS:= $(LIB_DIR_FLAG) $(LIB_NAME_FLAG) -Wl,-disable-new-dtags,-rpath,'$(LIB_LINK_FLAG)' 22 | 23 | endif 24 | 25 | BIN_DIR:=$(dir $(BIN)) 26 | 27 | 28 | all: $(BIN_DIR) $(BIN) 29 | 30 | $(BIN_DIR): 31 | mkdir -p $@ 32 | 33 | $(BIN): $(OBJS) 34 | @echo 35 | @echo "Create execute file" 36 | $(CXX) $(CXXFLAGS) -o $@ $^ $(LINKFLAGS) $(LIB_LINK_FLAGS) 37 | @echo 38 | @echo "Build successfully!" 39 | 40 | -------------------------------------------------------------------------------- /assets/check_built_deps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #echo $1 4 | for dep in $1; do 5 | if [ -f $dep ]; then 6 | file_list=$(paste -s $dep | cut -d':' -f 2 | sed 's/\\/ /g') 7 | #echo $file_list 8 | for file in $file_list; do 9 | if [ ! -f $file ]; then rm $dep; break; fi 10 | done 11 | fi 12 | done 13 | 14 | -------------------------------------------------------------------------------- /assets/collect_dir.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | collect_dir() { 4 | echo $1 5 | subdirs=`cat $1/dir_list` 6 | for dir in $subdirs; do 7 | collect_dir $1/$dir 8 | done 9 | } 10 | 11 | TOP_DIR=`echo $1 | sed "s|/$||"` 12 | collect_dir $TOP_DIR -------------------------------------------------------------------------------- /assets/conf/user.conf: -------------------------------------------------------------------------------- 1 | 0 0 root password 2 | 10000 1 hw pwd 3 | 10002 1 user pwd 4 | -------------------------------------------------------------------------------- /assets/conf/var.conf: -------------------------------------------------------------------------------- 1 | listen_port=18825 2 | video_device=/dev/video0 3 | #servo_device=/dev/servo 4 | #motor_device=/dev/motor 5 | -------------------------------------------------------------------------------- /assets/drivers/.gitignore: -------------------------------------------------------------------------------- 1 | *.ko 2 | *.o 3 | *.mod.c 4 | *.cmd 5 | *.order 6 | *.symvers 7 | .tmp_versions/ 8 | -------------------------------------------------------------------------------- /assets/drivers/Makefile: -------------------------------------------------------------------------------- 1 | # Build kernel modules 2 | 3 | ifneq ($(KERNELRELEASE),) 4 | 5 | # obj-m := .o 6 | obj-m:= motor.o servo.o 7 | 8 | # -objs := 9 | #led-objs:=led/led.o 10 | motor-objs:=motor/motor.o mach/pwm.o mach/gpio.o 11 | servo-objs:=servo/servo.o mach/pwm.o 12 | 13 | else 14 | 15 | KERNEL_DIR:=~/src/linux-3.4.39/ 16 | PWD:=$(shell pwd) 17 | MODULES_DIR:=../build/modules/ 18 | 19 | .PHONY: modules modules_clean 20 | modules: 21 | make -C $(KERNEL_DIR) M=$(PWD) modules ARCH=arm CROSS_COMPILE=arm-linux- 22 | mkdir -p $(MODULES_DIR) 23 | cp *.ko $(MODULES_DIR) 24 | 25 | modules_clean: 26 | make -C $(KERNEL_DIR) M=$(PWD) clean 27 | rm -rf $(MODULES_DIR) 28 | 29 | 30 | endif 31 | 32 | 33 | -------------------------------------------------------------------------------- /assets/drivers/mach/gpio.c: -------------------------------------------------------------------------------- 1 | #include "gpio.h" 2 | 3 | void gpio_set_func(volatile struct GPIO_REGS* port, unsigned int pin, unsigned int fn) 4 | { 5 | if (pin < 16) 6 | { 7 | port->ALTFN0 &= ~(3 << (pin * 2)); 8 | port->ALTFN0 |= (fn << (pin * 2)); 9 | } 10 | else if (pin < 32) 11 | { 12 | port->ALTFN1 &= ~(3 << ((pin - 16) * 2)); 13 | port->ALTFN1 |= (fn << ((pin - 16) * 2)); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /assets/drivers/mach/gpio.h: -------------------------------------------------------------------------------- 1 | #ifndef S5P4418_GPIO_H 2 | #define S5P4418_GPIO_H 3 | 4 | 5 | #define GPIOA_BASE_ADDR (0xC001A000) 6 | #define GPIOB_BASE_ADDR (0xC001B000) 7 | #define GPIOC_BASE_ADDR (0xC001C000) 8 | #define GPIOD_BASE_ADDR (0xC001D000) 9 | #define GPIOE_BASE_ADDR (0xC001E000) 10 | 11 | 12 | struct GPIO_REGS 13 | { 14 | unsigned int OUT; 15 | unsigned int OUTENB;//0:input 1:output 16 | unsigned int RESERVED[6]; 17 | unsigned int ALTFN0;//0-15pin 18 | unsigned int ALTFN1;//16-31pin 19 | }; 20 | 21 | 22 | 23 | #define gpio_dir_out(port,pin) (port)->OUTENB |= (1 << (pin)) 24 | #define gpio_dir_in(port,pin) (port)->OUTENB &= ~(1 << (pin)) 25 | 26 | #define gpio_set_high(port,pin) (port)->OUT |= (1 << (pin)) 27 | #define gpio_set_low(port,pin) (port)->OUT &= ~(1 << (pin)) 28 | 29 | #define gpio_read(port,pin) ((((port)->OUT)>>(pin)) & 0x1) 30 | 31 | 32 | void gpio_set_func(volatile struct GPIO_REGS* port, unsigned int pin, unsigned int fn); 33 | 34 | 35 | #endif //S5P4418_GPIO_H 36 | -------------------------------------------------------------------------------- /assets/drivers/mach/pwm.h: -------------------------------------------------------------------------------- 1 | #ifndef S5P4418_PWM_H 2 | #define S5P4418_PWM_H 3 | 4 | 5 | 6 | void gpio_reset(unsigned int i); 7 | void pwm_set_prescaler(unsigned int i, unsigned int value); 8 | void pwm_set_divider(unsigned int i, unsigned int value); 9 | void pwm_set_duration(unsigned int i, unsigned int value); 10 | void pwm_set_compare(unsigned int i, unsigned int value); 11 | unsigned int pwm_get_prescaler(unsigned int i); 12 | unsigned int pwm_get_divider(unsigned int i); 13 | unsigned int pwm_get_duration(unsigned int i); 14 | unsigned int pwm_get_compare(unsigned int i); 15 | unsigned int pwm_get_count(unsigned int i); 16 | void pwm_control(unsigned int i); 17 | void pwm_start(unsigned int i); 18 | void pwm_stop(unsigned int i); 19 | void pwm_config(unsigned int i, unsigned int pres, unsigned int div, unsigned int dur, unsigned int cmp); 20 | void pwm_virt_addr_init(void); 21 | void pwm_virt_addr_release(void); 22 | 23 | 24 | 25 | #endif //S5P4418_PWM_H 26 | -------------------------------------------------------------------------------- /assets/include/opencv2/core/bindings_utils.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_CORE_BINDINGS_UTILS_HPP 6 | #define OPENCV_CORE_BINDINGS_UTILS_HPP 7 | 8 | #include 9 | #include 10 | 11 | namespace cv { namespace utils { 12 | //! @addtogroup core_utils 13 | //! @{ 14 | 15 | CV_EXPORTS_W String dumpInputArray(InputArray argument); 16 | 17 | CV_EXPORTS_W String dumpInputArrayOfArrays(InputArrayOfArrays argument); 18 | 19 | CV_EXPORTS_W String dumpInputOutputArray(InputOutputArray argument); 20 | 21 | CV_EXPORTS_W String dumpInputOutputArrayOfArrays(InputOutputArrayOfArrays argument); 22 | 23 | CV_WRAP static inline 24 | AsyncArray testAsyncArray(InputArray argument) 25 | { 26 | AsyncPromise p; 27 | p.setValue(argument); 28 | return p.getArrayResult(); 29 | } 30 | 31 | CV_WRAP static inline 32 | AsyncArray testAsyncException() 33 | { 34 | AsyncPromise p; 35 | try 36 | { 37 | CV_Error(Error::StsOk, "Test: Generated async error"); 38 | } 39 | catch (const cv::Exception& e) 40 | { 41 | p.setException(e); 42 | } 43 | return p.getArrayResult(); 44 | } 45 | 46 | //! @} 47 | }} // namespace 48 | 49 | #endif // OPENCV_CORE_BINDINGS_UTILS_HPP 50 | -------------------------------------------------------------------------------- /assets/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 | -------------------------------------------------------------------------------- /assets/include/opencv2/core/detail/async_promise.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_CORE_ASYNC_PROMISE_HPP 6 | #define OPENCV_CORE_ASYNC_PROMISE_HPP 7 | 8 | #include "../async.hpp" 9 | 10 | #include "exception_ptr.hpp" 11 | 12 | namespace cv { 13 | 14 | /** @addtogroup core_async 15 | @{ 16 | */ 17 | 18 | 19 | /** @brief Provides result of asynchronous operations 20 | 21 | */ 22 | class CV_EXPORTS AsyncPromise 23 | { 24 | public: 25 | ~AsyncPromise() CV_NOEXCEPT; 26 | AsyncPromise() CV_NOEXCEPT; 27 | explicit AsyncPromise(const AsyncPromise& o) CV_NOEXCEPT; 28 | AsyncPromise& operator=(const AsyncPromise& o) CV_NOEXCEPT; 29 | void release() CV_NOEXCEPT; 30 | 31 | /** Returns associated AsyncArray 32 | @note Can be called once 33 | */ 34 | AsyncArray getArrayResult(); 35 | 36 | /** Stores asynchronous result. 37 | @param[in] value result 38 | */ 39 | void setValue(InputArray value); 40 | 41 | // TODO "move" setters 42 | 43 | #if CV__EXCEPTION_PTR 44 | /** Stores exception. 45 | @param[in] exception exception to be raised in AsyncArray 46 | */ 47 | void setException(std::exception_ptr exception); 48 | #endif 49 | 50 | /** Stores exception. 51 | @param[in] exception exception to be raised in AsyncArray 52 | */ 53 | void setException(const cv::Exception& exception); 54 | 55 | #ifdef CV_CXX11 56 | explicit AsyncPromise(AsyncPromise&& o) { p = o.p; o.p = NULL; } 57 | AsyncPromise& operator=(AsyncPromise&& o) CV_NOEXCEPT { std::swap(p, o.p); return *this; } 58 | #endif 59 | 60 | 61 | // PImpl 62 | typedef struct AsyncArray::Impl Impl; friend struct AsyncArray::Impl; 63 | inline void* _getImpl() const CV_NOEXCEPT { return p; } 64 | protected: 65 | Impl* p; 66 | }; 67 | 68 | 69 | //! @} 70 | } // namespace 71 | #endif // OPENCV_CORE_ASYNC_PROMISE_HPP 72 | -------------------------------------------------------------------------------- /assets/include/opencv2/core/detail/exception_ptr.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_CORE_DETAILS_EXCEPTION_PTR_H 6 | #define OPENCV_CORE_DETAILS_EXCEPTION_PTR_H 7 | 8 | #ifndef CV__EXCEPTION_PTR 9 | # if defined(__ANDROID__) && defined(ATOMIC_INT_LOCK_FREE) && ATOMIC_INT_LOCK_FREE < 2 10 | # define CV__EXCEPTION_PTR 0 // Not supported, details: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58938 11 | # elif defined(CV_CXX11) 12 | # define CV__EXCEPTION_PTR 1 13 | # elif defined(_MSC_VER) 14 | # define CV__EXCEPTION_PTR (_MSC_VER >= 1600) 15 | # elif defined(__clang__) 16 | # define CV__EXCEPTION_PTR 0 // C++11 only (see above) 17 | # elif defined(__GNUC__) && defined(__GXX_EXPERIMENTAL_CXX0X__) 18 | # define CV__EXCEPTION_PTR (__GXX_EXPERIMENTAL_CXX0X__ > 0) 19 | # endif 20 | #endif 21 | #ifndef CV__EXCEPTION_PTR 22 | # define CV__EXCEPTION_PTR 0 23 | #elif CV__EXCEPTION_PTR 24 | # include // std::exception_ptr 25 | #endif 26 | 27 | #endif // OPENCV_CORE_DETAILS_EXCEPTION_PTR_H 28 | -------------------------------------------------------------------------------- /assets/include/opencv2/core/opencl/runtime/opencl_svm_definitions.hpp: -------------------------------------------------------------------------------- 1 | /* See LICENSE file in the root OpenCV directory */ 2 | 3 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_DEFINITIONS_HPP 4 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_DEFINITIONS_HPP 5 | 6 | #if defined(HAVE_OPENCL_SVM) 7 | #if defined(CL_VERSION_2_0) 8 | 9 | // OpenCL 2.0 contains SVM definitions 10 | 11 | #else 12 | 13 | typedef cl_bitfield cl_device_svm_capabilities; 14 | typedef cl_bitfield cl_svm_mem_flags; 15 | typedef cl_uint cl_kernel_exec_info; 16 | 17 | // 18 | // TODO Add real values after OpenCL 2.0 release 19 | // 20 | 21 | #ifndef CL_DEVICE_SVM_CAPABILITIES 22 | #define CL_DEVICE_SVM_CAPABILITIES 0x1053 23 | 24 | #define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER (1 << 0) 25 | #define CL_DEVICE_SVM_FINE_GRAIN_BUFFER (1 << 1) 26 | #define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM (1 << 2) 27 | #define CL_DEVICE_SVM_ATOMICS (1 << 3) 28 | #endif 29 | 30 | #ifndef CL_MEM_SVM_FINE_GRAIN_BUFFER 31 | #define CL_MEM_SVM_FINE_GRAIN_BUFFER (1 << 10) 32 | #endif 33 | 34 | #ifndef CL_MEM_SVM_ATOMICS 35 | #define CL_MEM_SVM_ATOMICS (1 << 11) 36 | #endif 37 | 38 | 39 | #endif // CL_VERSION_2_0 40 | #endif // HAVE_OPENCL_SVM 41 | 42 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_DEFINITIONS_HPP 43 | -------------------------------------------------------------------------------- /assets/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 | -------------------------------------------------------------------------------- /assets/include/opencv2/core/utils/allocator_stats.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_CORE_ALLOCATOR_STATS_HPP 6 | #define OPENCV_CORE_ALLOCATOR_STATS_HPP 7 | 8 | #include "../cvdef.h" 9 | 10 | namespace cv { namespace utils { 11 | 12 | class AllocatorStatisticsInterface 13 | { 14 | protected: 15 | AllocatorStatisticsInterface() {} 16 | virtual ~AllocatorStatisticsInterface() {} 17 | public: 18 | virtual uint64_t getCurrentUsage() const = 0; 19 | virtual uint64_t getTotalUsage() const = 0; 20 | virtual uint64_t getNumberOfAllocations() const = 0; 21 | virtual uint64_t getPeakUsage() const = 0; 22 | 23 | /** set peak usage = current usage */ 24 | virtual void resetPeakUsage() = 0; 25 | }; 26 | 27 | }} // namespace 28 | 29 | #endif // OPENCV_CORE_ALLOCATOR_STATS_HPP 30 | -------------------------------------------------------------------------------- /assets/include/opencv2/core/utils/logger.defines.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_LOGGER_DEFINES_HPP 6 | #define OPENCV_LOGGER_DEFINES_HPP 7 | 8 | //! @addtogroup core_logging 9 | //! @{ 10 | 11 | // Supported logging levels and their semantic 12 | #define CV_LOG_LEVEL_SILENT 0 //!< for using in setLogLevel() call 13 | #define CV_LOG_LEVEL_FATAL 1 //!< Fatal (critical) error (unrecoverable internal error) 14 | #define CV_LOG_LEVEL_ERROR 2 //!< Error message 15 | #define CV_LOG_LEVEL_WARN 3 //!< Warning message 16 | #define CV_LOG_LEVEL_INFO 4 //!< Info message 17 | #define CV_LOG_LEVEL_DEBUG 5 //!< Debug message. Disabled in the "Release" build. 18 | #define CV_LOG_LEVEL_VERBOSE 6 //!< Verbose (trace) messages. Requires verbosity level. Disabled in the "Release" build. 19 | 20 | namespace cv { 21 | namespace utils { 22 | namespace logging { 23 | 24 | //! Supported logging levels and their semantic 25 | enum LogLevel { 26 | LOG_LEVEL_SILENT = 0, //!< for using in setLogVevel() call 27 | LOG_LEVEL_FATAL = 1, //!< Fatal (critical) error (unrecoverable internal error) 28 | LOG_LEVEL_ERROR = 2, //!< Error message 29 | LOG_LEVEL_WARNING = 3, //!< Warning message 30 | LOG_LEVEL_INFO = 4, //!< Info message 31 | LOG_LEVEL_DEBUG = 5, //!< Debug message. Disabled in the "Release" build. 32 | LOG_LEVEL_VERBOSE = 6, //!< Verbose (trace) messages. Requires verbosity level. Disabled in the "Release" build. 33 | #ifndef CV_DOXYGEN 34 | ENUM_LOG_LEVEL_FORCE_INT = INT_MAX 35 | #endif 36 | }; 37 | 38 | }}} // namespace 39 | 40 | //! @} 41 | 42 | #endif // OPENCV_LOGGER_DEFINES_HPP 43 | -------------------------------------------------------------------------------- /assets/include/opencv2/core/utils/logtag.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_CORE_LOGTAG_HPP 6 | #define OPENCV_CORE_LOGTAG_HPP 7 | 8 | #include "opencv2/core/cvstd.hpp" 9 | #include "logger.defines.hpp" 10 | 11 | namespace cv { 12 | namespace utils { 13 | namespace logging { 14 | 15 | struct LogTag 16 | { 17 | const char* name; 18 | LogLevel level; 19 | 20 | inline LogTag(const char* _name, LogLevel _level) 21 | : name(_name) 22 | , level(_level) 23 | {} 24 | }; 25 | 26 | }}} 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /assets/include/opencv2/core/version.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_VERSION_HPP 6 | #define OPENCV_VERSION_HPP 7 | 8 | #define CV_VERSION_MAJOR 4 9 | #define CV_VERSION_MINOR 1 10 | #define CV_VERSION_REVISION 2 11 | #define CV_VERSION_STATUS "" 12 | 13 | #define CVAUX_STR_EXP(__A) #__A 14 | #define CVAUX_STR(__A) CVAUX_STR_EXP(__A) 15 | 16 | #define CVAUX_STRW_EXP(__A) L ## #__A 17 | #define CVAUX_STRW(__A) CVAUX_STRW_EXP(__A) 18 | 19 | #define CV_VERSION CVAUX_STR(CV_VERSION_MAJOR) "." CVAUX_STR(CV_VERSION_MINOR) "." CVAUX_STR(CV_VERSION_REVISION) CV_VERSION_STATUS 20 | 21 | /* old style version constants*/ 22 | #define CV_MAJOR_VERSION CV_VERSION_MAJOR 23 | #define CV_MINOR_VERSION CV_VERSION_MINOR 24 | #define CV_SUBMINOR_VERSION CV_VERSION_REVISION 25 | 26 | #endif // OPENCV_VERSION_HPP 27 | -------------------------------------------------------------------------------- /assets/include/opencv2/datasets/sr_bsds.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_DATASETS_SR_BSDS_HPP 6 | #define OPENCV_DATASETS_SR_BSDS_HPP 7 | 8 | #include 9 | #include 10 | 11 | #include "opencv2/datasets/dataset.hpp" 12 | 13 | #include 14 | 15 | namespace cv 16 | { 17 | namespace datasets 18 | { 19 | 20 | //! @addtogroup datasets_sr 21 | //! @{ 22 | 23 | struct SR_bsdsObj : public Object 24 | { 25 | std::string imageName; 26 | }; 27 | 28 | class CV_EXPORTS SR_bsds : public Dataset 29 | { 30 | public: 31 | virtual void load(const std::string &path) CV_OVERRIDE = 0; 32 | 33 | static Ptr create(); 34 | }; 35 | 36 | //! @} 37 | 38 | } 39 | } 40 | 41 | #endif -------------------------------------------------------------------------------- /assets/include/opencv2/datasets/sr_div2k.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_DATASETS_SR_DIV2K_HPP 6 | #define OPENCV_DATASETS_SR_DIV2K_HPP 7 | 8 | #include 9 | #include 10 | 11 | #include "opencv2/datasets/dataset.hpp" 12 | 13 | #include 14 | 15 | namespace cv 16 | { 17 | namespace datasets 18 | { 19 | 20 | //! @addtogroup datasets_sr 21 | //! @{ 22 | 23 | struct SR_div2kObj : public Object 24 | { 25 | std::string imageName; 26 | }; 27 | 28 | class CV_EXPORTS SR_div2k : public Dataset 29 | { 30 | public: 31 | virtual void load(const std::string &path) CV_OVERRIDE = 0; 32 | 33 | static Ptr create(); 34 | }; 35 | 36 | //! @} 37 | 38 | } 39 | } 40 | 41 | #endif -------------------------------------------------------------------------------- /assets/include/opencv2/datasets/sr_general100.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_DATASETS_SR_GENERAL100_HPP 6 | #define OPENCV_DATASETS_SR_GENERAL100_HPP 7 | 8 | #include 9 | #include 10 | 11 | #include "opencv2/datasets/dataset.hpp" 12 | 13 | #include 14 | 15 | namespace cv 16 | { 17 | namespace datasets 18 | { 19 | 20 | //! @addtogroup datasets_sr 21 | //! @{ 22 | 23 | struct SR_general100Obj : public Object 24 | { 25 | std::string imageName; 26 | }; 27 | 28 | class CV_EXPORTS SR_general100 : public Dataset 29 | { 30 | public: 31 | virtual void load(const std::string &path) CV_OVERRIDE = 0; 32 | 33 | static Ptr create(); 34 | }; 35 | 36 | //! @} 37 | 38 | } 39 | } 40 | 41 | #endif -------------------------------------------------------------------------------- /assets/include/opencv2/dnn/utils/inference_engine.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) 2018-2019, Intel Corporation, all rights reserved. 6 | // Third party copyrights are property of their respective owners. 7 | 8 | #ifndef OPENCV_DNN_UTILS_INF_ENGINE_HPP 9 | #define OPENCV_DNN_UTILS_INF_ENGINE_HPP 10 | 11 | #include "../dnn.hpp" 12 | 13 | namespace cv { namespace dnn { 14 | CV__DNN_INLINE_NS_BEGIN 15 | 16 | 17 | /** @brief Release a Myriad device (binded by OpenCV). 18 | * 19 | * Single Myriad device cannot be shared across multiple processes which uses 20 | * Inference Engine's Myriad plugin. 21 | */ 22 | CV_EXPORTS_W void resetMyriadDevice(); 23 | 24 | 25 | /* Values for 'OPENCV_DNN_IE_VPU_TYPE' parameter */ 26 | #define CV_DNN_INFERENCE_ENGINE_VPU_TYPE_UNSPECIFIED "" 27 | /// Intel(R) Movidius(TM) Neural Compute Stick, NCS (USB 03e7:2150), Myriad2 (https://software.intel.com/en-us/movidius-ncs) 28 | #define CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_2 "Myriad2" 29 | /// Intel(R) Neural Compute Stick 2, NCS2 (USB 03e7:2485), MyriadX (https://software.intel.com/ru-ru/neural-compute-stick) 30 | #define CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X "MyriadX" 31 | 32 | 33 | /** @brief Returns Inference Engine VPU type. 34 | * 35 | * See values of `CV_DNN_INFERENCE_ENGINE_VPU_TYPE_*` macros. 36 | */ 37 | CV_EXPORTS_W cv::String getInferenceEngineVPUType(); 38 | 39 | 40 | CV__DNN_INLINE_NS_END 41 | }} // namespace 42 | 43 | #endif // OPENCV_DNN_UTILS_INF_ENGINE_HPP 44 | -------------------------------------------------------------------------------- /assets/include/opencv2/dnn/version.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_DNN_VERSION_HPP 6 | #define OPENCV_DNN_VERSION_HPP 7 | 8 | /// Use with major OpenCV version only. 9 | #define OPENCV_DNN_API_VERSION 20190902 10 | 11 | #if !defined CV_DOXYGEN && !defined CV_STATIC_ANALYSIS && !defined CV_DNN_DONT_ADD_INLINE_NS 12 | #define CV__DNN_INLINE_NS __CV_CAT(dnn4_v, OPENCV_DNN_API_VERSION) 13 | #define CV__DNN_INLINE_NS_BEGIN namespace CV__DNN_INLINE_NS { 14 | #define CV__DNN_INLINE_NS_END } 15 | namespace cv { namespace dnn { namespace CV__DNN_INLINE_NS { } using namespace CV__DNN_INLINE_NS; }} 16 | #else 17 | #define CV__DNN_INLINE_NS_BEGIN 18 | #define CV__DNN_INLINE_NS_END 19 | #endif 20 | 21 | #endif // OPENCV_DNN_VERSION_HPP 22 | -------------------------------------------------------------------------------- /assets/include/opencv2/features2d/hal/interface.h: -------------------------------------------------------------------------------- 1 | #ifndef OPENCV_FEATURE2D_HAL_INTERFACE_H 2 | #define OPENCV_FEATURE2D_HAL_INTERFACE_H 3 | 4 | #include "opencv2/core/cvdef.h" 5 | //! @addtogroup features2d_hal_interface 6 | //! @{ 7 | 8 | //! @name Fast feature detector types 9 | //! @sa cv::FastFeatureDetector 10 | //! @{ 11 | #define CV_HAL_TYPE_5_8 0 12 | #define CV_HAL_TYPE_7_12 1 13 | #define CV_HAL_TYPE_9_16 2 14 | //! @} 15 | 16 | //! @name Key point 17 | //! @sa cv::KeyPoint 18 | //! @{ 19 | struct CV_EXPORTS cvhalKeyPoint 20 | { 21 | float x; 22 | float y; 23 | float size; 24 | float angle; 25 | float response; 26 | int octave; 27 | int class_id; 28 | }; 29 | //! @} 30 | 31 | //! @} 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /assets/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 | //! @cond IGNORED 34 | 35 | #ifdef FLANN_VERSION_ 36 | #undef FLANN_VERSION_ 37 | #endif 38 | #define FLANN_VERSION_ "1.6.10" 39 | 40 | //! @endcond 41 | 42 | #endif /* OPENCV_FLANN_CONFIG_H_ */ 43 | -------------------------------------------------------------------------------- /assets/include/opencv2/flann/dummy.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef OPENCV_FLANN_DUMMY_H_ 3 | #define OPENCV_FLANN_DUMMY_H_ 4 | 5 | //! @cond IGNORED 6 | 7 | namespace cvflann 8 | { 9 | 10 | CV_DEPRECATED inline void dummyfunc() {} 11 | 12 | } 13 | 14 | //! @endcond 15 | 16 | #endif /* OPENCV_FLANN_DUMMY_H_ */ 17 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_HPP 9 | #define OPENCV_GAPI_HPP 10 | 11 | #include 12 | 13 | /** \defgroup gapi G-API framework 14 | @{ 15 | @defgroup gapi_main_classes G-API Main Classes 16 | @defgroup gapi_data_objects G-API Data Objects 17 | @{ 18 | @defgroup gapi_meta_args G-API Metadata Descriptors 19 | @} 20 | @defgroup gapi_std_backends G-API Standard backends 21 | @defgroup gapi_compile_args G-API Graph Compilation Arguments 22 | @} 23 | */ 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #endif // OPENCV_GAPI_HPP 34 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/cpu/core.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_CPU_CORE_API_HPP 9 | #define OPENCV_GAPI_CPU_CORE_API_HPP 10 | 11 | #include // GKernelPackage 12 | #include // GAPI_EXPORTS 13 | 14 | namespace cv { 15 | namespace gapi { 16 | namespace core { 17 | namespace cpu { 18 | 19 | GAPI_EXPORTS GKernelPackage kernels(); 20 | 21 | } // namespace cpu 22 | } // namespace core 23 | } // namespace gapi 24 | } // namespace cv 25 | 26 | 27 | #endif // OPENCV_GAPI_CPU_CORE_API_HPP 28 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/cpu/imgproc.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_CPU_IMGPROC_API_HPP 9 | #define OPENCV_GAPI_CPU_IMGPROC_API_HPP 10 | 11 | #include // GAPI_EXPORTS 12 | #include // GKernelPackage 13 | 14 | namespace cv { 15 | namespace gapi { 16 | namespace imgproc { 17 | namespace cpu { 18 | 19 | GAPI_EXPORTS GKernelPackage kernels(); 20 | 21 | } // namespace cpu 22 | } // namespace imgproc 23 | } // namespace gapi 24 | } // namespace cv 25 | 26 | 27 | #endif // OPENCV_GAPI_CPU_IMGPROC_API_HPP 28 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/fluid/core.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_FLUID_CORE_HPP 9 | #define OPENCV_GAPI_FLUID_CORE_HPP 10 | 11 | #include // GKernelPackage 12 | #include // GAPI_EXPORTS 13 | 14 | namespace cv { namespace gapi { namespace core { namespace fluid { 15 | 16 | GAPI_EXPORTS GKernelPackage kernels(); 17 | 18 | }}}} 19 | 20 | #endif // OPENCV_GAPI_FLUID_CORE_HPP 21 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/fluid/imgproc.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_FLUID_IMGPROC_HPP 9 | #define OPENCV_GAPI_FLUID_IMGPROC_HPP 10 | 11 | #include // GKernelPackage 12 | #include // GAPI_EXPORTS 13 | 14 | namespace cv { namespace gapi { namespace imgproc { namespace fluid { 15 | 16 | GAPI_EXPORTS GKernelPackage kernels(); 17 | 18 | }}}} 19 | 20 | #endif // OPENCV_GAPI_FLUID_IMGPROC_HPP 21 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/gasync_context.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) 2019 Intel Corporation 6 | 7 | #ifndef OPENCV_GAPI_GASYNC_CONTEXT_HPP 8 | #define OPENCV_GAPI_GASYNC_CONTEXT_HPP 9 | 10 | #if !defined(GAPI_STANDALONE) 11 | # include 12 | #else // Without OpenCV 13 | # include 14 | #endif // !defined(GAPI_STANDALONE) 15 | 16 | #include 17 | 18 | namespace cv { 19 | namespace gapi{ 20 | namespace wip { 21 | 22 | class GAPI_EXPORTS GAsyncContext{ 23 | std::atomic cancelation_requested = {false}; 24 | public: 25 | //returns true if it was a first request to cancel the context 26 | bool cancel(); 27 | bool isCanceled() const; 28 | }; 29 | 30 | class GAPI_EXPORTS GAsyncCanceled : public std::exception { 31 | public: 32 | virtual const char* what() const noexcept CV_OVERRIDE; 33 | }; 34 | } // namespace wip 35 | } // namespace gapi 36 | } // namespace cv 37 | 38 | #endif //OPENCV_GAPI_GASYNC_CONTEXT_HPP 39 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/gcall.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_GCALL_HPP 9 | #define OPENCV_GAPI_GCALL_HPP 10 | 11 | #include // GArg 12 | #include // GMat 13 | #include // GScalar 14 | #include // GArray 15 | 16 | namespace cv { 17 | 18 | struct GKernel; 19 | 20 | // The whole idea of this class is to represent an operation 21 | // which is applied to arguments. This is part of public API, 22 | // since it is what users should use to define kernel interfaces. 23 | 24 | class GAPI_EXPORTS GCall final 25 | { 26 | public: 27 | class Priv; 28 | 29 | explicit GCall(const GKernel &k); 30 | ~GCall(); 31 | 32 | template 33 | GCall& pass(Ts&&... args) 34 | { 35 | setArgs({cv::GArg(std::move(args))...}); 36 | return *this; 37 | } 38 | 39 | // A generic yield method - obtain a link to operator's particular GMat output 40 | GMat yield (int output = 0); 41 | GMatP yieldP (int output = 0); 42 | GScalar yieldScalar(int output = 0); 43 | 44 | template GArray yieldArray(int output = 0) 45 | { 46 | return GArray(yieldArray(output)); 47 | } 48 | 49 | // Internal use only 50 | Priv& priv(); 51 | const Priv& priv() const; 52 | 53 | protected: 54 | std::shared_ptr m_priv; 55 | 56 | void setArgs(std::vector &&args); 57 | 58 | // Public version returns a typed array, this one is implementation detail 59 | detail::GArrayU yieldArray(int output = 0); 60 | }; 61 | 62 | } // namespace cv 63 | 64 | #endif // OPENCV_GAPI_GCALL_HPP 65 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/gpu/core.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_GPU_CORE_API_HPP 9 | #define OPENCV_GAPI_GPU_CORE_API_HPP 10 | /** @file 11 | * @deprecated Use instead. 12 | */ 13 | 14 | #include 15 | 16 | namespace cv { 17 | namespace gapi { 18 | namespace core { 19 | namespace gpu { 20 | using namespace ocl; 21 | } // namespace gpu 22 | } // namespace core 23 | } // namespace gapi 24 | } // namespace cv 25 | 26 | 27 | #endif // OPENCV_GAPI_GPU_CORE_API_HPP 28 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/gpu/ggpukernel.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_GGPUKERNEL_HPP 9 | #define OPENCV_GAPI_GGPUKERNEL_HPP 10 | /** @file 11 | * @deprecated Use instead. 12 | */ 13 | 14 | #include 15 | #define GAPI_GPU_KERNEL GAPI_OCL_KERNEL 16 | 17 | 18 | #endif // OPENCV_GAPI_GGPUKERNEL_HPP 19 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/gpu/imgproc.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_GPU_IMGPROC_API_HPP 9 | #define OPENCV_GAPI_GPU_IMGPROC_API_HPP 10 | /** @file 11 | * @deprecated Use instead. 12 | */ 13 | 14 | #include 15 | 16 | 17 | namespace cv { 18 | namespace gapi { 19 | namespace imgproc { 20 | namespace gpu { 21 | using namespace ocl; 22 | } // namespace gpu 23 | } // namespace imgproc 24 | } // namespace gapi 25 | } // namespace cv 26 | 27 | 28 | #endif // OPENCV_GAPI_GPU_IMGPROC_API_HPP 29 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/ocl/core.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_OCL_CORE_API_HPP 9 | #define OPENCV_GAPI_OCL_CORE_API_HPP 10 | 11 | #include // GAPI_EXPORTS 12 | #include // GKernelPackage 13 | 14 | namespace cv { 15 | namespace gapi { 16 | namespace core { 17 | namespace ocl { 18 | 19 | GAPI_EXPORTS GKernelPackage kernels(); 20 | 21 | } // namespace ocl 22 | } // namespace core 23 | } // namespace gapi 24 | } // namespace cv 25 | 26 | 27 | #endif // OPENCV_GAPI_OCL_CORE_API_HPP 28 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/ocl/imgproc.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_OCL_IMGPROC_API_HPP 9 | #define OPENCV_GAPI_OCL_IMGPROC_API_HPP 10 | 11 | #include // GAPI_EXPORTS 12 | #include // GKernelPackage 13 | 14 | namespace cv { 15 | namespace gapi { 16 | namespace imgproc { 17 | namespace ocl { 18 | 19 | GAPI_EXPORTS GKernelPackage kernels(); 20 | 21 | } // namespace ocl 22 | } // namespace imgproc 23 | } // namespace gapi 24 | } // namespace cv 25 | 26 | 27 | #endif // OPENCV_GAPI_OCL_IMGPROC_API_HPP 28 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/opencv_includes.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | 3 | // It is subject to the license terms in the LICENSE file found in the top-level directory 4 | // of this distribution and at http://opencv.org/license.html. 5 | // 6 | // Copyright (C) 2018 Intel Corporation 7 | 8 | 9 | #ifndef OPENCV_GAPI_OPENCV_INCLUDES_HPP 10 | #define OPENCV_GAPI_OPENCV_INCLUDES_HPP 11 | 12 | #if !defined(GAPI_STANDALONE) 13 | # include 14 | # include 15 | # include 16 | # include 17 | #else // Without OpenCV 18 | # include 19 | #endif // !defined(GAPI_STANDALONE) 20 | 21 | #endif // OPENCV_GAPI_OPENCV_INCLUDES_HPP 22 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/own/assert.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_OWN_ASSERT_HPP 9 | #define OPENCV_GAPI_OWN_ASSERT_HPP 10 | 11 | #if !defined(GAPI_STANDALONE) 12 | #include 13 | #define GAPI_Assert CV_Assert 14 | #define GAPI_DbgAssert CV_DbgAssert 15 | 16 | #else 17 | #include 18 | #include 19 | #include 20 | 21 | namespace detail 22 | { 23 | inline void assert_abort(const char* str, int line, const char* file, const char* func) 24 | { 25 | std::stringstream ss; 26 | ss << file << ":" << line << ": Assertion " << str << " in function " << func << " failed\n"; 27 | cv::util::throw_error(std::logic_error(ss.str())); 28 | } 29 | } 30 | 31 | #define GAPI_Assert(expr) \ 32 | { if (!(expr)) ::detail::assert_abort(#expr, __LINE__, __FILE__, __func__); } 33 | 34 | 35 | #ifdef NDEBUG 36 | # define GAPI_DbgAssert(expr) 37 | #else 38 | # define GAPI_DbgAssert(expr) GAPI_Assert(expr) 39 | #endif 40 | 41 | #endif // GAPI_STANDALONE 42 | 43 | #endif // OPENCV_GAPI_OWN_ASSERT_HPP 44 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/own/exports.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_OWN_TYPES_HPP 9 | #define OPENCV_GAPI_OWN_TYPES_HPP 10 | 11 | # if defined(__OPENCV_BUILD) 12 | # include 13 | # define GAPI_EXPORTS CV_EXPORTS 14 | # else 15 | # define GAPI_EXPORTS 16 | 17 | #if 0 // Note: the following version currently is not needed for non-OpenCV build 18 | # if defined _WIN32 19 | # define GAPI_EXPORTS __declspec(dllexport) 20 | # elif defined __GNUC__ && __GNUC__ >= 4 21 | # define GAPI_EXPORTS __attribute__ ((visibility ("default"))) 22 | # endif 23 | 24 | # ifndef GAPI_EXPORTS 25 | # define GAPI_EXPORTS 26 | # endif 27 | #endif 28 | 29 | # endif 30 | 31 | #endif // OPENCV_GAPI_OWN_TYPES_HPP 32 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/own/scalar.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_GAPI_OWN_SCALAR_HPP 9 | #define OPENCV_GAPI_GAPI_OWN_SCALAR_HPP 10 | 11 | #include 12 | 13 | namespace cv 14 | { 15 | namespace gapi 16 | { 17 | namespace own 18 | { 19 | 20 | class GAPI_EXPORTS Scalar 21 | { 22 | public: 23 | Scalar() = default; 24 | explicit Scalar(double v0) { val[0] = v0; }; 25 | Scalar(double v0, double v1, double v2 = 0, double v3 = 0) 26 | : val{v0, v1, v2, v3} 27 | { 28 | } 29 | 30 | const double& operator[](int i) const { return val[i]; } 31 | double& operator[](int i) { return val[i]; } 32 | 33 | static Scalar all(double v0) { return Scalar(v0, v0, v0, v0); } 34 | 35 | double val[4] = {0}; 36 | }; 37 | 38 | inline bool operator==(const Scalar& lhs, const Scalar& rhs) 39 | { 40 | return std::equal(std::begin(lhs.val), std::end(lhs.val), std::begin(rhs.val)); 41 | } 42 | 43 | } // namespace own 44 | } // namespace gapi 45 | } // namespace cv 46 | 47 | #endif // OPENCV_GAPI_GAPI_OWN_SCALAR_HPP 48 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/util/compiler_hints.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) 2018 Intel Corporation 6 | 7 | #ifndef OPENCV_GAPI_UTIL_COMPILER_HINTS_HPP 8 | #define OPENCV_GAPI_UTIL_COMPILER_HINTS_HPP 9 | 10 | namespace cv 11 | { 12 | namespace util 13 | { 14 | //! Utility template function to prevent "unused" warnings by various compilers. 15 | template void suppress_unused_warning( const T& ) {} 16 | } // namespace util 17 | } // namespace cv 18 | 19 | #endif /* OPENCV_GAPI_UTIL_COMPILER_HINTS_HPP */ 20 | -------------------------------------------------------------------------------- /assets/include/opencv2/gapi/util/throw.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) 2018 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_UTIL_THROW_HPP 9 | #define OPENCV_GAPI_UTIL_THROW_HPP 10 | 11 | #include // std::forward 12 | 13 | #if !defined(__EXCEPTIONS) 14 | #include 15 | #include 16 | #endif 17 | 18 | namespace cv 19 | { 20 | namespace util 21 | { 22 | template 23 | [[noreturn]] void throw_error(ExceptionType &&e) 24 | { 25 | #if defined(__EXCEPTIONS) || defined(_CPPUNWIND) 26 | throw std::forward(e); 27 | #else 28 | fprintf(stderr, "An exception thrown! %s\n" , e.what()); 29 | fflush(stderr); 30 | abort(); 31 | #endif 32 | } 33 | } // namespace util 34 | } // namespace cv 35 | 36 | #endif // OPENCV_GAPI_UTIL_THROW_HPP 37 | -------------------------------------------------------------------------------- /assets/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 | -------------------------------------------------------------------------------- /assets/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 the 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 the 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 | -------------------------------------------------------------------------------- /assets/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 | -------------------------------------------------------------------------------- /assets/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 | -------------------------------------------------------------------------------- /assets/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 | -------------------------------------------------------------------------------- /assets/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 | -------------------------------------------------------------------------------- /assets/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 | -------------------------------------------------------------------------------- /assets/include/opencv2/imgcodecs/imgcodecs_c.h: -------------------------------------------------------------------------------- 1 | #error "This header with legacy C API declarations has been removed from OpenCV. Legacy constants are available from legacy/constants_c.h file." 2 | -------------------------------------------------------------------------------- /assets/include/opencv2/imgcodecs/legacy/constants_c.h: -------------------------------------------------------------------------------- 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_IMGCODECS_LEGACY_CONSTANTS_H 6 | #define OPENCV_IMGCODECS_LEGACY_CONSTANTS_H 7 | 8 | /* duplicate of "ImreadModes" enumeration for better compatibility with OpenCV 3.x */ 9 | enum 10 | { 11 | /* 8bit, color or not */ 12 | CV_LOAD_IMAGE_UNCHANGED =-1, 13 | /* 8bit, gray */ 14 | CV_LOAD_IMAGE_GRAYSCALE =0, 15 | /* ?, color */ 16 | CV_LOAD_IMAGE_COLOR =1, 17 | /* any depth, ? */ 18 | CV_LOAD_IMAGE_ANYDEPTH =2, 19 | /* ?, any color */ 20 | CV_LOAD_IMAGE_ANYCOLOR =4, 21 | /* ?, no rotate */ 22 | CV_LOAD_IMAGE_IGNORE_ORIENTATION =128 23 | }; 24 | 25 | /* duplicate of "ImwriteFlags" enumeration for better compatibility with OpenCV 3.x */ 26 | enum 27 | { 28 | CV_IMWRITE_JPEG_QUALITY =1, 29 | CV_IMWRITE_JPEG_PROGRESSIVE =2, 30 | CV_IMWRITE_JPEG_OPTIMIZE =3, 31 | CV_IMWRITE_JPEG_RST_INTERVAL =4, 32 | CV_IMWRITE_JPEG_LUMA_QUALITY =5, 33 | CV_IMWRITE_JPEG_CHROMA_QUALITY =6, 34 | CV_IMWRITE_PNG_COMPRESSION =16, 35 | CV_IMWRITE_PNG_STRATEGY =17, 36 | CV_IMWRITE_PNG_BILEVEL =18, 37 | CV_IMWRITE_PNG_STRATEGY_DEFAULT =0, 38 | CV_IMWRITE_PNG_STRATEGY_FILTERED =1, 39 | CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY =2, 40 | CV_IMWRITE_PNG_STRATEGY_RLE =3, 41 | CV_IMWRITE_PNG_STRATEGY_FIXED =4, 42 | CV_IMWRITE_PXM_BINARY =32, 43 | CV_IMWRITE_EXR_TYPE = 48, 44 | CV_IMWRITE_WEBP_QUALITY =64, 45 | CV_IMWRITE_PAM_TUPLETYPE = 128, 46 | CV_IMWRITE_PAM_FORMAT_NULL = 0, 47 | CV_IMWRITE_PAM_FORMAT_BLACKANDWHITE = 1, 48 | CV_IMWRITE_PAM_FORMAT_GRAYSCALE = 2, 49 | CV_IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA = 3, 50 | CV_IMWRITE_PAM_FORMAT_RGB = 4, 51 | CV_IMWRITE_PAM_FORMAT_RGB_ALPHA = 5, 52 | }; 53 | 54 | #endif // OPENCV_IMGCODECS_LEGACY_CONSTANTS_H 55 | -------------------------------------------------------------------------------- /assets/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 | //! @name Threshold types 25 | //! @sa cv::ThresholdTypes 26 | //! @{ 27 | #define CV_HAL_THRESH_BINARY 0 28 | #define CV_HAL_THRESH_BINARY_INV 1 29 | #define CV_HAL_THRESH_TRUNC 2 30 | #define CV_HAL_THRESH_TOZERO 3 31 | #define CV_HAL_THRESH_TOZERO_INV 4 32 | #define CV_HAL_THRESH_MASK 7 33 | #define CV_HAL_THRESH_OTSU 8 34 | #define CV_HAL_THRESH_TRIANGLE 16 35 | //! @} 36 | 37 | //! @name Adaptive threshold algorithm 38 | //! @sa cv::AdaptiveThresholdTypes 39 | //! @{ 40 | #define CV_HAL_ADAPTIVE_THRESH_MEAN_C 0 41 | #define CV_HAL_ADAPTIVE_THRESH_GAUSSIAN_C 1 42 | //! @} 43 | 44 | //! @} 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /assets/include/opencv2/ml/ml.inl.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_ML_INL_HPP 6 | #define OPENCV_ML_INL_HPP 7 | 8 | namespace cv { namespace ml { 9 | 10 | // declared in ml.hpp 11 | template 12 | int simulatedAnnealingSolver(SimulatedAnnealingSolverSystem& solverSystem, 13 | double initialTemperature, double finalTemperature, double coolingRatio, 14 | size_t iterationsPerStep, 15 | CV_OUT double* lastTemperature, 16 | cv::RNG& rngEnergy 17 | ) 18 | { 19 | CV_Assert(finalTemperature > 0); 20 | CV_Assert(initialTemperature > finalTemperature); 21 | CV_Assert(iterationsPerStep > 0); 22 | CV_Assert(coolingRatio < 1.0f); 23 | double Ti = initialTemperature; 24 | double previousEnergy = solverSystem.energy(); 25 | int exchange = 0; 26 | while (Ti > finalTemperature) 27 | { 28 | for (size_t i = 0; i < iterationsPerStep; i++) 29 | { 30 | solverSystem.changeState(); 31 | double newEnergy = solverSystem.energy(); 32 | if (newEnergy < previousEnergy) 33 | { 34 | previousEnergy = newEnergy; 35 | exchange++; 36 | } 37 | else 38 | { 39 | double r = rngEnergy.uniform(0.0, 1.0); 40 | if (r < std::exp(-(newEnergy - previousEnergy) / Ti)) 41 | { 42 | previousEnergy = newEnergy; 43 | exchange++; 44 | } 45 | else 46 | { 47 | solverSystem.reverseState(); 48 | } 49 | } 50 | } 51 | Ti *= coolingRatio; 52 | } 53 | if (lastTemperature) 54 | *lastTemperature = Ti; 55 | return exchange; 56 | } 57 | 58 | }} //namespace 59 | 60 | #endif // OPENCV_ML_INL_HPP 61 | -------------------------------------------------------------------------------- /assets/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_DNN_OBJDETECT 22 | #define HAVE_OPENCV_DNN_SUPERRES 23 | #define HAVE_OPENCV_DPM 24 | #define HAVE_OPENCV_FACE 25 | #define HAVE_OPENCV_FEATURES2D 26 | #define HAVE_OPENCV_FLANN 27 | #define HAVE_OPENCV_FUZZY 28 | #define HAVE_OPENCV_GAPI 29 | #define HAVE_OPENCV_HFS 30 | #define HAVE_OPENCV_HIGHGUI 31 | #define HAVE_OPENCV_IMG_HASH 32 | #define HAVE_OPENCV_IMGCODECS 33 | #define HAVE_OPENCV_IMGPROC 34 | #define HAVE_OPENCV_LINE_DESCRIPTOR 35 | #define HAVE_OPENCV_ML 36 | #define HAVE_OPENCV_OBJDETECT 37 | #define HAVE_OPENCV_OPTFLOW 38 | #define HAVE_OPENCV_PHASE_UNWRAPPING 39 | #define HAVE_OPENCV_PHOTO 40 | #define HAVE_OPENCV_PLOT 41 | #define HAVE_OPENCV_QUALITY 42 | #define HAVE_OPENCV_REG 43 | #define HAVE_OPENCV_RGBD 44 | #define HAVE_OPENCV_SALIENCY 45 | #define HAVE_OPENCV_SHAPE 46 | #define HAVE_OPENCV_STEREO 47 | #define HAVE_OPENCV_STITCHING 48 | #define HAVE_OPENCV_STRUCTURED_LIGHT 49 | #define HAVE_OPENCV_SUPERRES 50 | #define HAVE_OPENCV_SURFACE_MATCHING 51 | #define HAVE_OPENCV_TEXT 52 | #define HAVE_OPENCV_TRACKING 53 | #define HAVE_OPENCV_VIDEO 54 | #define HAVE_OPENCV_VIDEOIO 55 | #define HAVE_OPENCV_VIDEOSTAB 56 | #define HAVE_OPENCV_XFEATURES2D 57 | #define HAVE_OPENCV_XIMGPROC 58 | #define HAVE_OPENCV_XOBJDETECT 59 | #define HAVE_OPENCV_XPHOTO 60 | 61 | 62 | -------------------------------------------------------------------------------- /assets/include/opencv2/photo/legacy/constants_c.h: -------------------------------------------------------------------------------- 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_PHOTO_LEGACY_CONSTANTS_H 6 | #define OPENCV_PHOTO_LEGACY_CONSTANTS_H 7 | 8 | enum InpaintingModes 9 | { 10 | CV_INPAINT_NS =0, 11 | CV_INPAINT_TELEA =1 12 | }; 13 | 14 | #endif // OPENCV_PHOTO_LEGACY_CONSTANTS_H 15 | -------------------------------------------------------------------------------- /assets/include/opencv2/quality.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_QUALITY_HPP 6 | #define OPENCV_QUALITY_HPP 7 | 8 | #include "quality/qualitybase.hpp" 9 | #include "quality/qualitymse.hpp" 10 | #include "quality/qualitypsnr.hpp" 11 | #include "quality/qualityssim.hpp" 12 | #include "quality/qualitygmsd.hpp" 13 | #include "quality/qualitybrisque.hpp" 14 | 15 | #endif -------------------------------------------------------------------------------- /assets/include/opencv2/quality/qualitybase.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_QUALITYBASE_HPP 6 | #define OPENCV_QUALITYBASE_HPP 7 | 8 | #include 9 | 10 | /** 11 | @defgroup quality Image Quality Analysis (IQA) API 12 | */ 13 | 14 | namespace cv 15 | { 16 | namespace quality 17 | { 18 | 19 | //! @addtogroup quality 20 | //! @{ 21 | 22 | /************************************ Quality Base Class ************************************/ 23 | class CV_EXPORTS_W QualityBase 24 | : public virtual Algorithm 25 | { 26 | public: 27 | 28 | /** @brief Destructor */ 29 | virtual ~QualityBase() = default; 30 | 31 | /** 32 | @brief Compute quality score per channel with the per-channel score in each element of the resulting cv::Scalar. See specific algorithm for interpreting result scores 33 | @param img comparison image, or image to evalute for no-reference quality algorithms 34 | */ 35 | virtual CV_WRAP cv::Scalar compute( InputArray img ) = 0; 36 | 37 | /** @brief Returns output quality map that was generated during computation, if supported by the algorithm */ 38 | virtual CV_WRAP void getQualityMap(OutputArray dst) const 39 | { 40 | if (!dst.needed() || _qualityMap.empty() ) 41 | return; 42 | dst.assign(_qualityMap); 43 | } 44 | 45 | /** @brief Implements Algorithm::clear() */ 46 | CV_WRAP void clear() CV_OVERRIDE { _qualityMap = _mat_type(); Algorithm::clear(); } 47 | 48 | /** @brief Implements Algorithm::empty() */ 49 | CV_WRAP bool empty() const CV_OVERRIDE { return _qualityMap.empty(); } 50 | 51 | protected: 52 | 53 | /** @brief internal mat type default */ 54 | using _mat_type = cv::UMat; 55 | 56 | /** @brief Output quality maps if generated by algorithm */ 57 | _mat_type _qualityMap; 58 | 59 | }; // QualityBase 60 | //! @} 61 | } // quality 62 | } // cv 63 | #endif -------------------------------------------------------------------------------- /assets/include/opencv2/rgbd.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 | // This code is also subject to the license terms in the LICENSE_KinectFusion.md file found in this module's directory 6 | 7 | // This code is also subject to the license terms in the LICENSE_WillowGarage.md file found in this module's directory 8 | 9 | #ifndef __OPENCV_RGBD_HPP__ 10 | #define __OPENCV_RGBD_HPP__ 11 | 12 | #include "opencv2/rgbd/linemod.hpp" 13 | #include "opencv2/rgbd/depth.hpp" 14 | #include "opencv2/rgbd/kinfu.hpp" 15 | 16 | 17 | /** @defgroup rgbd RGB-Depth Processing 18 | */ 19 | 20 | #endif 21 | 22 | /* End of file. */ 23 | 24 | -------------------------------------------------------------------------------- /assets/include/opencv2/video/legacy/constants_c.h: -------------------------------------------------------------------------------- 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_VIDEO_LEGACY_CONSTANTS_H 6 | #define OPENCV_VIDEO_LEGACY_CONSTANTS_H 7 | 8 | enum 9 | { 10 | CV_LKFLOW_PYR_A_READY = 1, 11 | CV_LKFLOW_PYR_B_READY = 2, 12 | CV_LKFLOW_INITIAL_GUESSES = 4, 13 | CV_LKFLOW_GET_MIN_EIGENVALS = 8 14 | }; 15 | 16 | #endif // OPENCV_VIDEO_LEGACY_CONSTANTS_H 17 | -------------------------------------------------------------------------------- /assets/include/opencv2/videoio/registry.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_VIDEOIO_REGISTRY_HPP 6 | #define OPENCV_VIDEOIO_REGISTRY_HPP 7 | 8 | #include 9 | 10 | namespace cv { namespace videoio_registry { 11 | /** @addtogroup videoio_registry 12 | This section contains API description how to query/configure available Video I/O backends. 13 | 14 | Runtime configuration options: 15 | - enable debug mode: `OPENCV_VIDEOIO_DEBUG=1` 16 | - change backend priority: `OPENCV_VIDEOIO_PRIORITY_=9999` 17 | - disable backend: `OPENCV_VIDEOIO_PRIORITY_=0` 18 | - specify list of backends with high priority (>100000): `OPENCV_VIDEOIO_PRIORITY_LIST=FFMPEG,GSTREAMER` 19 | 20 | @{ 21 | */ 22 | 23 | 24 | /** @brief Returns backend API name or "UnknownVideoAPI(xxx)" 25 | @param api backend ID (#VideoCaptureAPIs) 26 | */ 27 | CV_EXPORTS_W cv::String getBackendName(VideoCaptureAPIs api); 28 | 29 | /** @brief Returns list of all available backends */ 30 | CV_EXPORTS_W std::vector getBackends(); 31 | 32 | /** @brief Returns list of available backends which works via `cv::VideoCapture(int index)` */ 33 | CV_EXPORTS_W std::vector getCameraBackends(); 34 | 35 | /** @brief Returns list of available backends which works via `cv::VideoCapture(filename)` */ 36 | CV_EXPORTS_W std::vector getStreamBackends(); 37 | 38 | /** @brief Returns list of available backends which works via `cv::VideoWriter()` */ 39 | CV_EXPORTS_W std::vector getWriterBackends(); 40 | 41 | /** @brief Returns true if backend is available */ 42 | CV_EXPORTS bool hasBackend(VideoCaptureAPIs api); 43 | 44 | //! @} 45 | }} // namespace 46 | 47 | #endif // OPENCV_VIDEOIO_REGISTRY_HPP 48 | -------------------------------------------------------------------------------- /assets/include/opencv2/ximgproc/edgepreserving_filter.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_EDGEPRESERVINGFILTER_HPP__ 6 | #define __OPENCV_EDGEPRESERVINGFILTER_HPP__ 7 | 8 | #include 9 | 10 | namespace cv { namespace ximgproc { 11 | 12 | //! @addtogroup ximgproc 13 | //! @{ 14 | 15 | /** 16 | * @brief Smoothes an image using the Edge-Preserving filter. 17 | * 18 | * The function smoothes Gaussian noise as well as salt & pepper noise. 19 | * For more details about this implementation, please see 20 | * [ReiWoe18] Reich, S. and Wörgötter, F. and Dellen, B. (2018). A Real-Time Edge-Preserving Denoising Filter. Proceedings of the 13th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications (VISIGRAPP): Visapp, 85-94, 4. DOI: 10.5220/0006509000850094. 21 | * 22 | * @param src Source 8-bit 3-channel image. 23 | * @param dst Destination image of the same size and type as src. 24 | * @param d Diameter of each pixel neighborhood that is used during filtering. Must be greater or equal 3. 25 | * @param threshold Threshold, which distinguishes between noise, outliers, and data. 26 | */ 27 | CV_EXPORTS_W void edgePreservingFilter( InputArray src, OutputArray dst, int d, double threshold ); 28 | 29 | }} // namespace 30 | 31 | //! @} 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /assets/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 { namespace ximgproc { 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 | }} // namespace 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /assets/include/opencv2/xphoto/oilpainting.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 | 6 | #ifndef __OPENCV_OIL_PAINTING_HPP__ 7 | #define __OPENCV_OIL_PAINTING_HPP__ 8 | 9 | #include 10 | #include 11 | 12 | namespace cv 13 | { 14 | namespace xphoto 15 | { 16 | 17 | //! @addtogroup xphoto 18 | //! @{ 19 | 20 | /** @brief oilPainting 21 | See the book @cite Holzmann1988 for details. 22 | @param src Input three-channel or one channel image (either CV_8UC3 or CV_8UC1) 23 | @param dst Output image of the same size and type as src. 24 | @param size neighbouring size is 2-size+1 25 | @param dynRatio image is divided by dynRatio before histogram processing 26 | @param code color space conversion code(see ColorConversionCodes). Histogram will used only first plane 27 | */ 28 | CV_EXPORTS_W void oilPainting(InputArray src, OutputArray dst, int size, int dynRatio, int code); 29 | /** @brief oilPainting 30 | See the book @cite Holzmann1988 for details. 31 | @param src Input three-channel or one channel image (either CV_8UC3 or CV_8UC1) 32 | @param dst Output image of the same size and type as src. 33 | @param size neighbouring size is 2-size+1 34 | @param dynRatio image is divided by dynRatio before histogram processing 35 | */ 36 | CV_EXPORTS_W void oilPainting(InputArray src, OutputArray dst, int size, int dynRatio); 37 | //! @} 38 | } 39 | } 40 | 41 | #endif // __OPENCV_OIL_PAINTING_HPP__ 42 | -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_aruco.so: -------------------------------------------------------------------------------- 1 | libopencv_aruco.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_aruco.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_aruco.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_aruco.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_aruco.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_bgsegm.so: -------------------------------------------------------------------------------- 1 | libopencv_bgsegm.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_bgsegm.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_bgsegm.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_bgsegm.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_bgsegm.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_bioinspired.so: -------------------------------------------------------------------------------- 1 | libopencv_bioinspired.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_bioinspired.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_bioinspired.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_bioinspired.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_bioinspired.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_calib3d.so: -------------------------------------------------------------------------------- 1 | libopencv_calib3d.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_calib3d.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_calib3d.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_calib3d.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_calib3d.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_ccalib.so: -------------------------------------------------------------------------------- 1 | libopencv_ccalib.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_ccalib.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_ccalib.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_ccalib.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_ccalib.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_core.so: -------------------------------------------------------------------------------- 1 | libopencv_core.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_core.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_core.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_core.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_core.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_datasets.so: -------------------------------------------------------------------------------- 1 | libopencv_datasets.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_datasets.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_datasets.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_datasets.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_datasets.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_dnn.so: -------------------------------------------------------------------------------- 1 | libopencv_dnn.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_dnn.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_dnn.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_dnn.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_dnn.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_dnn_objdetect.so: -------------------------------------------------------------------------------- 1 | libopencv_dnn_objdetect.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_dnn_objdetect.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_dnn_objdetect.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_dnn_objdetect.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_dnn_objdetect.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_dnn_superres.so: -------------------------------------------------------------------------------- 1 | libopencv_dnn_superres.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_dnn_superres.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_dnn_superres.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_dnn_superres.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_dnn_superres.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_dpm.so: -------------------------------------------------------------------------------- 1 | libopencv_dpm.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_dpm.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_dpm.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_dpm.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_dpm.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_face.so: -------------------------------------------------------------------------------- 1 | libopencv_face.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_face.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_face.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_face.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_face.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_features2d.so: -------------------------------------------------------------------------------- 1 | libopencv_features2d.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_features2d.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_features2d.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_features2d.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_features2d.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_flann.so: -------------------------------------------------------------------------------- 1 | libopencv_flann.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_flann.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_flann.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_flann.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_flann.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_fuzzy.so: -------------------------------------------------------------------------------- 1 | libopencv_fuzzy.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_fuzzy.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_fuzzy.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_fuzzy.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_fuzzy.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_gapi.so: -------------------------------------------------------------------------------- 1 | libopencv_gapi.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_gapi.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_gapi.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_gapi.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_gapi.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_hfs.so: -------------------------------------------------------------------------------- 1 | libopencv_hfs.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_hfs.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_hfs.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_hfs.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_hfs.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_highgui.so: -------------------------------------------------------------------------------- 1 | libopencv_highgui.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_highgui.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_highgui.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_highgui.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_highgui.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_img_hash.so: -------------------------------------------------------------------------------- 1 | libopencv_img_hash.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_img_hash.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_img_hash.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_img_hash.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_img_hash.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_imgcodecs.so: -------------------------------------------------------------------------------- 1 | libopencv_imgcodecs.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_imgcodecs.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_imgcodecs.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_imgcodecs.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_imgcodecs.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_imgproc.so: -------------------------------------------------------------------------------- 1 | libopencv_imgproc.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_imgproc.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_imgproc.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_imgproc.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_imgproc.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_line_descriptor.so: -------------------------------------------------------------------------------- 1 | libopencv_line_descriptor.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_line_descriptor.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_line_descriptor.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_line_descriptor.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_line_descriptor.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_ml.so: -------------------------------------------------------------------------------- 1 | libopencv_ml.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_ml.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_ml.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_ml.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_ml.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_objdetect.so: -------------------------------------------------------------------------------- 1 | libopencv_objdetect.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_objdetect.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_objdetect.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_objdetect.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_objdetect.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_optflow.so: -------------------------------------------------------------------------------- 1 | libopencv_optflow.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_optflow.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_optflow.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_optflow.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_optflow.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_phase_unwrapping.so: -------------------------------------------------------------------------------- 1 | libopencv_phase_unwrapping.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_phase_unwrapping.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_phase_unwrapping.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_phase_unwrapping.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_phase_unwrapping.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_photo.so: -------------------------------------------------------------------------------- 1 | libopencv_photo.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_photo.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_photo.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_photo.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_photo.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_plot.so: -------------------------------------------------------------------------------- 1 | libopencv_plot.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_plot.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_plot.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_plot.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_plot.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_quality.so: -------------------------------------------------------------------------------- 1 | libopencv_quality.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_quality.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_quality.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_quality.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_quality.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_reg.so: -------------------------------------------------------------------------------- 1 | libopencv_reg.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_reg.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_reg.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_reg.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_reg.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_rgbd.so: -------------------------------------------------------------------------------- 1 | libopencv_rgbd.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_rgbd.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_rgbd.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_rgbd.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_rgbd.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_saliency.so: -------------------------------------------------------------------------------- 1 | libopencv_saliency.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_saliency.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_saliency.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_saliency.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_saliency.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_shape.so: -------------------------------------------------------------------------------- 1 | libopencv_shape.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_shape.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_shape.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_shape.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_shape.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_stereo.so: -------------------------------------------------------------------------------- 1 | libopencv_stereo.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_stereo.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_stereo.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_stereo.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_stereo.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_stitching.so: -------------------------------------------------------------------------------- 1 | libopencv_stitching.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_stitching.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_stitching.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_stitching.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_stitching.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_structured_light.so: -------------------------------------------------------------------------------- 1 | libopencv_structured_light.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_structured_light.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_structured_light.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_structured_light.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_structured_light.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_superres.so: -------------------------------------------------------------------------------- 1 | libopencv_superres.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_superres.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_superres.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_superres.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_superres.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_surface_matching.so: -------------------------------------------------------------------------------- 1 | libopencv_surface_matching.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_surface_matching.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_surface_matching.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_surface_matching.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_surface_matching.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_text.so: -------------------------------------------------------------------------------- 1 | libopencv_text.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_text.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_text.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_text.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_text.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_tracking.so: -------------------------------------------------------------------------------- 1 | libopencv_tracking.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_tracking.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_tracking.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_tracking.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_tracking.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_video.so: -------------------------------------------------------------------------------- 1 | libopencv_video.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_video.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_video.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_video.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_video.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_videoio.so: -------------------------------------------------------------------------------- 1 | libopencv_videoio.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_videoio.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_videoio.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_videoio.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_videoio.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_videostab.so: -------------------------------------------------------------------------------- 1 | libopencv_videostab.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_videostab.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_videostab.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_videostab.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_videostab.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_xfeatures2d.so: -------------------------------------------------------------------------------- 1 | libopencv_xfeatures2d.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_xfeatures2d.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_xfeatures2d.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_xfeatures2d.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_xfeatures2d.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_ximgproc.so: -------------------------------------------------------------------------------- 1 | libopencv_ximgproc.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_ximgproc.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_ximgproc.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_ximgproc.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_ximgproc.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_xobjdetect.so: -------------------------------------------------------------------------------- 1 | libopencv_xobjdetect.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_xobjdetect.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_xobjdetect.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_xobjdetect.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_xobjdetect.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_xphoto.so: -------------------------------------------------------------------------------- 1 | libopencv_xphoto.so.4.1 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_xphoto.so.4.1: -------------------------------------------------------------------------------- 1 | libopencv_xphoto.so.4.1.2 -------------------------------------------------------------------------------- /assets/lib/opencv-4.1.2/libopencv_xphoto.so.4.1.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Heng-W/emb_vision_track/41253cbc4508b8aaf651a34e98a7b2a7cbd182bf/assets/lib/opencv-4.1.2/libopencv_xphoto.so.4.1.2 -------------------------------------------------------------------------------- /assets/src/Makefile: -------------------------------------------------------------------------------- 1 | 2 | include $(TOPDIR)/common.mk 3 | -------------------------------------------------------------------------------- /assets/src/account.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include "util/string_util.h" 4 | 5 | using namespace std; 6 | 7 | namespace evt 8 | { 9 | 10 | // 通过用户名验证账户 11 | int checkAccountByUserName(const string& userName, const string& pwd, uint32_t* userId, uint8_t* type) 12 | { 13 | ifstream file("conf/user.conf"); 14 | 15 | string str; 16 | while (getline(file, str)) 17 | { 18 | vector ret = util::splitString(str, " "); 19 | 20 | if (ret.size() < 4 || ret[2] != userName) 21 | { 22 | continue; 23 | } 24 | 25 | *userId = atoi(ret[0].c_str()); 26 | *type = atoi(ret[1].c_str()); 27 | 28 | if (ret[3] == pwd) 29 | { 30 | return 0; 31 | } 32 | return 1; // pwd error 33 | 34 | } 35 | return 2; // userName error 36 | 37 | } 38 | 39 | // 通过ID验证账户 40 | int checkAccountById(uint32_t id, const string& pwd, string* userName) 41 | { 42 | ifstream file("conf/user.conf"); 43 | 44 | string str; 45 | while (getline(file, str)) 46 | { 47 | vector ret = util::splitString(str, " "); 48 | if (ret.size() < 4 || atoll(ret[0].c_str()) != id) 49 | { 50 | continue; 51 | } 52 | *userName = std::move(ret[2]); 53 | 54 | if (ret[3] == pwd) 55 | { 56 | return 0; 57 | } 58 | return 1; // pwd error 59 | 60 | } 61 | return 3; // id error 62 | 63 | } 64 | 65 | 66 | } // namespace evt 67 | -------------------------------------------------------------------------------- /assets/src/account.h: -------------------------------------------------------------------------------- 1 | #ifndef EVT_ACCOUNT_H 2 | #define EVT_ACCOUNT_H 3 | 4 | #include 5 | 6 | namespace evt 7 | { 8 | 9 | int checkAccountByUserName(const std::string& userName, const std::string& pwd, uint32_t* userId, uint8_t* type); 10 | 11 | int checkAccountById(uint32_t id, const std::string& pwd, std::string* userName); 12 | 13 | } // namespace evt 14 | 15 | #endif // EVT_ACCOUNT_H 16 | -------------------------------------------------------------------------------- /assets/src/broadcast_service.h: -------------------------------------------------------------------------------- 1 | #ifndef NET_BROADCAST_SERVICE_H 2 | #define NET_BROADCAST_SERVICE_H 3 | 4 | #include 5 | 6 | namespace net 7 | { 8 | 9 | class TcpServer; 10 | class EventLoop; 11 | class Buffer; 12 | 13 | class BroadcastService 14 | { 15 | public: 16 | using Predicate = std::function; 17 | 18 | BroadcastService(TcpServer* server); 19 | 20 | void broadcast(const void* data, int len); 21 | void broadcast(std::string&& message); 22 | void broadcast(Buffer&& buf); 23 | 24 | void broadcast(const void* data, int len, const Predicate& pred); 25 | void broadcast(std::string&& message, const Predicate& pred); 26 | void broadcast(Buffer&& buf, const Predicate& pred); 27 | 28 | void broadcastExcept(const void* data, int len, int64_t connId) 29 | { broadcast(data, len, Except(connId)); } 30 | 31 | void broadcastExcept(std::string&& message, int64_t connId) 32 | { broadcast(std::move(message), Except(connId)); } 33 | 34 | void broadcastExcept(Buffer&& buf, int64_t connId) 35 | { broadcast(std::move(buf), Except(connId)); } 36 | 37 | private: 38 | struct Except 39 | { 40 | Except(int64_t connId): connId_(connId) {} 41 | bool operator()(int64_t cur) const { return cur != connId_; } 42 | private: 43 | int64_t connId_; 44 | }; 45 | 46 | void broadcastInLoop(const void* data, int len); 47 | void broadcastInLoop(const void* data, int len, const Predicate& pred); 48 | 49 | TcpServer* server_; 50 | EventLoop* loop_; 51 | }; 52 | 53 | } // namespace net 54 | 55 | #endif // NET_BROADCAST_SERVICE_H 56 | -------------------------------------------------------------------------------- /assets/src/command.h: -------------------------------------------------------------------------------- 1 | #ifndef EVT_COMMAND_H 2 | #define EVT_COMMAND_H 3 | 4 | namespace evt 5 | { 6 | 7 | enum class Command 8 | { 9 | INIT, 10 | RESET, 11 | NOTICE, 12 | MESSAGE, 13 | IMAGE, 14 | LOCATE, 15 | SET_TARGET, 16 | START_TRACK, 17 | STOP_TRACK, 18 | ENABLE_MOTION_AUTOCTL, 19 | DISABLE_MOTION_AUTOCTL, 20 | START_MOTOR, 21 | STOP_MOTOR, 22 | SET_MOTOR_VAL, 23 | GET_MOTOR_VAL, 24 | SET_MOTION_CTL_PID, 25 | ENABLE_FIELD_AUTOCTL, 26 | DISABLE_FIELD_AUTOCTL, 27 | SET_SERVO_VAL, 28 | GET_SERVO_VAL, 29 | SET_FIELD_CTL_PID, 30 | GET_CLIENT_CNT, 31 | SEND_TO_ALL_CLIENTS, 32 | SEND_TO_CLIENT, 33 | ENABLE_MULTI_SCALE, 34 | DISABLE_MULTI_SCALE, 35 | SYSTEM_CMD, 36 | RESTART_SERVER, 37 | HALT, 38 | REBOOT, 39 | UPDATE_CLIENT_CNT, 40 | LOGOUT, 41 | UPDATE_PID, 42 | LOGIN, 43 | ENUM_COUNT 44 | }; 45 | 46 | 47 | } // namespace evt 48 | 49 | #endif // EVT_COMMAND_H 50 | -------------------------------------------------------------------------------- /assets/src/control/Makefile: -------------------------------------------------------------------------------- 1 | 2 | #SRCS:= 3 | 4 | include $(TOPDIR)/common.mk 5 | -------------------------------------------------------------------------------- /assets/src/control/control_event_loop.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "control_event_loop.h" 3 | 4 | #include 5 | #include "../util/timestamp.h" 6 | 7 | using namespace util; 8 | 9 | 10 | namespace evt 11 | { 12 | 13 | ControlEventLoop::ControlEventLoop() 14 | : quit_(false) 15 | { 16 | } 17 | 18 | 19 | void ControlEventLoop::loop() 20 | { 21 | while (!quit_) 22 | { 23 | auto now = Timestamp::now(); 24 | static Timestamp expiration = now; 25 | 26 | std::vector functors; 27 | int64_t waitTimeMs = std::max((expiration - now).toMsec(), static_cast(0)); 28 | { 29 | std::unique_lock lock(mutex_); 30 | notEmpty_.wait_for(lock, std::chrono::milliseconds(waitTimeMs), [this] 31 | { return !pendingFunctors_.empty() || quit_; }); 32 | functors.swap(pendingFunctors_); 33 | } 34 | // std::this_thread::sleep_for(std::chrono::milliseconds(50)); 35 | if (expiration <= now) 36 | { 37 | expiration = now + util::msec(50); 38 | motionControl_.perform(); 39 | fieldControl_.perform(); 40 | } 41 | for (const Functor& functor : functors) functor(); 42 | } 43 | } 44 | 45 | 46 | } // namespace evt 47 | -------------------------------------------------------------------------------- /assets/src/control/control_event_loop.h: -------------------------------------------------------------------------------- 1 | #ifndef EVT_CONTROL_EVENT_LOOP_H 2 | #define EVT_CONTROL_EVENT_LOOP_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "field_control.h" 10 | #include "motion_control.h" 11 | 12 | namespace evt 13 | { 14 | 15 | class ControlEventLoop 16 | { 17 | public: 18 | using Functor = std::function; 19 | 20 | ControlEventLoop(); 21 | ~ControlEventLoop() = default; 22 | 23 | DISALLOW_COPY_AND_ASSIGN(ControlEventLoop); 24 | 25 | void loop(); // 事件循环 26 | 27 | void quit() 28 | { 29 | quit_ = true; 30 | notEmpty_.notify_one(); 31 | } 32 | 33 | template 34 | void queueInLoop(Fn&& fn, Args&& ... args) 35 | { 36 | auto cb = std::bind(std::forward(fn), std::forward(args)...); 37 | 38 | { 39 | std::lock_guard lock(mutex_); 40 | pendingFunctors_.emplace_back(std::move(cb)); 41 | } 42 | notEmpty_.notify_one(); 43 | } 44 | 45 | FieldControl& fieldControl() { return fieldControl_; } 46 | MotionControl& motionControl() { return motionControl_; } 47 | 48 | private: 49 | 50 | FieldControl fieldControl_; 51 | MotionControl motionControl_; 52 | 53 | std::vector pendingFunctors_; 54 | 55 | std::atomic quit_; 56 | 57 | mutable std::mutex mutex_; 58 | std::condition_variable notEmpty_; 59 | }; 60 | 61 | } // namespace evt 62 | 63 | #endif // EVT_CONTROL_EVENT_LOOP_H 64 | -------------------------------------------------------------------------------- /assets/src/control/control_params.h: -------------------------------------------------------------------------------- 1 | #ifndef EVT_CONTROL_CONTROL_PARAMS_H 2 | #define EVT_CONTROL_CONTROL_PARAMS_H 3 | 4 | namespace evt 5 | { 6 | 7 | constexpr int POS_ERROR_MIN = 6; 8 | 9 | constexpr int DISTCTL_EN_ANGLE = 6; 10 | 11 | constexpr float SERVO_CTRL_DT = 0.1f; 12 | constexpr float SERVO_CTRL_KP = 0.01f; 13 | constexpr float SERVO_CTRL_KI = 0; 14 | constexpr float SERVO_CTRL_KD = 0.001; 15 | 16 | 17 | constexpr float DEFAULT_ANGLE_H = 90; 18 | constexpr float MIN_ANGLE_H = 0; 19 | constexpr float MAX_ANGLE_H = 180; 20 | 21 | constexpr float DEFAULT_ANGLE_V = 90; 22 | constexpr float MIN_ANGLE_V = 20; 23 | constexpr float MAX_ANGLE_V = 160; 24 | 25 | 26 | 27 | constexpr int MOTOR_OUT_DEAD_VAL_L = 4; 28 | constexpr int MOTOR_OUT_DEAD_VAL_R = 4; 29 | 30 | constexpr float MOTOR_CTRL_DT = 0.1; 31 | 32 | 33 | constexpr float DIR_CTRL_DT = 0.1; 34 | constexpr float DIR_CTRL_KP = 1.5; 35 | constexpr float DIR_CTRL_KI = 0; 36 | constexpr float DIR_CTRL_KD = 0.001; 37 | 38 | 39 | constexpr float DIST_CTRL_DT = 0.1; 40 | constexpr float DIST_CTRL_KP = 4; 41 | constexpr float DIST_CTRL_KI = 0.001; 42 | constexpr float DIST_CTRL_KD = 0; 43 | 44 | constexpr int INITIAL_CENTER_W = 320; 45 | constexpr int INITIAL_CENTER_H = 240; 46 | 47 | constexpr int TRACK_WIDTH = 120; 48 | 49 | } // namespace evt 50 | 51 | 52 | #endif // EVT_CONTROL_CONTROL_PARAMS_H 53 | -------------------------------------------------------------------------------- /assets/src/control/field_control.h: -------------------------------------------------------------------------------- 1 | #ifndef EVT_CONTROL_FIELD_CONTROL_H 2 | #define EVT_CONTROL_FIELD_CONTROL_H 3 | 4 | #include 5 | #include "../util/common.h" 6 | #include "pid.h" 7 | 8 | namespace evt 9 | { 10 | 11 | // 摄像头云台视野控制 12 | class FieldControl 13 | { 14 | public: 15 | FieldControl(); 16 | ~FieldControl(); 17 | 18 | DISALLOW_COPY_AND_ASSIGN(FieldControl); 19 | 20 | bool openDevice(const char* deviceName = "/dev/servo"); 21 | 22 | void perform(); 23 | 24 | void enableAutoMode(bool autoMode) { autoMode_ = autoMode; } 25 | bool isAutoMode() const { return autoMode_; } 26 | 27 | void setAngleHKp(float val) { pidAngleH_.setKp(val); } 28 | void setAngleHKd(float val) { pidAngleH_.setKd(val); } 29 | 30 | void setAngleVKp(float val) { pidAngleV_.setKp(val); } 31 | void setAngleVKd(float val) { pidAngleV_.setKd(val); } 32 | 33 | void setAngleHPDParams(float kp, float kd) { pidAngleH_.setParams(kp, 0, kd); } 34 | void setAngleVPDParams(float kp, float kd) { pidAngleV_.setParams(kp, 0, kd); } 35 | 36 | std::pair angleHPDParams() const { return {pidAngleH_.kp(), pidAngleH_.kd()}; } 37 | std::pair angleVPDParams() const { return {pidAngleV_.kp(), pidAngleV_.kd()}; } 38 | 39 | void setAngleH(float angleH) { angleH_ = angleH; } 40 | float angleH() const { return angleH_; } 41 | 42 | void setAngleV(float angleV) { angleV_ = angleV; } 43 | float angleV() const { return angleV_; } 44 | 45 | void setAngleHDefault(float angleH) { angleHDefault_ = angleH; } 46 | float angleHDefault() const { return angleHDefault_; } 47 | 48 | void setAngleVDefault(float angleV) { angleVDefault_ = angleV; } 49 | float angleVDefault() const { return angleVDefault_; } 50 | 51 | void resetAngleH() { angleH_ = angleHDefault_; } 52 | void resetAngleV() { angleV_ = angleVDefault_; } 53 | 54 | private: 55 | PID pidAngleH_; // 自动模式下水平角PD控制 56 | PID pidAngleV_; // 自动模式下垂直角PD控制 57 | 58 | int deviceFd_; 59 | bool autoMode_; // 手自动控制标志 60 | float angleH_, angleV_; 61 | float angleHDefault_, angleVDefault_; 62 | 63 | }; 64 | 65 | } // namespace evt 66 | 67 | #endif // EVT_CONTROL_FIELD_CONTROL_H 68 | -------------------------------------------------------------------------------- /assets/src/control/pid.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "pid.h" 3 | #include 4 | 5 | namespace evt 6 | { 7 | 8 | PID::PID(float setpoint, float dt, float kp, float ki, float kd): 9 | setpoint_(setpoint), 10 | dt_(dt), 11 | pidParams_{kp, ki, kd}, 12 | lastError_(0), 13 | integral_(0), 14 | output_(0), 15 | lastOutput_(0), 16 | finalOutput_(0), 17 | integralLimit_(0), 18 | outputLimit_(0), 19 | integralRange_(0), 20 | integralCoef_(0), 21 | divideCnt_(0) 22 | { 23 | } 24 | 25 | float PID::calculate(float error) 26 | { 27 | float integralOut = 0; 28 | 29 | if (pidParams_[1] != 0) 30 | { 31 | if (integralRange_ != 0 && fabs(error) > integralRange_) 32 | { 33 | integralCoef_ = 0; 34 | } 35 | else 36 | { 37 | integralCoef_ = 1; 38 | integral_ += error; 39 | } 40 | if (integralLimit_ != 0) 41 | { 42 | // 积分限幅 43 | if (integral_ < -integralLimit_) integral_ = -integralLimit_; 44 | else if (integral_ > integralLimit_) integral_ = integralLimit_; 45 | } 46 | integralOut = integralCoef_ * pidParams_[1] * integral_; 47 | 48 | } 49 | output_ = pidParams_[0] * error + integralOut + pidParams_[2] * (error - lastError_); 50 | if (outputLimit_ != 0) 51 | { 52 | // 输出限幅 53 | if (output_ < -outputLimit_) output_ = -outputLimit_; 54 | else if (output_ > outputLimit_) output_ = outputLimit_; 55 | } 56 | lastError_ = error; 57 | return output_; 58 | } 59 | 60 | float PID::divideOutput() 61 | { 62 | static int idx; 63 | float value = output_ - lastOutput_; 64 | 65 | finalOutput_ = value * (++idx) / divideCnt_ + lastOutput_; 66 | if (idx >= divideCnt_) 67 | { 68 | idx = 0; 69 | } 70 | return finalOutput_; 71 | } 72 | 73 | 74 | void PID::reset() 75 | { 76 | lastError_ = 0; 77 | integral_ = 0; 78 | lastOutput_ = 0; 79 | output_ = 0; 80 | divideCnt_ = 0; 81 | } 82 | 83 | } // namespace evt 84 | -------------------------------------------------------------------------------- /assets/src/control/pid.h: -------------------------------------------------------------------------------- 1 | #ifndef EVT_CONTROL_PID_H 2 | #define EVT_CONTROL_PID_H 3 | 4 | namespace evt 5 | { 6 | 7 | class PID 8 | { 9 | public: 10 | PID(float setpoint, float dt, float Kp, float Ki, float Kd); 11 | 12 | float calculate(float error); // 计算更新PID输出值 13 | float divideOutput(); // 输出划分到每个小周期 14 | 15 | // 更新设定值 16 | void updateSetpoint(float setpoint) { setpoint_ = setpoint; } 17 | 18 | // 设置PID参数 19 | void setParams(float kp, float ki, float kd) 20 | { 21 | pidParams_[0] = kp; 22 | pidParams_[1] = ki; 23 | pidParams_[2] = kd; 24 | } 25 | 26 | void setKp(float val) { kp_ = val; } 27 | void setKi(float val) { ki_ = val; } 28 | void setKd(float val) { kd_ = val; } 29 | 30 | float kp() const { return kp_; } 31 | float ki() const { return ki_; } 32 | float kd() const { return kd_; } 33 | 34 | // 获取误差 35 | float getError(float processVal) const { return setpoint_ - processVal; } 36 | 37 | // 输出限幅 38 | void setOutputLimit(float outputLimit) { outputLimit_ = outputLimit; } 39 | 40 | // 积分限幅 41 | void setIntegralLimit(float integralLimit) { integralLimit_ = integralLimit; } 42 | 43 | // 积分分离,防止饱和 44 | void setIntegralSeparation(float val) { integralRange_ = val; } 45 | 46 | // 设置划分的周期数量 47 | void setDivideCnt(int val) { divideCnt_ = val; } 48 | 49 | // 参数复位 50 | void reset(); 51 | 52 | private: 53 | float setpoint_; // 设定值 54 | float dt_; // 周期 55 | 56 | // PID参数 57 | union 58 | { 59 | float pidParams_[3]; 60 | struct 61 | { 62 | float kp_, ki_, kd_; 63 | }; 64 | }; 65 | float lastError_; 66 | float integral_; 67 | float output_; 68 | float lastOutput_; 69 | float finalOutput_; 70 | float integralLimit_; // 积分限幅值 71 | float outputLimit_; // 输出限幅值 72 | float integralRange_; // 积分分离阈值 73 | float integralCoef_; // 积分分离使用的系数 74 | int divideCnt_; 75 | }; 76 | 77 | } // namespace evt 78 | 79 | #endif // EVT_CONTROL_PID_H 80 | -------------------------------------------------------------------------------- /assets/src/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "net/event_loop.h" 3 | #include "vision/vision_event_loop.h" 4 | #include "control/control_event_loop.h" 5 | #include "util/logger.h" 6 | #include "util/config_file_reader.h" 7 | #include "util/singleton.hpp" 8 | #include "server.h" 9 | 10 | using namespace evt; 11 | 12 | 13 | int main() 14 | { 15 | util::ConfigFileReader config("conf/var.conf"); 16 | 17 | VisionEventLoop& visionEventLoop = util::Singleton::instance(); 18 | ControlEventLoop& controlEventLoop = util::Singleton::instance(); 19 | 20 | const char* videoDevice = config.get("video_device"); 21 | if (!videoDevice) videoDevice = "/dev/video0"; 22 | visionEventLoop.openDevice(videoDevice); 23 | 24 | const char* servoDevice = config.get("servo_device"); 25 | if (!servoDevice) servoDevice = "/dev/servo"; 26 | controlEventLoop.fieldControl().openDevice(servoDevice); 27 | 28 | const char* motorDevice = config.get("motor_device"); 29 | if (!motorDevice) motorDevice = "/dev/motor"; 30 | controlEventLoop.motionControl().openDevice(motorDevice); 31 | 32 | std::thread visionThread([&visionEventLoop] 33 | { 34 | visionEventLoop.loop(); 35 | }); 36 | std::thread controlThread([&controlEventLoop] 37 | { 38 | controlEventLoop.loop(); 39 | }); 40 | 41 | net::EventLoop loop; 42 | 43 | const char* portStr = config.get("listen_port"); 44 | uint16_t port = portStr ? static_cast(atoi(portStr)) : 18825; 45 | LOG(INFO) << "listen port: " << port; 46 | 47 | Server server(&loop, net::InetAddress(port)); 48 | server.start(); 49 | loop.loop(); 50 | 51 | visionEventLoop.quit(); 52 | controlEventLoop.quit(); 53 | 54 | visionThread.join(); 55 | controlThread.join(); 56 | 57 | return 0; 58 | } 59 | 60 | -------------------------------------------------------------------------------- /assets/src/net/Makefile: -------------------------------------------------------------------------------- 1 | 2 | #SUBDIRS:= 3 | #SRCS:= 4 | 5 | include $(TOPDIR)/common.mk 6 | -------------------------------------------------------------------------------- /assets/src/net/acceptor.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "acceptor.h" 3 | 4 | #include 5 | #include 6 | #include "../util/logger.h" 7 | #include "event_loop.h" 8 | #include "inet_address.h" 9 | 10 | namespace net 11 | { 12 | 13 | Acceptor::Acceptor(EventLoop* loop, const InetAddress& listenAddr, bool reuseport) 14 | : loop_(loop), 15 | acceptSocket_(sockets::createTcpNonBlock()), 16 | acceptChannel_(loop, acceptSocket_.fd()), 17 | listening_(false), 18 | idleFd_(::open("/dev/null", O_RDONLY | O_CLOEXEC)) 19 | { 20 | assert(idleFd_ >= 0); 21 | acceptSocket_.setReuseAddr(true); 22 | acceptSocket_.setReusePort(reuseport); 23 | acceptSocket_.bind(listenAddr); 24 | acceptChannel_.setReadCallback([this](Timestamp) { this->handleRead(); }); 25 | } 26 | 27 | Acceptor::~Acceptor() 28 | { 29 | acceptChannel_.disableAll(); 30 | acceptChannel_.remove(); 31 | ::close(idleFd_); 32 | } 33 | 34 | void Acceptor::listen() 35 | { 36 | loop_->assertInLoopThread(); 37 | listening_ = true; 38 | acceptSocket_.listen(); 39 | acceptChannel_.enableReading(); 40 | } 41 | 42 | void Acceptor::handleRead() 43 | { 44 | loop_->assertInLoopThread(); 45 | InetAddress peerAddr; 46 | int connfd = acceptSocket_.accept(&peerAddr); 47 | if (connfd >= 0) 48 | { 49 | if (newConnectionCallback_) 50 | { 51 | newConnectionCallback_(connfd, peerAddr); 52 | } 53 | else 54 | { 55 | sockets::close(connfd); 56 | } 57 | } 58 | else 59 | { 60 | SYSLOG(ERROR) << "in Acceptor::handleRead"; 61 | // accept失败的特殊处理 62 | if (errno == EMFILE) 63 | { 64 | ::close(idleFd_); 65 | idleFd_ = ::accept(acceptSocket_.fd(), nullptr, nullptr); 66 | ::close(idleFd_); 67 | idleFd_ = ::open("/dev/null", O_RDONLY | O_CLOEXEC); 68 | } 69 | } 70 | } 71 | 72 | } // namespace net 73 | -------------------------------------------------------------------------------- /assets/src/net/acceptor.h: -------------------------------------------------------------------------------- 1 | #ifndef NET_ACCEPTOR_H 2 | #define NET_ACCEPTOR_H 3 | 4 | #include "channel.h" 5 | #include "socket.h" 6 | 7 | namespace net 8 | { 9 | 10 | class EventLoop; 11 | class InetAddress; 12 | 13 | class Acceptor 14 | { 15 | public: 16 | using NewConnectionCallback = std::function; 17 | 18 | Acceptor(EventLoop* loop, const InetAddress& listenAddr, bool reuseport); 19 | ~Acceptor(); 20 | 21 | DISALLOW_COPY_AND_ASSIGN(Acceptor); 22 | 23 | void listen(); 24 | 25 | void setNewConnectionCallback(const NewConnectionCallback& cb) 26 | { newConnectionCallback_ = cb; } 27 | 28 | bool listening() const { return listening_; } 29 | 30 | private: 31 | void handleRead(); 32 | 33 | EventLoop* loop_; 34 | Socket acceptSocket_; 35 | Channel acceptChannel_; 36 | NewConnectionCallback newConnectionCallback_; 37 | bool listening_; 38 | int idleFd_; 39 | }; 40 | 41 | } // namespace net 42 | 43 | #endif // NET_ACCEPTOR_H 44 | -------------------------------------------------------------------------------- /assets/src/net/buffer.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "buffer.h" 3 | #include 4 | 5 | namespace net 6 | { 7 | 8 | ssize_t Buffer::readFd(int fd, int* savedErrno) 9 | { 10 | char extrabuf[65536]; 11 | struct iovec vec[2]; 12 | const size_t writable = writableBytes(); 13 | vec[0].iov_base = begin() + writerIndex_; 14 | vec[0].iov_len = writable; 15 | vec[1].iov_base = extrabuf; 16 | vec[1].iov_len = sizeof(extrabuf); 17 | 18 | // buffer空间足够时, 不读到extrabuf 19 | // 使用extrabuf时, 最多读 128k-1 字节 20 | const int iovcnt = (writable < sizeof(extrabuf)) ? 2 : 1; 21 | const ssize_t n = ::readv(fd, vec, iovcnt); 22 | if (n < 0) 23 | { 24 | *savedErrno = errno; 25 | } 26 | else if (static_cast(n) <= writable) 27 | { 28 | writerIndex_ += n; 29 | } 30 | else 31 | { 32 | writerIndex_ = capacity_; 33 | append(extrabuf, n - writable); // 添加到buffer中 34 | } 35 | return n; 36 | } 37 | 38 | } // namespace net 39 | 40 | -------------------------------------------------------------------------------- /assets/src/net/callbacks.h: -------------------------------------------------------------------------------- 1 | // 所有客端可见的回调函数 2 | #ifndef NET_CALLBACKS_H 3 | #define NET_CALLBACKS_H 4 | 5 | #include 6 | #include 7 | #include "../util/timestamp.h" 8 | 9 | namespace net 10 | { 11 | 12 | class Buffer; 13 | class TcpConnection; 14 | 15 | using util::Timestamp; 16 | using TcpConnectionPtr = std::shared_ptr; 17 | 18 | using TimerCallback = std::function; 19 | 20 | using ConnectionCallback = std::function; 21 | using MessageCallback = std::function; 22 | using WriteCompleteCallback = std::function; 23 | using HighWaterMarkCallback = std::function; 24 | using CloseCallback = std::function; 25 | 26 | void defaultConnectionCallback(const TcpConnectionPtr& conn); 27 | void defaultMessageCallback(const TcpConnectionPtr& conn, Buffer* buffer, Timestamp receiveTime); 28 | 29 | } // namespace net 30 | 31 | #endif // NET_CALLBACKS_H 32 | -------------------------------------------------------------------------------- /assets/src/net/connector.h: -------------------------------------------------------------------------------- 1 | #ifndef NET_CONNECTOR_H 2 | #define NET_CONNECTOR_H 3 | 4 | #include 5 | #include 6 | #include "../util/common.h" 7 | #include "inet_address.h" 8 | 9 | namespace net 10 | { 11 | 12 | class Channel; 13 | class EventLoop; 14 | 15 | class Connector : public std::enable_shared_from_this 16 | { 17 | public: 18 | using NewConnectionCallback = std::function ; 19 | 20 | Connector(EventLoop* loop, const InetAddress& serverAddr); 21 | ~Connector(); 22 | 23 | DISALLOW_COPY_AND_ASSIGN(Connector); 24 | 25 | void setNewConnectionCallback(const NewConnectionCallback& cb) 26 | { newConnectionCallback_ = cb; } 27 | 28 | void start(); // 可在任意线程调用 29 | void restart(); // 只能在loop线程调用 30 | void stop(); // 可在任意线程调用 31 | 32 | const InetAddress& serverAddress() const { return serverAddr_; } 33 | 34 | private: 35 | enum State { kDisconnected, kConnecting, kConnected }; 36 | 37 | static const int kMaxRetryDelayMs = 30 * 1000; 38 | static const int kInitRetryDelayMs = 500; 39 | 40 | void setState(State s) { state_ = s; } 41 | void startInLoop(); 42 | void connect(); 43 | void connecting(int sockfd); 44 | void handleWrite(); 45 | void handleError(); 46 | void retry(int sockfd); 47 | int removeAndResetChannel(); 48 | 49 | EventLoop* loop_; 50 | InetAddress serverAddr_; 51 | bool connect_; 52 | State state_; 53 | std::unique_ptr channel_; 54 | NewConnectionCallback newConnectionCallback_; 55 | int retryDelayMs_; 56 | int64_t timerId_; 57 | }; 58 | 59 | } // namespace net 60 | 61 | #endif // NET_CONNECTOR_H 62 | 63 | -------------------------------------------------------------------------------- /assets/src/net/endian.h: -------------------------------------------------------------------------------- 1 | #ifndef NET_ENDIAN_H 2 | #define NET_ENDIAN_H 3 | 4 | #include 5 | #include 6 | 7 | namespace net 8 | { 9 | 10 | inline uint64_t hostToNetwork64(uint64_t host64) { return htobe64(host64); } 11 | inline uint32_t hostToNetwork32(uint32_t host32) { return htobe32(host32); } 12 | inline uint16_t hostToNetwork16(uint16_t host16) { return htobe16(host16); } 13 | 14 | inline uint64_t networkToHost64(uint64_t net64) { return be64toh(net64); } 15 | inline uint32_t networkToHost32(uint32_t net32) { return be32toh(net32); } 16 | inline uint16_t networkToHost16(uint16_t net16) { return be16toh(net16); } 17 | 18 | } // namespace net 19 | 20 | #endif // NET_ENDIAN_H 21 | -------------------------------------------------------------------------------- /assets/src/net/event_loop_thread_pool.h: -------------------------------------------------------------------------------- 1 | #ifndef NET_EVENT_LOOP_THREAD_POOL_H 2 | #define NET_EVENT_LOOP_THREAD_POOL_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "../util/common.h" 8 | 9 | namespace net 10 | { 11 | 12 | class EventLoop; 13 | 14 | class EventLoopThreadPool 15 | { 16 | public: 17 | using ThreadInitCallback = std::function; 18 | 19 | EventLoopThreadPool(EventLoop* baseLoop); 20 | ~EventLoopThreadPool(); 21 | 22 | DISALLOW_COPY_AND_ASSIGN(EventLoopThreadPool); 23 | 24 | void setThreadNum(int numThreads) { numThreads_ = numThreads; } 25 | 26 | void start(const ThreadInitCallback& cb = nullptr); 27 | 28 | // round-robin 29 | EventLoop* getNextLoop(); 30 | 31 | std::string info() const; 32 | 33 | bool started() const { return started_; } 34 | 35 | private: 36 | EventLoop* baseLoop_; // 主线程的eventLoop 37 | bool started_; 38 | int numThreads_; 39 | int next_; // loop索引 40 | std::vector> threads_; 41 | std::vector loops_; 42 | }; 43 | 44 | } // namespace net 45 | 46 | #endif // NET_EVENT_LOOP_THREAD_POOL_H 47 | -------------------------------------------------------------------------------- /assets/src/net/inet_address.h: -------------------------------------------------------------------------------- 1 | #ifndef NET_INET_ADDRESS_H 2 | #define NET_INET_ADDRESS_H 3 | 4 | #include 5 | #include 6 | 7 | namespace net 8 | { 9 | 10 | class InetAddress 11 | { 12 | public: 13 | explicit InetAddress(uint16_t port = 0, bool loopbackOnly = false); 14 | 15 | InetAddress(const std::string& ip, uint16_t port); 16 | InetAddress(const struct sockaddr_in& addr): addr_(addr) {} 17 | 18 | sa_family_t family() const { return addr_.sin_family; } 19 | std::string toIp() const; 20 | std::string toIpPort() const; 21 | uint16_t toPort() const; 22 | 23 | const struct sockaddr_in& getSockAddr() const { return addr_; } 24 | void setSockAddr(const struct sockaddr_in& addr) { addr_ = addr; } 25 | 26 | uint32_t ipNetEndian() const { return addr_.sin_addr.s_addr; } 27 | uint16_t portNetEndian() const { return addr_.sin_port; } 28 | 29 | static bool resolve(const std::string& hostname, InetAddress* result); 30 | 31 | private: 32 | struct sockaddr_in addr_; 33 | }; 34 | 35 | } // namespace net 36 | 37 | #endif // NET_INET_ADDRESS_H 38 | -------------------------------------------------------------------------------- /assets/src/net/poller.h: -------------------------------------------------------------------------------- 1 | #ifndef NET_POLLER_H 2 | #define NET_POLLER_H 3 | 4 | #include 5 | #include 6 | #include "../util/common.h" 7 | #include "../util/timestamp.h" 8 | 9 | struct epoll_event; 10 | 11 | namespace net 12 | { 13 | 14 | class EventLoop; 15 | class Channel; 16 | 17 | class Poller 18 | { 19 | public: 20 | using ChannelList = std::vector; 21 | 22 | enum ChannelIndex 23 | { 24 | kNew = -1, // not exist 25 | kAdded = 1, // exist, fd is watched 26 | kDeleted = 2, // exist, but called EPOLL_CTL_DEL 27 | }; 28 | 29 | Poller(EventLoop* loop); 30 | ~Poller(); 31 | 32 | DISALLOW_COPY_AND_ASSIGN(Poller); 33 | 34 | util::Timestamp poll(int timeoutMs, ChannelList* activeChannels); 35 | 36 | void updateChannel(Channel* channel); 37 | void removeChannel(Channel* channel); 38 | bool hasChannel(Channel* channel) const; 39 | 40 | private: 41 | // fd到Channel*的映射 42 | using ChannelMap = std::unordered_map; 43 | 44 | EventLoop* ownerLoop_; 45 | ChannelMap channels_; 46 | 47 | // use epoll 48 | private: 49 | using EventList = std::vector; 50 | 51 | void fillActiveChannels(int numEvents, ChannelList* activeChannels) const; 52 | void update(int operation, Channel* channel); 53 | 54 | static const char* operationToString(int op); 55 | 56 | static const int kInitEventListSize = 16; 57 | 58 | int epollfd_; 59 | EventList events_; 60 | }; 61 | 62 | } // namespace net 63 | 64 | #endif // NET_POLLER_H 65 | -------------------------------------------------------------------------------- /assets/src/net/tcp_client.h: -------------------------------------------------------------------------------- 1 | #ifndef NET_TCP_CLIENT_H 2 | #define NET_TCP_CLIENT_H 3 | 4 | #include 5 | #include "tcp_connection.h" 6 | 7 | namespace net 8 | { 9 | 10 | class Connector; 11 | using ConnectorPtr = std::shared_ptr; 12 | 13 | class TcpClient 14 | { 15 | public: 16 | TcpClient(EventLoop* loop, const InetAddress& serverAddr); 17 | ~TcpClient(); 18 | 19 | DISALLOW_COPY_AND_ASSIGN(TcpClient); 20 | 21 | void connect(); 22 | void disconnect(); 23 | void stop(); 24 | 25 | TcpConnectionPtr connection() const 26 | { 27 | std::lock_guard lock(mutex_); 28 | return connection_; 29 | } 30 | 31 | EventLoop* getLoop() const { return loop_; } 32 | bool retry() const { return retry_; } 33 | void enableRetry() { retry_ = true; } 34 | 35 | void setName(const std::string& name) { name_ = name; } 36 | const std::string& name() const { return name_; } 37 | 38 | // 设置回调函数(非线程安全) 39 | void setConnectionCallback(const ConnectionCallback& cb) 40 | { connectionCallback_ = cb; } 41 | 42 | void setMessageCallback(const MessageCallback& cb) 43 | { messageCallback_ = cb; } 44 | 45 | void setWriteCompleteCallback(const WriteCompleteCallback& cb) 46 | { writeCompleteCallback_ = cb; } 47 | 48 | private: 49 | void newConnection(int sockfd); 50 | void removeConnection(const TcpConnectionPtr& conn); 51 | 52 | EventLoop* loop_; 53 | ConnectorPtr connector_; 54 | TcpConnectionPtr connection_; 55 | 56 | ConnectionCallback connectionCallback_; 57 | MessageCallback messageCallback_; 58 | WriteCompleteCallback writeCompleteCallback_; 59 | 60 | bool retry_; // atomic 61 | bool connect_; // atomic 62 | int nextConnId_; 63 | std::string name_; 64 | mutable std::mutex mutex_; 65 | }; 66 | 67 | } // namespace net 68 | 69 | #endif // NET_TCP_CLIENT_H 70 | 71 | -------------------------------------------------------------------------------- /assets/src/net/timer_list.h: -------------------------------------------------------------------------------- 1 | #ifndef NET_TIMER_QUEUE_H 2 | #define NET_TIMER_QUEUE_H 3 | 4 | #include 5 | #include 6 | #include "channel.h" 7 | #include "callbacks.h" 8 | 9 | namespace net 10 | { 11 | 12 | class EventLoop; 13 | class Timer; 14 | 15 | class TimerList 16 | { 17 | public: 18 | TimerList(EventLoop* loop); 19 | ~TimerList(); 20 | 21 | DISALLOW_COPY_AND_ASSIGN(TimerList); 22 | 23 | // 线程安全 24 | int64_t addTimer(const TimerCallback& cb, Timestamp when, int64_t interval = 0); 25 | void removeTimer(int64_t timerId); 26 | 27 | void doTimerEvent(); 28 | 29 | Timestamp nextExpiration() const; 30 | 31 | private: 32 | using Entry = std::pair; 33 | using Timers = std::set; 34 | using ActiveTimers = std::unordered_map; 35 | 36 | EventLoop* loop_; 37 | 38 | // timers sorted by expiration 39 | Timers timers_; 40 | ActiveTimers activeTimers_; 41 | }; 42 | 43 | } // namespace net 44 | 45 | #endif // NET_TIMER_QUEUE_H 46 | -------------------------------------------------------------------------------- /assets/src/server.h: -------------------------------------------------------------------------------- 1 | #ifndef EVT_SERVER_H 2 | #define EVT_SERVER_H 3 | 4 | #include 5 | #include 6 | #include "net/tcp_server.h" 7 | #include "broadcast_service.h" 8 | #include "session.h" 9 | 10 | namespace evt 11 | { 12 | 13 | class Server 14 | { 15 | public: 16 | 17 | Server(net::EventLoop* loop, const net::InetAddress& listenAddr); 18 | 19 | void start() { server_.start(); } 20 | 21 | net::EventLoop* getLoop() const { return server_.getLoop(); } 22 | const net::TcpServer::ConnectionMap& connections() const { return server_.connections(); } 23 | 24 | void addUser(uint32_t userId, const std::weak_ptr& session) 25 | { 26 | std::lock_guard lock(mutex_); 27 | assert(users_.find(userId) == users_.end()); 28 | users_[userId] = session; 29 | } 30 | 31 | void removeUser(uint32_t userId) 32 | { 33 | std::lock_guard lock(mutex_); 34 | assert(users_.find(userId) != users_.end()); 35 | users_.erase(userId); 36 | } 37 | 38 | SessionPtr findUser(uint32_t userId) const 39 | { 40 | std::lock_guard lock(mutex_); 41 | auto it = users_.find(userId); 42 | return it != users_.end() ? it->second.lock() : nullptr; 43 | } 44 | 45 | net::BroadcastService* broadcastService() { return &broadcastService_; } 46 | 47 | private: 48 | 49 | net::TcpServer server_; 50 | net::BroadcastService broadcastService_; 51 | std::unordered_map sessions_; 52 | std::unordered_map> users_; 53 | 54 | mutable std::mutex mutex_; 55 | }; 56 | 57 | } // namespace evt 58 | 59 | #endif // EVT_SERVER_H 60 | -------------------------------------------------------------------------------- /assets/src/session.h: -------------------------------------------------------------------------------- 1 | #ifndef EVT_SESSION_H 2 | #define EVT_SESSION_H 3 | 4 | #include "net/tcp_connection.h" 5 | #include "broadcast_service.h" 6 | 7 | namespace evt 8 | { 9 | 10 | class Server; 11 | enum class Command; 12 | 13 | class Session : public std::enable_shared_from_this 14 | { 15 | public: 16 | Session(Server* server, const net::TcpConnectionPtr& conn); 17 | ~Session(); 18 | 19 | net::TcpConnectionPtr connection() const { return conn_; } 20 | 21 | void logout(); 22 | 23 | uint32_t userId() const { return userId_; } 24 | bool login() const { return login_; } 25 | 26 | static net::Buffer createBuffer(Command cmd, int initialSize = 0); 27 | static void packBuffer(net::Buffer* buf); 28 | 29 | private: 30 | void parseMessage(const net::TcpConnectionPtr& conn, const char* data, int len); 31 | 32 | Server* server_; 33 | net::TcpConnectionPtr conn_; 34 | net::BroadcastService* broadcastService_; 35 | bool login_; 36 | uint32_t userId_; 37 | uint8_t type_; 38 | }; 39 | 40 | using SessionPtr = std::shared_ptr; 41 | 42 | } // namespace evt 43 | 44 | #endif // EVT_SESSION_H 45 | -------------------------------------------------------------------------------- /assets/src/util/Makefile: -------------------------------------------------------------------------------- 1 | 2 | #SUBDIRS:= 3 | #SRCS:= 4 | 5 | include $(TOPDIR)/common.mk 6 | -------------------------------------------------------------------------------- /assets/src/util/common.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_COMMON_H 2 | #define UTIL_COMMON_H 3 | 4 | // 禁用拷贝构造和拷贝赋值函数 5 | #ifndef DISALLOW_COPY_AND_ASSIGN 6 | #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ 7 | TypeName(const TypeName&) = delete; \ 8 | TypeName& operator=(const TypeName&) = delete 9 | #endif 10 | 11 | 12 | #endif // UTIL_COMMON_H 13 | -------------------------------------------------------------------------------- /assets/src/util/concurrent_queue.hpp: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_BLOCKING_QUEUE_HPP 2 | #define UTIL_BLOCKING_QUEUE_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace util 8 | { 9 | 10 | template 11 | class ConcurrentQueue 12 | { 13 | public: 14 | using QueueType = std::deque; 15 | 16 | void put(const T& x) 17 | { 18 | std::lock_guard lock(mutex_); 19 | queue_.push_back(x); 20 | notEmpty_.notify_one(); 21 | } 22 | 23 | void put(T&& x) 24 | { 25 | std::lock_guard lock(mutex_); 26 | queue_.push_back(std::move(x)); 27 | notEmpty_.notify_one(); 28 | } 29 | 30 | bool get(T* x) 31 | { 32 | std::lock_guard lock(mutex_); 33 | if (queue_.empty()) return false; 34 | *x = std::move(queue_.front()); 35 | queue_.pop_front(); 36 | return true; 37 | } 38 | 39 | int size() const 40 | { 41 | std::lock_guard lock(mutex_); 42 | return queue_.size(); 43 | } 44 | 45 | private: 46 | mutable std::mutex mutex_; 47 | std::condition_variable notEmpty_; 48 | QueueType queue_; 49 | }; 50 | 51 | } // namespace util 52 | 53 | #endif // UTIL_BLOCKING_QUEUE_HPP 54 | -------------------------------------------------------------------------------- /assets/src/util/config_file_reader.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "config_file_reader.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "string_util.h" 8 | 9 | using namespace std; 10 | 11 | namespace util 12 | { 13 | 14 | ConfigFileReader::ConfigFileReader(const char* fileName) 15 | : fileName_(fileName) 16 | { 17 | loadFile(fileName); 18 | } 19 | 20 | 21 | const char* ConfigFileReader::get(const char* key) 22 | { 23 | auto it = variables_.find(key); 24 | return it != variables_.end() ? it->second.c_str() : nullptr; 25 | } 26 | 27 | void ConfigFileReader::loadFile(const char* fileName) 28 | { 29 | ifstream file; 30 | file.open(fileName, ios::in); // 读取配置文件 31 | string str; 32 | 33 | while (getline(file, str)) 34 | { 35 | vector res = splitString(str, "="); 36 | if (res.size() != 2 || res[0][0] == '#') 37 | { 38 | continue; 39 | } 40 | variables_[res[0]] = res[1]; 41 | } 42 | file.close(); 43 | } 44 | 45 | } // namespace util 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /assets/src/util/config_file_reader.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_CONFIG_FILE_READER_H 2 | #define UTIL_CONFIG_FILE_READER_H 3 | 4 | #include 5 | #include 6 | 7 | namespace util 8 | { 9 | 10 | class ConfigFileReader 11 | { 12 | public: 13 | ConfigFileReader(const char* fileName); 14 | 15 | const char* get(const char* key); 16 | 17 | const char* fileName() const { return fileName_.c_str(); } 18 | 19 | 20 | private: 21 | void loadFile(const char* fileName); 22 | 23 | std::unordered_map variables_; 24 | std::string fileName_; 25 | 26 | }; 27 | 28 | } // namespace util 29 | 30 | #endif // UTIL_CONFIG_FILE_READER_H 31 | -------------------------------------------------------------------------------- /assets/src/util/count_down_latch.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_COUNT_DOWN_LATCH_H 2 | #define UTIL_COUNT_DOWN_LATCH_H 3 | 4 | #include 5 | #include "common.h" 6 | 7 | namespace util 8 | { 9 | 10 | class CountDownLatch 11 | { 12 | public: 13 | explicit CountDownLatch(int count): count_(count) {} 14 | 15 | DISALLOW_COPY_AND_ASSIGN(CountDownLatch); 16 | 17 | void wait() 18 | { 19 | std::unique_lock lock(mutex_); 20 | cond_.wait(lock, [this] { return count_ == 0; }); 21 | } 22 | 23 | void countDown() 24 | { 25 | std::lock_guard lock(mutex_); 26 | if (--count_ == 0) cond_.notify_all(); 27 | } 28 | 29 | int getCount() const 30 | { 31 | std::lock_guard lock(mutex_); 32 | return count_; 33 | } 34 | 35 | private: 36 | mutable std::mutex mutex_; 37 | std::condition_variable cond_; 38 | int count_; 39 | }; 40 | 41 | } // namespace util 42 | 43 | #endif // UTIL_COUNT_DOWN_LATCH_H 44 | -------------------------------------------------------------------------------- /assets/src/util/log_stream.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_LOG_STREAM_H 2 | #define UTIL_LOG_STREAM_H 3 | 4 | #include 5 | 6 | namespace util 7 | { 8 | 9 | class LogStreamBuf : public std::streambuf 10 | { 11 | public: 12 | // REQUIREMENTS: "len" must be >= 2 to account for the '\n' and '\0'. 13 | LogStreamBuf() 14 | { 15 | thread_local char buf[20480]; 16 | setp(buf, buf + sizeof(buf) - 2); 17 | } 18 | 19 | // This effectively ignores overflow. 20 | int_type overflow(int_type ch) { return ch; } 21 | 22 | // Legacy public ostrstream method. 23 | size_t pcount() const { return static_cast(pptr() - pbase()); } 24 | char* pbase() const { return std::streambuf::pbase(); } 25 | }; 26 | 27 | class LogStream : public std::ostream 28 | { 29 | public: 30 | LogStream() 31 | : std::ostream(nullptr), 32 | streambuf_(), 33 | ctr_(0), 34 | self_(this) 35 | { rdbuf(&streambuf_); } 36 | 37 | LogStream(const LogStream&) = delete; 38 | LogStream& operator=(const LogStream&) = delete; 39 | 40 | int ctr() const { return ctr_; } 41 | void set_ctr(int ctr) { ctr_ = ctr; } 42 | LogStream* self() const { return self_; } 43 | 44 | // Legacy std::streambuf methods. 45 | size_t pcount() const { return streambuf_.pcount(); } 46 | char* pbase() const { return streambuf_.pbase(); } 47 | char* str() const { return pbase(); } 48 | 49 | private: 50 | LogStreamBuf streambuf_; 51 | int ctr_; 52 | LogStream* self_; 53 | }; 54 | 55 | } // namespace util 56 | 57 | #endif // UTIL_LOG_STREAM_H 58 | -------------------------------------------------------------------------------- /assets/src/util/logger.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "logger.h" 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "timestamp.h" 9 | 10 | namespace util 11 | { 12 | 13 | static const char* LogLevelName[] = 14 | { 15 | "TRACE ", 16 | "DEBUG ", 17 | "INFO ", 18 | "WARN ", 19 | "ERROR ", 20 | "FATAL ", 21 | }; 22 | 23 | Logger::LogLevel Logger::minLogLevel_ = []() -> Logger::LogLevel 24 | { 25 | if (::getenv("LOG_TRACE")) 26 | return Logger::TRACE; 27 | else if (::getenv("LOG_DEBUG")) 28 | return Logger::DEBUG; 29 | else 30 | return Logger::INFO; 31 | }(); 32 | 33 | Logger::OutputFunc Logger::output_ = [](const char* msg, int len) 34 | { 35 | size_t n = fwrite(msg, 1, len, stdout); 36 | (void)n; 37 | }; 38 | 39 | Logger::FlushFunc Logger::flush_ = [] { fflush(stdout); }; 40 | 41 | 42 | Logger::Logger(LogLevel level, int savedErrno, const char* file, int line) 43 | : level_(level) 44 | { 45 | stream_ << Timestamp::now().toFormattedString() << " "; 46 | stream_ << LogLevelName[level]; 47 | stream_ << std::this_thread::get_id() << " "; 48 | stream_ << file << ':' << line << "] "; 49 | if (savedErrno != 0) 50 | { 51 | stream_ << strerror(savedErrno) << " (errno=" << savedErrno << ") "; 52 | } 53 | } 54 | 55 | Logger::Logger(const char* file, int line, LogLevel level, const char* func) 56 | : Logger(level, 0, file, line) { stream_ << func << ' '; } 57 | 58 | Logger::Logger(const char* file, int line, LogLevel level, bool sysLog) 59 | : Logger(level, sysLog ? errno : 0, file, line) {} 60 | 61 | Logger::~Logger() 62 | { 63 | stream_ << '\n'; 64 | output_(stream_.pbase(), stream_.pcount()); 65 | if (level_ == FATAL) 66 | { 67 | flush_(); 68 | abort(); 69 | } 70 | } 71 | 72 | } // namespace util 73 | 74 | -------------------------------------------------------------------------------- /assets/src/util/singleton.hpp: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_SINGLETON_HPP 2 | #define UTIL_SINGLETON_HPP 3 | 4 | #include 5 | #include 6 | 7 | namespace util 8 | { 9 | 10 | template 11 | class Singleton 12 | { 13 | public: 14 | Singleton() = delete; 15 | ~Singleton() = delete; 16 | Singleton(const Singleton&) = delete; 17 | Singleton& operator=(const Singleton&) = delete; 18 | 19 | template 20 | static T& instance(Args&& ... args) 21 | { 22 | std::call_once(onceFlag_, [&] 23 | { 24 | instance_ = new T(std::forward(args)...); 25 | ::atexit(destroy); 26 | }); 27 | assert(instance_ != nullptr); 28 | return *instance_; 29 | } 30 | 31 | private: 32 | static void destroy() 33 | { 34 | delete instance_; 35 | instance_ = nullptr; 36 | } 37 | 38 | static std::once_flag onceFlag_; 39 | static T* instance_; 40 | }; 41 | 42 | template 43 | std::once_flag Singleton::onceFlag_; 44 | 45 | template 46 | T* Singleton::instance_ = nullptr; 47 | 48 | } // namespace util 49 | 50 | #endif // UTIL_SINGLETON_HPP 51 | -------------------------------------------------------------------------------- /assets/src/util/string_util.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "string_util.h" 3 | #include 4 | 5 | using namespace std; 6 | 7 | namespace util 8 | { 9 | 10 | // 分割字符串 11 | vector splitString(const string& str, const string& delim) 12 | { 13 | vector res; 14 | auto start = str.cbegin(); 15 | while (start < str.cend()) 16 | { 17 | auto it = std::search(start, str.cend(), delim.cbegin(), delim.cend()); 18 | res.emplace_back(start, it); 19 | start = it + delim.size(); 20 | } 21 | return res; 22 | } 23 | 24 | } // namespace util -------------------------------------------------------------------------------- /assets/src/util/string_util.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_STRING_UTIL_H 2 | #define UTIL_STRING_UTIL_H 3 | 4 | #include 5 | #include 6 | 7 | namespace util 8 | { 9 | 10 | std::vector splitString(const std::string& str, const std::string& delim); 11 | 12 | 13 | } 14 | 15 | #endif // UTIL_STRING_UTIL_H -------------------------------------------------------------------------------- /assets/src/util/sys_cmd.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @brief 创建一个管道,fork一个进程,执行shell 3 | */ 4 | #include "sys_cmd.h" 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace util 11 | { 12 | 13 | int system(const std::string& cmd, std::string& result) 14 | { 15 | FILE* fp = popen(cmd.c_str(), "r"); // 将命令输出通过管道读取到文件流 16 | if (!fp) 17 | { 18 | result = std::string("run command failed:") + strerror(errno); 19 | return -1; 20 | } 21 | 22 | std::stringstream ss; 23 | char lineBuf[512]; 24 | 25 | // fread(buf, sizeof(char), sizeof(buf), fp); 26 | while (fgets(lineBuf, sizeof(lineBuf), fp)) 27 | { 28 | if (ss.tellp() > (4 << 10)) 29 | { 30 | break; 31 | } 32 | ss << lineBuf; 33 | } 34 | 35 | int ret = pclose(fp); 36 | if (ret == -1 || !WIFEXITED(ret)) 37 | { 38 | result = std::string("run command failed:") + strerror(errno); 39 | return -1; 40 | } 41 | 42 | int exitcode = WEXITSTATUS(ret); 43 | 44 | result = ss.str(); 45 | 46 | return exitcode; 47 | } 48 | 49 | } // namespace util 50 | 51 | 52 | -------------------------------------------------------------------------------- /assets/src/util/sys_cmd.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_SYS_CMD_H 2 | #define UTIL_SYS_CMD_H 3 | 4 | #include 5 | 6 | namespace util 7 | { 8 | 9 | // 解析Linux命令 10 | int system(const std::string& cmd, std::string& result); 11 | 12 | inline std::string system(const std::string& cmd) 13 | { 14 | std::string result; 15 | system(cmd, result); 16 | return result; 17 | } 18 | 19 | } // namespace util 20 | 21 | #endif // UTIL_SYS_CMD_H 22 | 23 | -------------------------------------------------------------------------------- /assets/src/util/timestamp.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "timestamp.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | using std::string; 10 | 11 | namespace util 12 | { 13 | 14 | static_assert(sizeof(Timestamp) == sizeof(int64_t), 15 | "Timestamp should be same size as int64_t"); 16 | 17 | string Timestamp::toString() const 18 | { 19 | char buf[64]; 20 | int64_t seconds = microSecondsSinceEpoch_ / kMicroSecondsPerSecond; 21 | int64_t microseconds = microSecondsSinceEpoch_ % kMicroSecondsPerSecond; 22 | snprintf(buf, sizeof(buf), "%lld.%06lld", (long long int)seconds, (long long int)microseconds); 23 | return buf; 24 | } 25 | 26 | string Timestamp::toFormattedString(bool showMicroseconds) const 27 | { 28 | time_t seconds = static_cast(microSecondsSinceEpoch_ / kMicroSecondsPerSecond); 29 | struct tm tm_time = *localtime(&seconds); 30 | 31 | char buf[64]; 32 | 33 | if (showMicroseconds) 34 | { 35 | int microseconds = static_cast(microSecondsSinceEpoch_ % kMicroSecondsPerSecond); 36 | snprintf(buf, sizeof(buf), "%4d%02d%02d %02d:%02d:%02d.%06d", 37 | tm_time.tm_year + 1900, tm_time.tm_mon + 1, tm_time.tm_mday, 38 | tm_time.tm_hour, tm_time.tm_min, tm_time.tm_sec, 39 | microseconds); 40 | } 41 | else 42 | { 43 | snprintf(buf, sizeof(buf), "%4d%02d%02d %02d:%02d:%02d", 44 | tm_time.tm_year + 1900, tm_time.tm_mon + 1, tm_time.tm_mday, 45 | tm_time.tm_hour, tm_time.tm_min, tm_time.tm_sec); 46 | } 47 | return buf; 48 | } 49 | 50 | Timestamp Timestamp::now() 51 | { 52 | using namespace std; 53 | auto now = chrono::time_point_cast(chrono::system_clock::now()); 54 | int64_t microSeconds = now.time_since_epoch().count(); 55 | return Timestamp(microSeconds); 56 | } 57 | 58 | } // namespace util 59 | -------------------------------------------------------------------------------- /assets/src/util/type.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_TYPE_H 2 | #define UTIL_TYPE_H 3 | 4 | #include 5 | #include 6 | 7 | namespace util 8 | { 9 | 10 | template 11 | inline To implicit_cast(const From& f) 12 | { 13 | return f; 14 | } 15 | 16 | // use like this: down_cast(foo) 17 | template 18 | inline To down_cast(From* f) 19 | { 20 | if (false) 21 | { 22 | implicit_cast(0); 23 | } 24 | assert(f == nullptr || dynamic_cast(f) != nullptr); // RTTI: debug mode only 25 | return static_cast(f); 26 | } 27 | 28 | template 29 | inline T* get_pointer(const std::shared_ptr& ptr) 30 | { 31 | return ptr.get(); 32 | } 33 | 34 | template 35 | inline T* get_pointer(const std::unique_ptr& ptr) 36 | { 37 | return ptr.get(); 38 | } 39 | 40 | template 41 | inline std::shared_ptr down_pointer_cast(const std::shared_ptr& f) 42 | { 43 | if (false) 44 | { 45 | implicit_cast(0); 46 | } 47 | assert(f == nullptr || dynamic_cast(get_pointer(f)) != nullptr); 48 | return std::static_pointer_cast(f); 49 | } 50 | 51 | template 52 | inline std::unique_ptr down_pointer_cast(std::unique_ptr&& f) 53 | { 54 | if (false) 55 | { 56 | implicit_cast(0); 57 | } 58 | assert(f == nullptr || dynamic_cast(get_pointer(f)) != nullptr); 59 | auto to = static_cast(f.release()); 60 | return std::unique_ptr(to, std::move(f.get_deleter())); 61 | } 62 | 63 | } // namespace util 64 | 65 | #endif // UTIL_TYPE_H 66 | -------------------------------------------------------------------------------- /assets/src/vision/Makefile: -------------------------------------------------------------------------------- 1 | 2 | #SRCS:= 3 | #SUBDIRS:= 4 | 5 | include $(TOPDIR)/common.mk 6 | -------------------------------------------------------------------------------- /assets/src/vision/kcf_tracker/Makefile: -------------------------------------------------------------------------------- 1 | 2 | #SRCS:=kcf_tracker.cpp 3 | 4 | include $(TOPDIR)/common.mk 5 | -------------------------------------------------------------------------------- /assets/src/vision/kcf_tracker/fft_tools.h: -------------------------------------------------------------------------------- 1 | #ifndef EVT_FFT_TOOLS_H 2 | #define EVT_FFT_TOOLS_H 3 | 4 | #include "opencv2/core.hpp" 5 | 6 | namespace evt 7 | { 8 | 9 | namespace FFTTools 10 | { 11 | 12 | cv::Mat fftd(cv::Mat img, bool backwards = false); 13 | cv::Mat real(cv::Mat img); 14 | cv::Mat imag(cv::Mat img); 15 | cv::Mat magnitude(cv::Mat img); 16 | cv::Mat complexMultiplication(cv::Mat a, cv::Mat b); 17 | cv::Mat complexDivision(cv::Mat a, cv::Mat b); 18 | void rearrange(cv::Mat& img); 19 | void normalizedLogTransform(cv::Mat& img); 20 | 21 | } // namespace FFTTools 22 | 23 | } // namespace evt 24 | 25 | #endif // EVT_FFT_TOOLS_H 26 | -------------------------------------------------------------------------------- /assets/src/vision/kcf_tracker/kcf_tracker.h: -------------------------------------------------------------------------------- 1 | #ifndef EVT_KCF_TRACKER_H 2 | #define EVT_KCF_TRACKER_H 3 | 4 | #include "opencv2/core.hpp" 5 | 6 | namespace evt 7 | { 8 | 9 | class KCFTracker 10 | { 11 | public: 12 | 13 | KCFTracker(bool useMultiScale = false); 14 | 15 | // 设置追踪模式(单尺度或多尺度) 16 | void enableMultiScale(bool enable); 17 | 18 | // 重新设置初始帧 19 | void reset(); 20 | void reset(const cv::Rect& roi, cv::Mat& image); 21 | 22 | // 初始化追踪器 23 | void init(const cv::Rect& roi, cv::Mat& image); 24 | 25 | // 基于新输入的帧更新位置 26 | cv::Rect update(cv::Mat& image); 27 | 28 | float interp_factor; // 自适应线性插值系数 29 | float sigma; // 高斯核带宽 30 | float lambda; // 正则化参数 31 | 32 | float padding; // 目标扩展区域 33 | float output_sigma_factor; // 高斯目标带宽 34 | int template_size; // 模板大小 35 | float scale_step; // 多尺度估计的尺度调整步长 36 | float scale_weight; // 调整追踪得分的权值以增加稳定性 37 | 38 | protected: 39 | 40 | // 参数初始化 41 | void initVar(); 42 | 43 | // 在当前帧追踪目标 44 | cv::Point2f detect(cv::Mat z, cv::Mat x, float& peak_value); 45 | 46 | // 用当前图像训练追踪器 47 | void train(cv::Mat x, float train_interp_factor); 48 | 49 | // 计算输入的两幅图像之间所有相对位移的高斯核 50 | // 必须是周期性,需用余弦窗口进行预处理 51 | cv::Mat gaussianCorrelation(cv::Mat x1, cv::Mat x2); 52 | 53 | // 在第一帧创建高斯峰值 54 | cv::Mat createGaussianPeak(int sizey, int sizex); 55 | 56 | // 从图像中获取子窗口,使用赋值填充和提取特征 57 | cv::Mat getFeatures(const cv::Mat& image, float scale_adjust = 1.0f, bool inithann = false); 58 | 59 | // 在第一帧初始化汉宁窗,用余弦窗口进行预处理,变成周期信号 60 | void createHanningMats(); 61 | 62 | // 计算一维亚像素峰值 63 | float subPixelPeak(float left, float center, float right); 64 | 65 | cv::Mat _alphaf; // 训练结果 66 | cv::Mat _prob; // 高斯矩阵结果,用于训练 67 | cv::Mat _tmpl; // 保存上一帧模板 68 | 69 | private: 70 | bool _useMultiScale; // 是否使用多尺度 71 | int size_patch[3]; // 子图像大小 72 | cv::Mat hann; 73 | cv::Size _tmpl_sz; 74 | float _scale; 75 | int _gaussian_size; 76 | 77 | cv::Rect_ _roi; 78 | }; 79 | 80 | } // namespace evt 81 | 82 | #endif // EVT_KCF_TRACKER_H 83 | -------------------------------------------------------------------------------- /assets/src/vision/video_device.h: -------------------------------------------------------------------------------- 1 | #ifndef EVT_VIDEO_DEVICE_H 2 | #define EVT_VIDEO_DEVICE_H 3 | 4 | #include 5 | #include 6 | 7 | namespace evt 8 | { 9 | 10 | enum class ImageType 11 | { 12 | BGR, YUYV 13 | }; 14 | 15 | struct Size 16 | { 17 | int width, height; 18 | }; 19 | 20 | struct VideoBuffer; 21 | 22 | class VideoDevice 23 | { 24 | public: 25 | using FetchFrameCallback = std::function; 26 | 27 | VideoDevice(const char* deviceName = "/dev/video0", int bufferCnt = 4, float fps = 15, bool mmap = true); 28 | ~VideoDevice(); 29 | 30 | VideoDevice(const VideoDevice&) = delete; 31 | VideoDevice& operator=(const VideoDevice&) = delete; 32 | 33 | void setFetchFrameCallback(const FetchFrameCallback& cb) 34 | { fetchFrameCallback_ = cb; } 35 | 36 | void start(); 37 | 38 | // 更新读取一帧 39 | int updateFrame(); 40 | 41 | bool isOpened() const { return deviceFd_ >= 0; } 42 | 43 | bool openDevice(); 44 | void closeDevice(); 45 | 46 | // 摄像头参数信息 47 | void dispCapInfo(); 48 | 49 | Size querySize(); 50 | 51 | // 摄像头工作模式 52 | void setFormat(); 53 | void dispFormat(); 54 | 55 | // 视频流参数设置,设定帧率 56 | void setStreamParm(); 57 | 58 | // 图像缓冲区管理 59 | void requestBuffer(); 60 | void releaseBuffer(); 61 | 62 | // 视频流控制 63 | void startStream(); 64 | void stopStream(); 65 | 66 | Size imageSize() const { return imageSize_; } 67 | 68 | private: 69 | 70 | int init(); 71 | void release(); 72 | 73 | std::string deviceName_; 74 | int bufferCnt_; 75 | float fps_; 76 | Size imageSize_; 77 | 78 | int deviceFd_; 79 | VideoBuffer* buffers_; // 图像缓冲 80 | const bool mmap_; 81 | FetchFrameCallback fetchFrameCallback_; 82 | 83 | std::unique_ptr thread_; 84 | bool quit_; 85 | 86 | }; 87 | 88 | 89 | } // namespace evt 90 | 91 | #endif // EVT_VIDEO_DEVICE_H 92 | 93 | -------------------------------------------------------------------------------- /assets/src/vision/yuyv2bgr.cpp: -------------------------------------------------------------------------------- 1 | 2 | namespace evt 3 | { 4 | 5 | namespace 6 | { 7 | 8 | // 查表法 9 | int y_table[256]; 10 | int v_r_table[256]; 11 | int v_g_table[256]; 12 | int u_g_table[256]; 13 | int u_b_table[256]; 14 | 15 | unsigned int limit_table[256 * 3]; 16 | 17 | 18 | void initColorTables(); 19 | 20 | bool onLoad = []() 21 | { 22 | initColorTables(); 23 | return true; 24 | }(); 25 | 26 | inline unsigned int limitToUnsigned8Bits(int value) 27 | { 28 | if (value > 255) 29 | return 255; 30 | else if (value < 0) 31 | return 0; 32 | else 33 | return value; 34 | } 35 | 36 | void initColorTables() 37 | { 38 | for (int i = 0; i <= 255; i++) 39 | { 40 | y_table[i] = (i - 16) * 1192; 41 | v_r_table[i] = (i - 128) * 1634; 42 | v_g_table[i] = (i - 128) * 833; 43 | u_g_table[i] = (i - 128) * 401; 44 | u_b_table[i] = (i - 128) * 2065; 45 | } 46 | for (int i = 0; i < 256 * 3; i++) 47 | { 48 | limit_table[i] = limitToUnsigned8Bits(i - 256); 49 | } 50 | } 51 | 52 | } // namespace 53 | 54 | 55 | void yuyv2bgr(unsigned char* bufferIn, unsigned char* bufferOut, int width, int height) 56 | { 57 | unsigned char y1, u, y2, v; 58 | int size = width * height; 59 | int y1192; 60 | for (int pixel = 0; pixel < size ; pixel += 2) 61 | { 62 | y1 = *bufferIn++; 63 | u = *bufferIn++; 64 | y2 = *bufferIn++; 65 | v = *bufferIn++; 66 | 67 | y1192 = y_table[y1]; 68 | 69 | *bufferOut++ = limit_table[((y1192 + u_b_table[u]) >> 10) + 256]; 70 | *bufferOut++ = limit_table[((y1192 - v_g_table[v] - u_g_table[u]) >> 10) + 256]; 71 | *bufferOut++ = limit_table[((y1192 + v_r_table[v]) >> 10) + 256]; //可能小于0,先取正 72 | 73 | y1192 = y_table[y2]; 74 | *bufferOut++ = limit_table[((y1192 + u_b_table[u]) >> 10) + 256]; 75 | *bufferOut++ = limit_table[((y1192 - v_g_table[v] - u_g_table[u]) >> 10) + 256]; 76 | *bufferOut++ = limit_table[((y1192 + v_r_table[v]) >> 10) + 256]; //可能小于0,先取正 77 | 78 | } 79 | } 80 | 81 | } // namespace evt 82 | -------------------------------------------------------------------------------- /assets/src/vision/yuyv2bgr.h: -------------------------------------------------------------------------------- 1 | #ifndef EVT_YUYV2BGR_H 2 | #define EVT_YUYV2BGR_H 3 | 4 | namespace evt 5 | { 6 | 7 | // 查表法将YUYV图像转换成BGR图像 8 | void yuyv2bgr(unsigned char* bufferIn, unsigned char* bufferOut, int width, int height); 9 | 10 | } // namespace evt 11 | 12 | #endif // EVT_YUYV2BGR_H 13 | -------------------------------------------------------------------------------- /shell/init.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | sleep 3s 4 | #wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B 5 | ifup wlan0 6 | #route add default gw 192.168.5.1 7 | 8 | service hostapd start 9 | service udhcpd start 10 | 11 | insmod /root/share/motor.ko 12 | insmod /root/share/servo.ko 13 | --------------------------------------------------------------------------------