├── .gitattributes ├── .gitignore ├── 01.png ├── CMakeLists.txt ├── PyShareMemory ├── ShareMemory.py ├── __init__.py └── libsharememory.so ├── README.md ├── cpp_src ├── share_memory.cpp └── share_memory.h ├── external └── opencv_build │ ├── bin │ ├── opencv_annotation │ ├── opencv_interactive-calibration │ ├── opencv_model_diagnostics │ ├── opencv_version │ ├── opencv_visualisation │ └── setup_vars_opencv4.sh │ ├── include │ └── opencv4 │ │ └── opencv2 │ │ ├── calib3d.hpp │ │ ├── calib3d │ │ ├── calib3d.hpp │ │ └── calib3d_c.h │ │ ├── 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 │ │ ├── dualquaternion.hpp │ │ ├── dualquaternion.inl.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_rvv.hpp │ │ │ ├── intrin_sse.hpp │ │ │ ├── intrin_sse_em.hpp │ │ │ ├── intrin_vsx.hpp │ │ │ ├── intrin_wasm.hpp │ │ │ ├── msa_macros.h │ │ │ └── simd_utils.impl.hpp │ │ ├── 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 │ │ ├── parallel │ │ │ ├── backend │ │ │ │ ├── parallel_for.openmp.hpp │ │ │ │ └── parallel_for.tbb.hpp │ │ │ └── parallel_backend.hpp │ │ ├── persistence.hpp │ │ ├── quaternion.hpp │ │ ├── quaternion.inl.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 │ │ │ ├── instrumentation.hpp │ │ │ ├── logger.defines.hpp │ │ │ ├── logger.hpp │ │ │ ├── logtag.hpp │ │ │ ├── tls.hpp │ │ │ └── trace.hpp │ │ ├── va_intel.hpp │ │ ├── version.hpp │ │ └── vsx_utils.hpp │ │ ├── cvconfig.h │ │ ├── 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 │ │ ├── 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 │ │ ├── gapi.hpp │ │ ├── gapi │ │ ├── core.hpp │ │ ├── cpu │ │ │ ├── core.hpp │ │ │ ├── gcpukernel.hpp │ │ │ ├── imgproc.hpp │ │ │ ├── stereo.hpp │ │ │ └── video.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 │ │ ├── gframe.hpp │ │ ├── gkernel.hpp │ │ ├── gmat.hpp │ │ ├── gmetaarg.hpp │ │ ├── gopaque.hpp │ │ ├── gproto.hpp │ │ ├── gpu │ │ │ ├── core.hpp │ │ │ ├── ggpukernel.hpp │ │ │ └── imgproc.hpp │ │ ├── gscalar.hpp │ │ ├── gstreaming.hpp │ │ ├── gtransform.hpp │ │ ├── gtype_traits.hpp │ │ ├── gtyped.hpp │ │ ├── imgproc.hpp │ │ ├── infer.hpp │ │ ├── infer │ │ │ ├── bindings_ie.hpp │ │ │ ├── ie.hpp │ │ │ ├── onnx.hpp │ │ │ └── parsers.hpp │ │ ├── media.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 │ │ ├── plaidml │ │ │ ├── core.hpp │ │ │ ├── gplaidmlkernel.hpp │ │ │ └── plaidml.hpp │ │ ├── python │ │ │ └── python.hpp │ │ ├── render.hpp │ │ ├── render │ │ │ ├── render.hpp │ │ │ └── render_types.hpp │ │ ├── rmat.hpp │ │ ├── s11n.hpp │ │ ├── s11n │ │ │ └── base.hpp │ │ ├── stereo.hpp │ │ ├── streaming │ │ │ ├── cap.hpp │ │ │ ├── desync.hpp │ │ │ ├── format.hpp │ │ │ ├── meta.hpp │ │ │ ├── source.hpp │ │ │ └── sync.hpp │ │ ├── util │ │ │ ├── any.hpp │ │ │ ├── compiler_hints.hpp │ │ │ ├── copy_through_move.hpp │ │ │ ├── optional.hpp │ │ │ ├── throw.hpp │ │ │ ├── type_traits.hpp │ │ │ ├── util.hpp │ │ │ └── variant.hpp │ │ └── video.hpp │ │ ├── highgui.hpp │ │ ├── highgui │ │ ├── highgui.hpp │ │ └── highgui_c.h │ │ ├── imgcodecs.hpp │ │ ├── imgcodecs │ │ ├── imgcodecs.hpp │ │ ├── imgcodecs_c.h │ │ ├── ios.h │ │ ├── legacy │ │ │ └── constants_c.h │ │ └── macosx.h │ │ ├── imgproc.hpp │ │ ├── imgproc │ │ ├── bindings.hpp │ │ ├── detail │ │ │ └── gcgraph.hpp │ │ ├── hal │ │ │ ├── hal.hpp │ │ │ └── interface.h │ │ ├── imgproc.hpp │ │ ├── imgproc_c.h │ │ ├── segmentation.hpp │ │ └── types_c.h │ │ ├── ml.hpp │ │ ├── ml │ │ ├── ml.hpp │ │ └── ml.inl.hpp │ │ ├── objdetect.hpp │ │ ├── objdetect │ │ ├── detection_based_tracker.hpp │ │ └── objdetect.hpp │ │ ├── opencv.hpp │ │ ├── opencv_modules.hpp │ │ ├── photo.hpp │ │ ├── photo │ │ ├── cuda.hpp │ │ ├── legacy │ │ │ └── constants_c.h │ │ └── photo.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 │ │ ├── video.hpp │ │ ├── video │ │ ├── background_segm.hpp │ │ ├── detail │ │ │ └── tracking.detail.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 │ ├── lib64 │ ├── cmake │ │ └── opencv4 │ │ │ ├── OpenCVConfig-version.cmake │ │ │ ├── OpenCVConfig.cmake │ │ │ ├── OpenCVModules-release.cmake │ │ │ └── OpenCVModules.cmake │ ├── libopencv_calib3d.so.4.5.2 │ ├── libopencv_core.so.4.5.2 │ ├── libopencv_dnn.so.4.5.2 │ ├── libopencv_features2d.so.4.5.2 │ ├── libopencv_flann.so.4.5.2 │ ├── libopencv_gapi.so.4.5.2 │ ├── libopencv_highgui.so.4.5.2 │ ├── libopencv_imgcodecs.so.4.5.2 │ ├── libopencv_imgproc.so.4.5.2 │ ├── libopencv_ml.so.4.5.2 │ ├── libopencv_objdetect.so.4.5.2 │ ├── libopencv_photo.so.4.5.2 │ ├── libopencv_stitching.so.4.5.2 │ ├── libopencv_video.so.4.5.2 │ └── libopencv_videoio.so.4.5.2 │ └── share │ ├── licenses │ └── opencv4 │ │ ├── SoftFloat-COPYING.txt │ │ ├── ade-LICENSE │ │ ├── ippicv-EULA.txt │ │ ├── ippicv-readme.htm │ │ ├── ippicv-third-party-programs.txt │ │ ├── ippiw-EULA.txt │ │ ├── ippiw-support.txt │ │ ├── ippiw-third-party-programs.txt │ │ ├── ittnotify-LICENSE.BSD │ │ ├── ittnotify-LICENSE.GPL │ │ ├── libjpeg-turbo-LICENSE.md │ │ ├── libjpeg-turbo-README.ijg │ │ ├── libjpeg-turbo-README.md │ │ ├── libopenjp2-LICENSE │ │ ├── libopenjp2-README.md │ │ ├── libtiff-COPYRIGHT │ │ ├── opencl-headers-LICENSE.txt │ │ ├── openexr-AUTHORS.ilmbase │ │ ├── openexr-AUTHORS.openexr │ │ ├── openexr-LICENSE │ │ ├── protobuf-LICENSE │ │ ├── protobuf-README.md │ │ └── quirc-LICENSE │ └── opencv4 │ ├── haarcascades │ ├── haarcascade_eye.xml │ ├── haarcascade_eye_tree_eyeglasses.xml │ ├── haarcascade_frontalcatface.xml │ ├── haarcascade_frontalcatface_extended.xml │ ├── haarcascade_frontalface_alt.xml │ ├── haarcascade_frontalface_alt2.xml │ ├── haarcascade_frontalface_alt_tree.xml │ ├── haarcascade_frontalface_default.xml │ ├── haarcascade_fullbody.xml │ ├── haarcascade_lefteye_2splits.xml │ ├── haarcascade_licence_plate_rus_16stages.xml │ ├── haarcascade_lowerbody.xml │ ├── haarcascade_profileface.xml │ ├── haarcascade_righteye_2splits.xml │ ├── haarcascade_russian_plate_number.xml │ ├── haarcascade_smile.xml │ └── haarcascade_upperbody.xml │ ├── lbpcascades │ ├── lbpcascade_frontalcatface.xml │ ├── lbpcascade_frontalface.xml │ ├── lbpcascade_frontalface_improved.xml │ ├── lbpcascade_profileface.xml │ └── lbpcascade_silverware.xml │ ├── valgrind.supp │ └── valgrind_3rdparty.supp ├── test.cpp └── test.py /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /cmake-build-debug--centos7/ 2 | /.idea/ 3 | /external/ 4 | /build/ 5 | -------------------------------------------------------------------------------- /01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/01.png -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.22) 2 | project(cpp_python) 3 | set(CMAKE_CXX_STANDARD 14) 4 | 5 | #link_directories(external/opencv_build/lib64) 6 | 7 | #include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/opencv_build/include/opencv4) 8 | 9 | #SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${CMAKE_SOURCE_DIR}/external/opencv_build/lib64/cmake") 10 | 11 | find_package(OpenCV REQUIRED) 12 | 13 | 14 | add_executable(cpp_python test.cpp cpp_src/share_memory.cpp cpp_src/share_memory.h) 15 | 16 | add_library(sharememory SHARED cpp_src/share_memory.h cpp_src/share_memory.cpp) 17 | 18 | target_link_directories(cpp_python 19 | PRIVATE OpenCV) 20 | 21 | target_link_libraries(cpp_python ${OpenCV_LIBS}) -------------------------------------------------------------------------------- /PyShareMemory/ShareMemory.py: -------------------------------------------------------------------------------- 1 | import copy 2 | import ctypes 3 | import os 4 | import time 5 | import numpy as np 6 | 7 | print("[Python]: 开始加载共享内存动态库...") 8 | libLoad = ctypes.cdll.LoadLibrary 9 | try: 10 | module_root_path = os.path.dirname(__file__) 11 | share = libLoad(os.path.join(module_root_path, "libsharememory.so")) 12 | print("[Python]: 加载共享内存动态库成功!") 13 | share.get_share_body_address.restype = ctypes.POINTER(ctypes.c_uint8) 14 | except Exception as e: 15 | print("[Python]: 加载共享内存动态库失败!可能是由于没有将 libsharememory.so 放置在PyShareMemory模块目录下!") 16 | print("[Python]: 详细的错误信息-" + str(e)) 17 | exit(1) 18 | 19 | 20 | class ShareMemory(object): 21 | def __init__(self, share_memory_key: int): 22 | share.create_share(share_memory_key) 23 | pass 24 | 25 | def get_share_body_size(self): 26 | return share.get_share_body_size() 27 | 28 | """ 29 | 从共享内存中获取数据 30 | """ 31 | def get_data(self): 32 | share_body_ptr = share.get_share_body_address() 33 | py_data_recv = ctypes.cast(share_body_ptr, ctypes.POINTER(ctypes.c_uint8 * self.get_share_body_size())).contents 34 | self.set_share_can_write() 35 | # 数据转化成numpy数组 36 | # return np.array(py_data_recv, dtype=np.uint8) 37 | return py_data_recv 38 | 39 | """ 40 | 向共享内存中写入数据 41 | """ 42 | def put_data(self, data): 43 | share.put_body(data.ctypes.data_as(ctypes.c_char_p)) 44 | # 读取完成 45 | share.set_flag_can_write() 46 | 47 | """ 48 | 获取共享内存里图片高 49 | """ 50 | def get_height(self): 51 | return share.get_img_rows() 52 | 53 | """ 54 | 获取共享内存里图片宽 55 | """ 56 | def get_width(self): 57 | return share.get_img_cols() 58 | 59 | """ 60 | 设置内存状态为可写入 61 | """ 62 | def set_share_can_write(self): 63 | share.set_flag_can_write() 64 | 65 | """ 66 | 获取内存状态 67 | """ 68 | def get_share_status(self): 69 | return share.flag_status() 70 | 71 | """ 72 | 销毁共享内存 73 | """ 74 | def destroy_share(self): 75 | share.destroy_share() 76 | pass 77 | -------------------------------------------------------------------------------- /PyShareMemory/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/PyShareMemory/__init__.py -------------------------------------------------------------------------------- /PyShareMemory/libsharememory.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/PyShareMemory/libsharememory.so -------------------------------------------------------------------------------- /external/opencv_build/bin/opencv_annotation: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/bin/opencv_annotation -------------------------------------------------------------------------------- /external/opencv_build/bin/opencv_interactive-calibration: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/bin/opencv_interactive-calibration -------------------------------------------------------------------------------- /external/opencv_build/bin/opencv_model_diagnostics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/bin/opencv_model_diagnostics -------------------------------------------------------------------------------- /external/opencv_build/bin/opencv_version: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/bin/opencv_version -------------------------------------------------------------------------------- /external/opencv_build/bin/opencv_visualisation: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/bin/opencv_visualisation -------------------------------------------------------------------------------- /external/opencv_build/bin/setup_vars_opencv4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" 4 | 5 | [[ ! "${OPENCV_QUIET}" ]] && ( echo "Setting vars for OpenCV 4.5.2-dev" ) 6 | export LD_LIBRARY_PATH="$SCRIPT_DIR/../lib64:$LD_LIBRARY_PATH" 7 | 8 | if [[ ! "$OPENCV_SKIP_PYTHON" ]]; then 9 | PYTHONPATH_OPENCV="$SCRIPT_DIR/python_loader_is_not_installed" 10 | [[ ! "${OPENCV_QUIET}" ]] && ( echo "Append PYTHONPATH: ${PYTHONPATH_OPENCV}" ) 11 | export PYTHONPATH="${PYTHONPATH_OPENCV}:$PYTHONPATH" 12 | fi 13 | 14 | # Don't exec in "sourced" mode 15 | if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then 16 | if [[ $# -ne 0 ]]; then 17 | [[ ! "${OPENCV_QUIET}" && "${OPENCV_VERBOSE}" ]] && ( echo "Executing: $*" ) 18 | exec "$@" 19 | fi 20 | fi 21 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/calib3d/calib3d.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/calib3d.hpp" 49 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/async.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_HPP 6 | #define OPENCV_CORE_ASYNC_HPP 7 | 8 | #include 9 | 10 | #ifdef CV_CXX11 11 | //#include 12 | #include 13 | #endif 14 | 15 | namespace cv { 16 | 17 | /** @addtogroup core_async 18 | 19 | @{ 20 | */ 21 | 22 | 23 | /** @brief Returns result of asynchronous operations 24 | 25 | Object has attached asynchronous state. 26 | Assignment operator doesn't clone asynchronous state (it is shared between all instances). 27 | 28 | Result can be fetched via get() method only once. 29 | 30 | */ 31 | class CV_EXPORTS_W AsyncArray 32 | { 33 | public: 34 | ~AsyncArray() CV_NOEXCEPT; 35 | CV_WRAP AsyncArray() CV_NOEXCEPT; 36 | AsyncArray(const AsyncArray& o) CV_NOEXCEPT; 37 | AsyncArray& operator=(const AsyncArray& o) CV_NOEXCEPT; 38 | CV_WRAP void release() CV_NOEXCEPT; 39 | 40 | /** Fetch the result. 41 | @param[out] dst destination array 42 | 43 | Waits for result until container has valid result. 44 | Throws exception if exception was stored as a result. 45 | 46 | Throws exception on invalid container state. 47 | 48 | @note Result or stored exception can be fetched only once. 49 | */ 50 | CV_WRAP void get(OutputArray dst) const; 51 | 52 | /** Retrieving the result with timeout 53 | @param[out] dst destination array 54 | @param[in] timeoutNs timeout in nanoseconds, -1 for infinite wait 55 | 56 | @returns true if result is ready, false if the timeout has expired 57 | 58 | @note Result or stored exception can be fetched only once. 59 | */ 60 | bool get(OutputArray dst, int64 timeoutNs) const; 61 | 62 | CV_WRAP inline 63 | bool get(OutputArray dst, double timeoutNs) const { return get(dst, (int64)timeoutNs); } 64 | 65 | bool wait_for(int64 timeoutNs) const; 66 | 67 | CV_WRAP inline 68 | bool wait_for(double timeoutNs) const { return wait_for((int64)timeoutNs); } 69 | 70 | CV_WRAP bool valid() const CV_NOEXCEPT; 71 | 72 | #ifdef CV_CXX11 73 | inline AsyncArray(AsyncArray&& o) { p = o.p; o.p = NULL; } 74 | inline AsyncArray& operator=(AsyncArray&& o) CV_NOEXCEPT { std::swap(p, o.p); return *this; } 75 | 76 | template 77 | inline bool get(OutputArray dst, const std::chrono::duration<_Rep, _Period>& timeout) 78 | { 79 | return get(dst, (int64)(std::chrono::nanoseconds(timeout).count())); 80 | } 81 | 82 | template 83 | inline bool wait_for(const std::chrono::duration<_Rep, _Period>& timeout) 84 | { 85 | return wait_for((int64)(std::chrono::nanoseconds(timeout).count())); 86 | } 87 | 88 | #if 0 89 | std::future getFutureMat() const; 90 | std::future getFutureUMat() const; 91 | #endif 92 | #endif 93 | 94 | 95 | // PImpl 96 | struct Impl; friend struct Impl; 97 | inline void* _getImpl() const CV_NOEXCEPT { return p; } 98 | protected: 99 | Impl* p; 100 | }; 101 | 102 | 103 | //! @} 104 | } // namespace 105 | #endif // OPENCV_CORE_ASYNC_HPP 106 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/core.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/core.hpp" 49 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/ocl_genbase.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of the copyright holders may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef OPENCV_OPENCL_GENBASE_HPP 43 | #define OPENCV_OPENCL_GENBASE_HPP 44 | 45 | //! @cond IGNORED 46 | 47 | namespace cv { 48 | namespace ocl { 49 | 50 | class ProgramSource; 51 | 52 | namespace internal { 53 | 54 | struct CV_EXPORTS ProgramEntry 55 | { 56 | const char* module; 57 | const char* name; 58 | const char* programCode; 59 | const char* programHash; 60 | ProgramSource* pProgramSource; 61 | 62 | operator ProgramSource& () const; 63 | }; 64 | 65 | } } } // namespace 66 | 67 | //! @endcond 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/opencl/opencl_svm.hpp: -------------------------------------------------------------------------------- 1 | /* See LICENSE file in the root OpenCV directory */ 2 | 3 | #ifndef OPENCV_CORE_OPENCL_SVM_HPP 4 | #define OPENCV_CORE_OPENCL_SVM_HPP 5 | 6 | // 7 | // Internal usage only (binary compatibility is not guaranteed) 8 | // 9 | #ifndef __OPENCV_BUILD 10 | #error Internal header file 11 | #endif 12 | 13 | #if defined(HAVE_OPENCL) && defined(HAVE_OPENCL_SVM) 14 | #include "runtime/opencl_core.hpp" 15 | #include "runtime/opencl_svm_20.hpp" 16 | #include "runtime/opencl_svm_hsa_extension.hpp" 17 | 18 | namespace cv { namespace ocl { namespace svm { 19 | 20 | struct SVMCapabilities 21 | { 22 | enum Value 23 | { 24 | SVM_COARSE_GRAIN_BUFFER = (1 << 0), 25 | SVM_FINE_GRAIN_BUFFER = (1 << 1), 26 | SVM_FINE_GRAIN_SYSTEM = (1 << 2), 27 | SVM_ATOMICS = (1 << 3), 28 | }; 29 | int value_; 30 | 31 | SVMCapabilities(int capabilities = 0) : value_(capabilities) { } 32 | operator int() const { return value_; } 33 | 34 | inline bool isNoSVMSupport() const { return value_ == 0; } 35 | inline bool isSupportCoarseGrainBuffer() const { return (value_ & SVM_COARSE_GRAIN_BUFFER) != 0; } 36 | inline bool isSupportFineGrainBuffer() const { return (value_ & SVM_FINE_GRAIN_BUFFER) != 0; } 37 | inline bool isSupportFineGrainSystem() const { return (value_ & SVM_FINE_GRAIN_SYSTEM) != 0; } 38 | inline bool isSupportAtomics() const { return (value_ & SVM_ATOMICS) != 0; } 39 | }; 40 | 41 | CV_EXPORTS const SVMCapabilities getSVMCapabilitites(const ocl::Context& context); 42 | 43 | struct SVMFunctions 44 | { 45 | clSVMAllocAMD_fn fn_clSVMAlloc; 46 | clSVMFreeAMD_fn fn_clSVMFree; 47 | clSetKernelArgSVMPointerAMD_fn fn_clSetKernelArgSVMPointer; 48 | //clSetKernelExecInfoAMD_fn fn_clSetKernelExecInfo; 49 | //clEnqueueSVMFreeAMD_fn fn_clEnqueueSVMFree; 50 | clEnqueueSVMMemcpyAMD_fn fn_clEnqueueSVMMemcpy; 51 | clEnqueueSVMMemFillAMD_fn fn_clEnqueueSVMMemFill; 52 | clEnqueueSVMMapAMD_fn fn_clEnqueueSVMMap; 53 | clEnqueueSVMUnmapAMD_fn fn_clEnqueueSVMUnmap; 54 | 55 | inline SVMFunctions() 56 | : fn_clSVMAlloc(NULL), fn_clSVMFree(NULL), 57 | fn_clSetKernelArgSVMPointer(NULL), /*fn_clSetKernelExecInfo(NULL),*/ 58 | /*fn_clEnqueueSVMFree(NULL),*/ fn_clEnqueueSVMMemcpy(NULL), fn_clEnqueueSVMMemFill(NULL), 59 | fn_clEnqueueSVMMap(NULL), fn_clEnqueueSVMUnmap(NULL) 60 | { 61 | // nothing 62 | } 63 | 64 | inline bool isValid() const 65 | { 66 | return fn_clSVMAlloc != NULL && fn_clSVMFree && fn_clSetKernelArgSVMPointer && 67 | /*fn_clSetKernelExecInfo && fn_clEnqueueSVMFree &&*/ fn_clEnqueueSVMMemcpy && 68 | fn_clEnqueueSVMMemFill && fn_clEnqueueSVMMap && fn_clEnqueueSVMUnmap; 69 | } 70 | }; 71 | 72 | // We should guarantee that SVMFunctions lifetime is not less than context's lifetime 73 | CV_EXPORTS const SVMFunctions* getSVMFunctions(const ocl::Context& context); 74 | 75 | CV_EXPORTS bool useSVM(UMatUsageFlags usageFlags); 76 | 77 | }}} //namespace cv::ocl::svm 78 | #endif 79 | 80 | #endif // OPENCV_CORE_OPENCL_SVM_HPP 81 | /* End of file. */ 82 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/opencl/runtime/autogenerated/opencl_gl.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // AUTOGENERATED, DO NOT EDIT 3 | // 4 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_HPP 5 | #error "Invalid usage" 6 | #endif 7 | 8 | // generated by parser_cl.py 9 | #define clCreateFromGLBuffer clCreateFromGLBuffer_ 10 | #define clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer_ 11 | #define clCreateFromGLTexture clCreateFromGLTexture_ 12 | #define clCreateFromGLTexture2D clCreateFromGLTexture2D_ 13 | #define clCreateFromGLTexture3D clCreateFromGLTexture3D_ 14 | #define clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects_ 15 | #define clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects_ 16 | #define clGetGLContextInfoKHR clGetGLContextInfoKHR_ 17 | #define clGetGLObjectInfo clGetGLObjectInfo_ 18 | #define clGetGLTextureInfo clGetGLTextureInfo_ 19 | 20 | #if defined __APPLE__ 21 | #include 22 | #else 23 | #include 24 | #endif 25 | 26 | // generated by parser_cl.py 27 | #undef clCreateFromGLBuffer 28 | #define clCreateFromGLBuffer clCreateFromGLBuffer_pfn 29 | #undef clCreateFromGLRenderbuffer 30 | #define clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer_pfn 31 | #undef clCreateFromGLTexture 32 | #define clCreateFromGLTexture clCreateFromGLTexture_pfn 33 | #undef clCreateFromGLTexture2D 34 | #define clCreateFromGLTexture2D clCreateFromGLTexture2D_pfn 35 | #undef clCreateFromGLTexture3D 36 | #define clCreateFromGLTexture3D clCreateFromGLTexture3D_pfn 37 | #undef clEnqueueAcquireGLObjects 38 | #define clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects_pfn 39 | #undef clEnqueueReleaseGLObjects 40 | #define clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects_pfn 41 | #undef clGetGLContextInfoKHR 42 | #define clGetGLContextInfoKHR clGetGLContextInfoKHR_pfn 43 | #undef clGetGLObjectInfo 44 | #define clGetGLObjectInfo clGetGLObjectInfo_pfn 45 | #undef clGetGLTextureInfo 46 | #define clGetGLTextureInfo clGetGLTextureInfo_pfn 47 | 48 | #ifdef cl_khr_gl_sharing 49 | 50 | // generated by parser_cl.py 51 | extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLBuffer)(cl_context, cl_mem_flags, cl_GLuint, int*); 52 | extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLRenderbuffer)(cl_context, cl_mem_flags, cl_GLuint, cl_int*); 53 | extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLTexture)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*); 54 | extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLTexture2D)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*); 55 | extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLTexture3D)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*); 56 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueAcquireGLObjects)(cl_command_queue, cl_uint, const cl_mem*, cl_uint, const cl_event*, cl_event*); 57 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueReleaseGLObjects)(cl_command_queue, cl_uint, const cl_mem*, cl_uint, const cl_event*, cl_event*); 58 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetGLContextInfoKHR)(const cl_context_properties*, cl_gl_context_info, size_t, void*, size_t*); 59 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetGLObjectInfo)(cl_mem, cl_gl_object_type*, cl_GLuint*); 60 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetGLTextureInfo)(cl_mem, cl_gl_texture_info, size_t, void*, size_t*); 61 | 62 | #endif // cl_khr_gl_sharing 63 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/opencl/runtime/autogenerated/opencl_gl_wrappers.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // AUTOGENERATED, DO NOT EDIT 3 | // 4 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP 5 | #error "Invalid usage" 6 | #endif 7 | 8 | #ifdef cl_khr_gl_sharing 9 | 10 | // generated by parser_cl.py 11 | #undef clCreateFromGLBuffer 12 | #define clCreateFromGLBuffer clCreateFromGLBuffer_fn 13 | inline cl_mem clCreateFromGLBuffer(cl_context p0, cl_mem_flags p1, cl_GLuint p2, int* p3) { return clCreateFromGLBuffer_pfn(p0, p1, p2, p3); } 14 | #undef clCreateFromGLRenderbuffer 15 | #define clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer_fn 16 | inline cl_mem clCreateFromGLRenderbuffer(cl_context p0, cl_mem_flags p1, cl_GLuint p2, cl_int* p3) { return clCreateFromGLRenderbuffer_pfn(p0, p1, p2, p3); } 17 | #undef clCreateFromGLTexture 18 | #define clCreateFromGLTexture clCreateFromGLTexture_fn 19 | inline cl_mem clCreateFromGLTexture(cl_context p0, cl_mem_flags p1, cl_GLenum p2, cl_GLint p3, cl_GLuint p4, cl_int* p5) { return clCreateFromGLTexture_pfn(p0, p1, p2, p3, p4, p5); } 20 | #undef clCreateFromGLTexture2D 21 | #define clCreateFromGLTexture2D clCreateFromGLTexture2D_fn 22 | inline cl_mem clCreateFromGLTexture2D(cl_context p0, cl_mem_flags p1, cl_GLenum p2, cl_GLint p3, cl_GLuint p4, cl_int* p5) { return clCreateFromGLTexture2D_pfn(p0, p1, p2, p3, p4, p5); } 23 | #undef clCreateFromGLTexture3D 24 | #define clCreateFromGLTexture3D clCreateFromGLTexture3D_fn 25 | inline cl_mem clCreateFromGLTexture3D(cl_context p0, cl_mem_flags p1, cl_GLenum p2, cl_GLint p3, cl_GLuint p4, cl_int* p5) { return clCreateFromGLTexture3D_pfn(p0, p1, p2, p3, p4, p5); } 26 | #undef clEnqueueAcquireGLObjects 27 | #define clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects_fn 28 | inline cl_int clEnqueueAcquireGLObjects(cl_command_queue p0, cl_uint p1, const cl_mem* p2, cl_uint p3, const cl_event* p4, cl_event* p5) { return clEnqueueAcquireGLObjects_pfn(p0, p1, p2, p3, p4, p5); } 29 | #undef clEnqueueReleaseGLObjects 30 | #define clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects_fn 31 | inline cl_int clEnqueueReleaseGLObjects(cl_command_queue p0, cl_uint p1, const cl_mem* p2, cl_uint p3, const cl_event* p4, cl_event* p5) { return clEnqueueReleaseGLObjects_pfn(p0, p1, p2, p3, p4, p5); } 32 | #undef clGetGLContextInfoKHR 33 | #define clGetGLContextInfoKHR clGetGLContextInfoKHR_fn 34 | inline cl_int clGetGLContextInfoKHR(const cl_context_properties* p0, cl_gl_context_info p1, size_t p2, void* p3, size_t* p4) { return clGetGLContextInfoKHR_pfn(p0, p1, p2, p3, p4); } 35 | #undef clGetGLObjectInfo 36 | #define clGetGLObjectInfo clGetGLObjectInfo_fn 37 | inline cl_int clGetGLObjectInfo(cl_mem p0, cl_gl_object_type* p1, cl_GLuint* p2) { return clGetGLObjectInfo_pfn(p0, p1, p2); } 38 | #undef clGetGLTextureInfo 39 | #define clGetGLTextureInfo clGetGLTextureInfo_fn 40 | inline cl_int clGetGLTextureInfo(cl_mem p0, cl_gl_texture_info p1, size_t p2, void* p3, size_t* p4) { return clGetGLTextureInfo_pfn(p0, p1, p2, p3, p4); } 41 | 42 | #endif // cl_khr_gl_sharing 43 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/opencl/runtime/opencl_clamdblas.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of the copyright holders may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef OPENCV_CORE_OCL_RUNTIME_CLAMDBLAS_HPP 43 | #define OPENCV_CORE_OCL_RUNTIME_CLAMDBLAS_HPP 44 | 45 | #ifdef HAVE_CLAMDBLAS 46 | 47 | #include "opencl_core.hpp" 48 | 49 | #include "autogenerated/opencl_clamdblas.hpp" 50 | 51 | #endif // HAVE_CLAMDBLAS 52 | 53 | #endif // OPENCV_CORE_OCL_RUNTIME_CLAMDBLAS_HPP 54 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/opencl/runtime/opencl_clamdfft.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of the copyright holders may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef OPENCV_CORE_OCL_RUNTIME_CLAMDFFT_HPP 43 | #define OPENCV_CORE_OCL_RUNTIME_CLAMDFFT_HPP 44 | 45 | #ifdef HAVE_CLAMDFFT 46 | 47 | #include "opencl_core.hpp" 48 | 49 | #include "autogenerated/opencl_clamdfft.hpp" 50 | 51 | #endif // HAVE_CLAMDFFT 52 | 53 | #endif // OPENCV_CORE_OCL_RUNTIME_CLAMDFFT_HPP 54 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/opencl/runtime/opencl_core_wrappers.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of the copyright holders may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP 43 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP 44 | 45 | #include "autogenerated/opencl_core_wrappers.hpp" 46 | 47 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP 48 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/opencl/runtime/opencl_gl.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of the copyright holders may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_HPP 43 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_HPP 44 | 45 | #if defined HAVE_OPENCL && defined HAVE_OPENGL 46 | 47 | #include "opencl_core.hpp" 48 | 49 | #include "autogenerated/opencl_gl.hpp" 50 | 51 | #endif // defined HAVE_OPENCL && defined HAVE_OPENGL 52 | 53 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_HPP 54 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/opencl/runtime/opencl_gl_wrappers.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of the copyright holders may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP 43 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP 44 | 45 | #include "autogenerated/opencl_gl_wrappers.hpp" 46 | 47 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP 48 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/opencl/runtime/opencl_svm_20.hpp: -------------------------------------------------------------------------------- 1 | /* See LICENSE file in the root OpenCV directory */ 2 | 3 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_2_0_HPP 4 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_2_0_HPP 5 | 6 | #if defined(HAVE_OPENCL_SVM) 7 | #include "opencl_core.hpp" 8 | 9 | #include "opencl_svm_definitions.hpp" 10 | 11 | #undef clSVMAlloc 12 | #define clSVMAlloc clSVMAlloc_pfn 13 | #undef clSVMFree 14 | #define clSVMFree clSVMFree_pfn 15 | #undef clSetKernelArgSVMPointer 16 | #define clSetKernelArgSVMPointer clSetKernelArgSVMPointer_pfn 17 | #undef clSetKernelExecInfo 18 | //#define clSetKernelExecInfo clSetKernelExecInfo_pfn 19 | #undef clEnqueueSVMFree 20 | //#define clEnqueueSVMFree clEnqueueSVMFree_pfn 21 | #undef clEnqueueSVMMemcpy 22 | #define clEnqueueSVMMemcpy clEnqueueSVMMemcpy_pfn 23 | #undef clEnqueueSVMMemFill 24 | #define clEnqueueSVMMemFill clEnqueueSVMMemFill_pfn 25 | #undef clEnqueueSVMMap 26 | #define clEnqueueSVMMap clEnqueueSVMMap_pfn 27 | #undef clEnqueueSVMUnmap 28 | #define clEnqueueSVMUnmap clEnqueueSVMUnmap_pfn 29 | 30 | extern CL_RUNTIME_EXPORT void* (CL_API_CALL *clSVMAlloc)(cl_context context, cl_svm_mem_flags flags, size_t size, unsigned int alignment); 31 | extern CL_RUNTIME_EXPORT void (CL_API_CALL *clSVMFree)(cl_context context, void* svm_pointer); 32 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clSetKernelArgSVMPointer)(cl_kernel kernel, cl_uint arg_index, const void* arg_value); 33 | //extern CL_RUNTIME_EXPORT void* (CL_API_CALL *clSetKernelExecInfo)(cl_kernel kernel, cl_kernel_exec_info param_name, size_t param_value_size, const void* param_value); 34 | //extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMFree)(cl_command_queue command_queue, cl_uint num_svm_pointers, void* svm_pointers[], 35 | // void (CL_CALLBACK *pfn_free_func)(cl_command_queue queue, cl_uint num_svm_pointers, void* svm_pointers[], void* user_data), void* user_data, 36 | // cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event); 37 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMMemcpy)(cl_command_queue command_queue, cl_bool blocking_copy, void* dst_ptr, const void* src_ptr, size_t size, 38 | cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event); 39 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMMemFill)(cl_command_queue command_queue, void* svm_ptr, const void* pattern, size_t pattern_size, size_t size, 40 | cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event); 41 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMMap)(cl_command_queue command_queue, cl_bool blocking_map, cl_map_flags map_flags, void* svm_ptr, size_t size, 42 | cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event); 43 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMUnmap)(cl_command_queue command_queue, void* svm_ptr, 44 | cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event); 45 | 46 | #endif // HAVE_OPENCL_SVM 47 | 48 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_2_0_HPP 49 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/parallel/backend/parallel_for.openmp.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_PARALLEL_FOR_OPENMP_HPP 6 | #define OPENCV_CORE_PARALLEL_FOR_OPENMP_HPP 7 | 8 | #include "opencv2/core/parallel/parallel_backend.hpp" 9 | 10 | #if !defined(_OPENMP) && !defined(OPENCV_SKIP_OPENMP_PRESENSE_CHECK) 11 | #error "This file must be compiled with enabled OpenMP" 12 | #endif 13 | 14 | #include 15 | 16 | namespace cv { namespace parallel { namespace openmp { 17 | 18 | /** OpenMP parallel_for API implementation 19 | * 20 | * @sa setParallelForBackend 21 | * @ingroup core_parallel_backend 22 | */ 23 | class ParallelForBackend : public ParallelForAPI 24 | { 25 | protected: 26 | int numThreads; 27 | int numThreadsMax; 28 | public: 29 | ParallelForBackend() 30 | { 31 | numThreads = 0; 32 | numThreadsMax = omp_get_max_threads(); 33 | } 34 | 35 | virtual ~ParallelForBackend() {} 36 | 37 | virtual void parallel_for(int tasks, FN_parallel_for_body_cb_t body_callback, void* callback_data) CV_OVERRIDE 38 | { 39 | #pragma omp parallel for schedule(dynamic) num_threads(numThreads > 0 ? numThreads : numThreadsMax) 40 | for (int i = 0; i < tasks; ++i) 41 | body_callback(i, i + 1, callback_data); 42 | } 43 | 44 | virtual int getThreadNum() const CV_OVERRIDE 45 | { 46 | return omp_get_thread_num(); 47 | } 48 | 49 | virtual int getNumThreads() const CV_OVERRIDE 50 | { 51 | return numThreads > 0 52 | ? numThreads 53 | : numThreadsMax; 54 | } 55 | 56 | virtual int setNumThreads(int nThreads) CV_OVERRIDE 57 | { 58 | int oldNumThreads = numThreads; 59 | numThreads = nThreads; 60 | // nothing needed as numThreads is used in #pragma omp parallel for directly 61 | return oldNumThreads; 62 | } 63 | 64 | const char* getName() const CV_OVERRIDE 65 | { 66 | return "openmp"; 67 | } 68 | }; 69 | 70 | }}} // namespace 71 | 72 | #endif // OPENCV_CORE_PARALLEL_FOR_OPENMP_HPP 73 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/simd_intrinsics.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_SIMD_INTRINSICS_HPP 6 | #define OPENCV_CORE_SIMD_INTRINSICS_HPP 7 | 8 | /** 9 | Helper header to support SIMD intrinsics (universal intrinsics) in user code. 10 | Intrinsics documentation: https://docs.opencv.org/master/df/d91/group__core__hal__intrin.html 11 | 12 | 13 | Checks of target CPU instruction set based on compiler definitions don't work well enough. 14 | More reliable solutions require utilization of configuration systems (like CMake). 15 | 16 | So, probably you need to specify your own configuration. 17 | 18 | You can do that via CMake in this way: 19 | add_definitions(/DOPENCV_SIMD_CONFIG_HEADER=opencv_simd_config_custom.hpp) 20 | or 21 | add_definitions(/DOPENCV_SIMD_CONFIG_INCLUDE_DIR=1) 22 | 23 | Additionally you may need to add include directory to your files: 24 | include_directories("${CMAKE_CURRENT_LIST_DIR}/opencv_config_${MYTARGET}") 25 | 26 | These files can be pre-generated for target configurations of your application 27 | or generated by CMake on the fly (use CMAKE_BINARY_DIR for that). 28 | 29 | Notes: 30 | - H/W capability checks are still responsibility of your application 31 | - runtime dispatching is not covered by this helper header 32 | */ 33 | 34 | #ifdef __OPENCV_BUILD 35 | #error "Use core/hal/intrin.hpp during OpenCV build" 36 | #endif 37 | 38 | #ifdef OPENCV_HAL_INTRIN_HPP 39 | #error "core/simd_intrinsics.hpp must be included before core/hal/intrin.hpp" 40 | #endif 41 | 42 | #include "opencv2/core/cvdef.h" 43 | 44 | #ifdef OPENCV_SIMD_CONFIG_HEADER 45 | #include CVAUX_STR(OPENCV_SIMD_CONFIG_HEADER) 46 | #elif defined(OPENCV_SIMD_CONFIG_INCLUDE_DIR) 47 | #include "opencv_simd_config.hpp" // corresponding directory should be added via -I compiler parameter 48 | #else // custom config headers 49 | 50 | #if (!defined(CV_AVX_512F) || !CV_AVX_512F) && (defined(__AVX512__) || defined(__AVX512F__)) 51 | # include 52 | # undef CV_AVX_512F 53 | # define CV_AVX_512F 1 54 | # ifndef OPENCV_SIMD_DONT_ASSUME_SKX // Skylake-X with AVX-512F/CD/BW/DQ/VL 55 | # undef CV_AVX512_SKX 56 | # define CV_AVX512_SKX 1 57 | # undef CV_AVX_512CD 58 | # define CV_AVX_512CD 1 59 | # undef CV_AVX_512BW 60 | # define CV_AVX_512BW 1 61 | # undef CV_AVX_512DQ 62 | # define CV_AVX_512DQ 1 63 | # undef CV_AVX_512VL 64 | # define CV_AVX_512VL 1 65 | # endif 66 | #endif // AVX512 67 | 68 | // GCC/Clang: -mavx2 69 | // MSVC: /arch:AVX2 70 | #if defined __AVX2__ 71 | # include 72 | # undef CV_AVX2 73 | # define CV_AVX2 1 74 | # if defined __F16C__ 75 | # undef CV_FP16 76 | # define CV_FP16 1 77 | # endif 78 | #endif 79 | 80 | #endif 81 | 82 | // SSE / NEON / VSX is handled by cv_cpu_dispatch.h compatibility block 83 | #include "cv_cpu_dispatch.h" 84 | 85 | #include "hal/intrin.hpp" 86 | 87 | #endif // OPENCV_CORE_SIMD_INTRINSICS_HPP 88 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/core/va_intel.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) 2015, Itseez, Inc., all rights reserved. 6 | // Third party copyrights are property of their respective owners. 7 | 8 | #ifndef OPENCV_CORE_VA_INTEL_HPP 9 | #define OPENCV_CORE_VA_INTEL_HPP 10 | 11 | #ifndef __cplusplus 12 | # error va_intel.hpp header must be compiled as C++ 13 | #endif 14 | 15 | #include "opencv2/core.hpp" 16 | #include "ocl.hpp" 17 | 18 | #if defined(HAVE_VA) 19 | # include "va/va.h" 20 | #else // HAVE_VA 21 | # if !defined(_VA_H_) 22 | typedef void* VADisplay; 23 | typedef unsigned int VASurfaceID; 24 | # endif // !_VA_H_ 25 | #endif // HAVE_VA 26 | 27 | namespace cv { namespace va_intel { 28 | 29 | /** @addtogroup core_va_intel 30 | This section describes Intel VA-API/OpenCL (CL-VA) interoperability. 31 | 32 | To enable basic VA interoperability build OpenCV with libva library integration enabled: `-DWITH_VA=ON` (corresponding dev package should be installed). 33 | 34 | To enable advanced CL-VA interoperability support on Intel HW, enable option: `-DWITH_VA_INTEL=ON` (OpenCL integration should be enabled which is the default setting). Special runtime environment should be set up in order to use this feature: correct combination of [libva](https://github.com/intel/libva), [OpenCL runtime](https://github.com/intel/compute-runtime) and [media driver](https://github.com/intel/media-driver) should be installed. 35 | 36 | Check usage example for details: samples/va_intel/va_intel_interop.cpp 37 | */ 38 | //! @{ 39 | 40 | /////////////////// CL-VA Interoperability Functions /////////////////// 41 | 42 | namespace ocl { 43 | using namespace cv::ocl; 44 | 45 | // TODO static functions in the Context class 46 | /** @brief Creates OpenCL context from VA. 47 | @param display - VADisplay for which CL interop should be established. 48 | @param tryInterop - try to set up for interoperability, if true; set up for use slow copy if false. 49 | @return Returns reference to OpenCL Context 50 | */ 51 | CV_EXPORTS Context& initializeContextFromVA(VADisplay display, bool tryInterop = true); 52 | 53 | } // namespace cv::va_intel::ocl 54 | 55 | /** @brief Converts InputArray to VASurfaceID object. 56 | @param display - VADisplay object. 57 | @param src - source InputArray. 58 | @param surface - destination VASurfaceID object. 59 | @param size - size of image represented by VASurfaceID object. 60 | */ 61 | CV_EXPORTS void convertToVASurface(VADisplay display, InputArray src, VASurfaceID surface, Size size); 62 | 63 | /** @brief Converts VASurfaceID object to OutputArray. 64 | @param display - VADisplay object. 65 | @param surface - source VASurfaceID object. 66 | @param size - size of image represented by VASurfaceID object. 67 | @param dst - destination OutputArray. 68 | */ 69 | CV_EXPORTS void convertFromVASurface(VADisplay display, VASurfaceID surface, Size size, OutputArray dst); 70 | 71 | //! @} 72 | 73 | }} // namespace cv::va_intel 74 | 75 | #endif /* OPENCV_CORE_VA_INTEL_HPP */ 76 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 5 10 | #define CV_VERSION_REVISION 2 11 | #define CV_VERSION_STATUS "-dev" 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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/dnn/layer.details.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_LAYER_DETAILS_HPP 6 | #define OPENCV_DNN_LAYER_DETAILS_HPP 7 | 8 | #include 9 | 10 | namespace cv { 11 | namespace dnn { 12 | CV__DNN_INLINE_NS_BEGIN 13 | 14 | /** @brief Registers layer constructor in runtime. 15 | * @param type string, containing type name of the layer. 16 | * @param constructorFunc pointer to the function of type LayerRegister::Constructor, which creates the layer. 17 | * @details This macros must be placed inside the function code. 18 | */ 19 | #define CV_DNN_REGISTER_LAYER_FUNC(type, constructorFunc) \ 20 | cv::dnn::LayerFactory::registerLayer(#type, constructorFunc); 21 | 22 | /** @brief Registers layer class in runtime. 23 | * @param type string, containing type name of the layer. 24 | * @param class C++ class, derived from Layer. 25 | * @details This macros must be placed inside the function code. 26 | */ 27 | #define CV_DNN_REGISTER_LAYER_CLASS(type, class) \ 28 | cv::dnn::LayerFactory::registerLayer(#type, cv::dnn::details::_layerDynamicRegisterer); 29 | 30 | /** @brief Registers layer constructor on module load time. 31 | * @param type string, containing type name of the layer. 32 | * @param constructorFunc pointer to the function of type LayerRegister::Constructor, which creates the layer. 33 | * @details This macros must be placed outside the function code. 34 | */ 35 | #define CV_DNN_REGISTER_LAYER_FUNC_STATIC(type, constructorFunc) \ 36 | static cv::dnn::details::_LayerStaticRegisterer __LayerStaticRegisterer_##type(#type, constructorFunc); 37 | 38 | /** @brief Registers layer class on module load time. 39 | * @param type string, containing type name of the layer. 40 | * @param class C++ class, derived from Layer. 41 | * @details This macros must be placed outside the function code. 42 | */ 43 | #define CV_DNN_REGISTER_LAYER_CLASS_STATIC(type, class) \ 44 | Ptr __LayerStaticRegisterer_func_##type(LayerParams ¶ms) \ 45 | { return Ptr(new class(params)); } \ 46 | static cv::dnn::details::_LayerStaticRegisterer __LayerStaticRegisterer_##type(#type, __LayerStaticRegisterer_func_##type); 47 | 48 | namespace details { 49 | 50 | template 51 | Ptr _layerDynamicRegisterer(LayerParams ¶ms) 52 | { 53 | return Ptr(LayerClass::create(params)); 54 | } 55 | 56 | //allows automatically register created layer on module load time 57 | class _LayerStaticRegisterer 58 | { 59 | String type; 60 | public: 61 | 62 | _LayerStaticRegisterer(const String &layerType, LayerFactory::Constructor layerConstructor) 63 | { 64 | this->type = layerType; 65 | LayerFactory::registerLayer(layerType, layerConstructor); 66 | } 67 | 68 | ~_LayerStaticRegisterer() 69 | { 70 | LayerFactory::unregisterLayer(type); 71 | } 72 | }; 73 | 74 | } // namespace 75 | CV__DNN_INLINE_NS_END 76 | }} // namespace 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | /* Values for 'OPENCV_DNN_BACKEND_INFERENCE_ENGINE_TYPE' parameter */ 18 | #define CV_DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_API "NN_BUILDER" 19 | #define CV_DNN_BACKEND_INFERENCE_ENGINE_NGRAPH "NGRAPH" 20 | 21 | /** @brief Returns Inference Engine internal backend API. 22 | * 23 | * See values of `CV_DNN_BACKEND_INFERENCE_ENGINE_*` macros. 24 | * 25 | * Default value is controlled through `OPENCV_DNN_BACKEND_INFERENCE_ENGINE_TYPE` runtime parameter (environment variable). 26 | */ 27 | CV_EXPORTS_W cv::String getInferenceEngineBackendType(); 28 | 29 | /** @brief Specify Inference Engine internal backend API. 30 | * 31 | * See values of `CV_DNN_BACKEND_INFERENCE_ENGINE_*` macros. 32 | * 33 | * @returns previous value of internal backend API 34 | */ 35 | CV_EXPORTS_W cv::String setInferenceEngineBackendType(const cv::String& newBackendType); 36 | 37 | 38 | /** @brief Release a Myriad device (binded by OpenCV). 39 | * 40 | * Single Myriad device cannot be shared across multiple processes which uses 41 | * Inference Engine's Myriad plugin. 42 | */ 43 | CV_EXPORTS_W void resetMyriadDevice(); 44 | 45 | 46 | /* Values for 'OPENCV_DNN_IE_VPU_TYPE' parameter */ 47 | #define CV_DNN_INFERENCE_ENGINE_VPU_TYPE_UNSPECIFIED "" 48 | /// Intel(R) Movidius(TM) Neural Compute Stick, NCS (USB 03e7:2150), Myriad2 (https://software.intel.com/en-us/movidius-ncs) 49 | #define CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_2 "Myriad2" 50 | /// Intel(R) Neural Compute Stick 2, NCS2 (USB 03e7:2485), MyriadX (https://software.intel.com/ru-ru/neural-compute-stick) 51 | #define CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X "MyriadX" 52 | #define CV_DNN_INFERENCE_ENGINE_CPU_TYPE_ARM_COMPUTE "ARM_COMPUTE" 53 | #define CV_DNN_INFERENCE_ENGINE_CPU_TYPE_X86 "X86" 54 | 55 | 56 | /** @brief Returns Inference Engine VPU type. 57 | * 58 | * See values of `CV_DNN_INFERENCE_ENGINE_VPU_TYPE_*` macros. 59 | */ 60 | CV_EXPORTS_W cv::String getInferenceEngineVPUType(); 61 | 62 | /** @brief Returns Inference Engine CPU type. 63 | * 64 | * Specify OpenVINO plugin: CPU or ARM. 65 | */ 66 | CV_EXPORTS_W cv::String getInferenceEngineCPUType(); 67 | 68 | /** @brief Release a HDDL plugin. 69 | */ 70 | CV_EXPORTS_W void releaseHDDLPlugin(); 71 | 72 | 73 | CV__DNN_INLINE_NS_END 74 | }} // namespace 75 | 76 | #endif // OPENCV_DNN_UTILS_INF_ENGINE_HPP 77 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 20210301 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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/features2d/features2d.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/features2d.hpp" 49 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/flann/flann.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/flann.hpp" 49 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/flann/general.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_GENERAL_H_ 32 | #define OPENCV_FLANN_GENERAL_H_ 33 | 34 | #if CV_VERSION_MAJOR <= 4 35 | 36 | //! @cond IGNORED 37 | 38 | #include "opencv2/core.hpp" 39 | 40 | namespace cvflann 41 | { 42 | 43 | class FLANNException : public cv::Exception 44 | { 45 | public: 46 | FLANNException(const char* message) : cv::Exception(0, message, "", __FILE__, __LINE__) { } 47 | 48 | FLANNException(const cv::String& message) : cv::Exception(0, message, "", __FILE__, __LINE__) { } 49 | }; 50 | 51 | } 52 | 53 | #define FLANN_THROW(TYPE, STR) throw FLANNException(STR) 54 | 55 | #else 56 | 57 | #define FLANN_THROW(TYPE, STR) CV_Error(TYPE, STR) 58 | 59 | #endif 60 | 61 | //! @endcond 62 | 63 | #endif /* OPENCV_FLANN_GENERAL_H_ */ 64 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/flann/object_factory.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_OBJECT_FACTORY_H_ 32 | #define OPENCV_FLANN_OBJECT_FACTORY_H_ 33 | 34 | //! @cond IGNORED 35 | 36 | #include 37 | 38 | namespace cvflann 39 | { 40 | 41 | class CreatorNotFound 42 | { 43 | }; 44 | 45 | template 48 | class ObjectFactory 49 | { 50 | typedef ObjectFactory ThisClass; 51 | typedef std::map ObjectRegistry; 52 | 53 | // singleton class, private constructor 54 | ObjectFactory() {} 55 | 56 | public: 57 | 58 | bool subscribe(UniqueIdType id, ObjectCreator creator) 59 | { 60 | if (object_registry.find(id) != object_registry.end()) return false; 61 | 62 | object_registry[id] = creator; 63 | return true; 64 | } 65 | 66 | bool unregister(UniqueIdType id) 67 | { 68 | return object_registry.erase(id) == 1; 69 | } 70 | 71 | ObjectCreator create(UniqueIdType id) 72 | { 73 | typename ObjectRegistry::const_iterator iter = object_registry.find(id); 74 | 75 | if (iter == object_registry.end()) { 76 | throw CreatorNotFound(); 77 | } 78 | 79 | return iter->second; 80 | } 81 | 82 | static ThisClass& instance() 83 | { 84 | static ThisClass the_factory; 85 | return the_factory; 86 | } 87 | private: 88 | ObjectRegistry object_registry; 89 | }; 90 | 91 | } 92 | 93 | //! @endcond 94 | 95 | #endif /* OPENCV_FLANN_OBJECT_FACTORY_H_ */ 96 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/flann/sampling.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * 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_SAMPLING_H_ 31 | #define OPENCV_FLANN_SAMPLING_H_ 32 | 33 | //! @cond IGNORED 34 | 35 | #include "matrix.h" 36 | #include "random.h" 37 | 38 | namespace cvflann 39 | { 40 | 41 | template 42 | Matrix random_sample(Matrix& srcMatrix, long size, bool remove = false) 43 | { 44 | Matrix newSet(new T[size * srcMatrix.cols], size,srcMatrix.cols); 45 | 46 | T* src,* dest; 47 | for (long i=0; i 65 | Matrix random_sample(const Matrix& srcMatrix, size_t size) 66 | { 67 | UniqueRandom rand((int)srcMatrix.rows); 68 | Matrix newSet(new T[size * srcMatrix.cols], size,srcMatrix.cols); 69 | 70 | T* src,* dest; 71 | for (size_t i=0; i 37 | #include "opencv2/core.hpp" 38 | #include "opencv2/core/utility.hpp" 39 | 40 | namespace cvflann 41 | { 42 | 43 | /** 44 | * A start-stop timer class. 45 | * 46 | * Can be used to time portions of code. 47 | */ 48 | class StartStopTimer 49 | { 50 | int64 startTime; 51 | 52 | public: 53 | /** 54 | * Value of the timer. 55 | */ 56 | double value; 57 | 58 | 59 | /** 60 | * Constructor. 61 | */ 62 | StartStopTimer() 63 | : startTime(0) 64 | { 65 | reset(); 66 | } 67 | 68 | /** 69 | * Starts the timer. 70 | */ 71 | void start() 72 | { 73 | startTime = cv::getTickCount(); 74 | } 75 | 76 | /** 77 | * Stops the timer and updates timer value. 78 | */ 79 | void stop() 80 | { 81 | int64 stopTime = cv::getTickCount(); 82 | value += ( (double)stopTime - startTime) / cv::getTickFrequency(); 83 | } 84 | 85 | /** 86 | * Resets the timer value to 0. 87 | */ 88 | void reset() 89 | { 90 | value = 0; 91 | } 92 | 93 | }; 94 | 95 | } 96 | 97 | //! @endcond 98 | 99 | #endif // FLANN_TIMER_H 100 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 Types 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 | #include 33 | #include 34 | #include 35 | 36 | // Include these files here to avoid cyclic dependency between 37 | // Desync & GKernel & GComputation & GStreamingCompiled. 38 | #include 39 | #include 40 | 41 | #endif // OPENCV_GAPI_HPP 42 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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_W cv::gapi::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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/cpu/stereo.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) 2021 Intel Corporation 6 | 7 | #ifndef OPENCV_GAPI_CPU_STEREO_API_HPP 8 | #define OPENCV_GAPI_CPU_STEREO_API_HPP 9 | 10 | #include // GKernelPackage 11 | 12 | namespace cv { 13 | namespace gapi { 14 | namespace calib3d { 15 | namespace cpu { 16 | 17 | GAPI_EXPORTS GKernelPackage kernels(); 18 | 19 | /** @brief Structure for the Stereo operation initialization parameters.*/ 20 | struct GAPI_EXPORTS StereoInitParam { 21 | StereoInitParam(int nD, int bS, double bL, double f): 22 | numDisparities(nD), blockSize(bS), baseline(bL), focus(f) {} 23 | 24 | StereoInitParam() = default; 25 | 26 | int numDisparities = 0; 27 | int blockSize = 21; 28 | double baseline = 70.; 29 | double focus = 1000.; 30 | }; 31 | 32 | } // namespace cpu 33 | } // namespace calib3d 34 | } // namespace gapi 35 | 36 | namespace detail { 37 | 38 | template<> struct CompileArgTag { 39 | static const char* tag() { 40 | return "org.opencv.stereoInit"; 41 | } 42 | }; 43 | 44 | } // namespace detail 45 | } // namespace cv 46 | 47 | 48 | #endif // OPENCV_GAPI_CPU_STEREO_API_HPP 49 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/cpu/video.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) 2020 Intel Corporation 6 | 7 | #ifndef OPENCV_GAPI_CPU_VIDEO_API_HPP 8 | #define OPENCV_GAPI_CPU_VIDEO_API_HPP 9 | 10 | #include // GKernelPackage 11 | 12 | namespace cv { 13 | namespace gapi { 14 | namespace video { 15 | namespace cpu { 16 | 17 | GAPI_EXPORTS GKernelPackage kernels(); 18 | 19 | } // namespace cpu 20 | } // namespace video 21 | } // namespace gapi 22 | } // namespace cv 23 | 24 | 25 | #endif // OPENCV_GAPI_CPU_VIDEO_API_HPP 26 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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_W cv::gapi::GKernelPackage kernels(); 17 | 18 | }}}} 19 | 20 | #endif // OPENCV_GAPI_FLUID_CORE_HPP 21 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | /** 23 | * @brief A class to group async requests to cancel them in a single shot. 24 | * 25 | * GAsyncContext is passed as an argument to async() and async_apply() functions 26 | */ 27 | 28 | class GAPI_EXPORTS GAsyncContext{ 29 | std::atomic cancelation_requested = {false}; 30 | public: 31 | /** 32 | * @brief Start cancellation process for an associated request. 33 | * 34 | * User still has to wait for each individual request (either via callback or according std::future object) to make sure it actually canceled. 35 | * 36 | * @return true if it was a first request to cancel the context 37 | */ 38 | bool cancel(); 39 | 40 | /** 41 | * @brief Returns true if cancellation was requested for this context. 42 | * 43 | * @return true if cancellation was requested for this context 44 | */ 45 | bool isCanceled() const; 46 | }; 47 | 48 | class GAPI_EXPORTS GAsyncCanceled : public std::exception { 49 | public: 50 | virtual const char* what() const noexcept CV_OVERRIDE; 51 | }; 52 | } // namespace wip 53 | } // namespace gapi 54 | } // namespace cv 55 | 56 | #endif //OPENCV_GAPI_GASYNC_CONTEXT_HPP 57 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 // GFrame 15 | #include // GArray 16 | #include // GOpaque 17 | 18 | namespace cv { 19 | 20 | struct GKernel; 21 | 22 | // The whole idea of this class is to represent an operation 23 | // which is applied to arguments. This is part of public API, 24 | // since it is what users should use to define kernel interfaces. 25 | 26 | class GAPI_EXPORTS GCall final 27 | { 28 | public: 29 | class Priv; 30 | 31 | explicit GCall(const GKernel &k); 32 | ~GCall(); 33 | 34 | template 35 | GCall& pass(Ts&&... args) 36 | { 37 | setArgs({cv::GArg(std::move(args))...}); 38 | return *this; 39 | } 40 | 41 | // A generic yield method - obtain a link to operator's particular GMat output 42 | GMat yield (int output = 0); 43 | GMatP yieldP (int output = 0); 44 | GScalar yieldScalar(int output = 0); 45 | GFrame yieldFrame (int output = 0); 46 | 47 | template GArray yieldArray(int output = 0) 48 | { 49 | return GArray(yieldArray(output)); 50 | } 51 | 52 | template GOpaque yieldOpaque(int output = 0) 53 | { 54 | return GOpaque(yieldOpaque(output)); 55 | } 56 | 57 | // Internal use only 58 | Priv& priv(); 59 | const Priv& priv() const; 60 | 61 | // GKernel and params can be modified, it's needed for infer, 62 | // because information about output shapes doesn't exist in compile time 63 | GKernel& kernel(); 64 | cv::util::any& params(); 65 | 66 | void setArgs(std::vector &&args); 67 | 68 | protected: 69 | std::shared_ptr m_priv; 70 | 71 | // Public versions return a typed array or opaque, those are implementation details 72 | detail::GArrayU yieldArray(int output = 0); 73 | detail::GOpaqueU yieldOpaque(int output = 0); 74 | }; 75 | 76 | } // namespace cv 77 | 78 | #endif // OPENCV_GAPI_GCALL_HPP 79 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/gframe.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) 2020 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_GFRAME_HPP 9 | #define OPENCV_GAPI_GFRAME_HPP 10 | 11 | #include 12 | #include // std::shared_ptr 13 | 14 | #include 15 | #include // GShape 16 | 17 | #include 18 | #include 19 | 20 | // TODO GAPI_EXPORTS or so 21 | namespace cv 22 | { 23 | // Forward declaration; GNode and GOrigin are an internal 24 | // (user-inaccessible) classes. 25 | class GNode; 26 | struct GOrigin; 27 | 28 | /** \addtogroup gapi_data_objects 29 | * @{ 30 | */ 31 | class GAPI_EXPORTS_W_SIMPLE GFrame 32 | { 33 | public: 34 | GAPI_WRAP GFrame(); // Empty constructor 35 | GFrame(const GNode &n, std::size_t out); // Operation result constructor 36 | 37 | GOrigin& priv(); // Internal use only 38 | const GOrigin& priv() const; // Internal use only 39 | 40 | private: 41 | std::shared_ptr m_priv; 42 | }; 43 | /** @} */ 44 | 45 | enum class MediaFormat: int 46 | { 47 | BGR = 0, 48 | NV12, 49 | }; 50 | 51 | /** 52 | * \addtogroup gapi_meta_args 53 | * @{ 54 | */ 55 | struct GAPI_EXPORTS GFrameDesc 56 | { 57 | MediaFormat fmt; 58 | cv::Size size; 59 | 60 | bool operator== (const GFrameDesc &) const; 61 | }; 62 | static inline GFrameDesc empty_gframe_desc() { return GFrameDesc{}; } 63 | /** @} */ 64 | 65 | class MediaFrame; 66 | GAPI_EXPORTS GFrameDesc descr_of(const MediaFrame &frame); 67 | 68 | GAPI_EXPORTS std::ostream& operator<<(std::ostream& os, const cv::GFrameDesc &desc); 69 | 70 | } // namespace cv 71 | 72 | #endif // OPENCV_GAPI_GFRAME_HPP 73 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/gmetaarg.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_GMETAARG_HPP 9 | #define OPENCV_GAPI_GMETAARG_HPP 10 | 11 | #include 12 | #include 13 | 14 | #include 15 | #include 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | namespace cv 24 | { 25 | // FIXME: Rename to GMeta? 26 | // FIXME: user shouldn't deal with it - put to detail? 27 | // GMetaArg is an union type over descriptions of G-types which can serve as 28 | // GComputation's in/output slots. 29 | // 30 | // GMetaArg objects are passed as arguments to GComputation::compile() 31 | // to specify which data a compiled computation should be specialized on. 32 | // For manual compile(), user must supply this metadata, in case of apply() 33 | // this metadata is taken from arguments computation should operate on. 34 | // 35 | // The first type (monostate) is equal to "uninitialized"/"unresolved" meta. 36 | using GMetaArg = util::variant 37 | < util::monostate 38 | , GMatDesc 39 | , GScalarDesc 40 | , GArrayDesc 41 | , GOpaqueDesc 42 | , GFrameDesc 43 | >; 44 | GAPI_EXPORTS std::ostream& operator<<(std::ostream& os, const GMetaArg &); 45 | 46 | using GMetaArgs = std::vector; 47 | 48 | namespace detail 49 | { 50 | // These traits are used by GComputation::compile() 51 | 52 | // FIXME: is_constructible doesn't work as variant doesn't do any SFINAE 53 | // in its current template constructor 54 | 55 | template struct is_meta_descr : std::false_type {}; 56 | template<> struct is_meta_descr : std::true_type {}; 57 | template<> struct is_meta_descr : std::true_type {}; 58 | template<> struct is_meta_descr : std::true_type {}; 59 | template<> struct is_meta_descr : std::true_type {}; 60 | 61 | template 62 | using are_meta_descrs = all_satisfy; 63 | 64 | template 65 | using are_meta_descrs_but_last = all_satisfy::type>; 66 | 67 | } // namespace detail 68 | 69 | // Note: descr_of(std::vector<..>) returns a GArrayDesc, while 70 | // descrs_of(std::vector<..>) returns an array of Meta args! 71 | class UMat; 72 | GAPI_EXPORTS cv::GMetaArgs descrs_of(const std::vector &vec); 73 | GAPI_EXPORTS cv::GMetaArgs descrs_of(const std::vector &vec); 74 | namespace gapi { namespace own { 75 | GAPI_EXPORTS cv::GMetaArgs descrs_of(const std::vector &vec); 76 | }} // namespace gapi::own 77 | 78 | } // namespace cv 79 | 80 | #endif // OPENCV_GAPI_GMETAARG_HPP 81 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/gscalar.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_GSCALAR_HPP 10 | #define OPENCV_GAPI_GSCALAR_HPP 11 | 12 | #include 13 | 14 | #include 15 | #include // GShape 16 | #include 17 | 18 | namespace cv 19 | { 20 | // Forward declaration; GNode and GOrigin are an internal 21 | // (user-inaccessible) classes. 22 | class GNode; 23 | struct GOrigin; 24 | 25 | /** \addtogroup gapi_data_objects 26 | * @{ 27 | */ 28 | 29 | class GAPI_EXPORTS_W_SIMPLE GScalar 30 | { 31 | public: 32 | GAPI_WRAP GScalar(); // Empty constructor 33 | explicit GScalar(const cv::Scalar& s); // Constant value constructor from cv::Scalar 34 | explicit GScalar(cv::Scalar&& s); // Constant value move-constructor from cv::Scalar 35 | 36 | GScalar(double v0); // Constant value constructor from double 37 | GScalar(const GNode &n, std::size_t out); // Operation result constructor 38 | 39 | GOrigin& priv(); // Internal use only 40 | const GOrigin& priv() const; // Internal use only 41 | 42 | private: 43 | std::shared_ptr m_priv; 44 | }; 45 | 46 | /** @} */ 47 | 48 | /** 49 | * \addtogroup gapi_meta_args 50 | * @{ 51 | */ 52 | struct GAPI_EXPORTS_W_SIMPLE GScalarDesc 53 | { 54 | // NB.: right now it is empty 55 | 56 | inline bool operator== (const GScalarDesc &) const 57 | { 58 | return true; // NB: implement this method if GScalar meta appears 59 | } 60 | 61 | inline bool operator!= (const GScalarDesc &rhs) const 62 | { 63 | return !(*this == rhs); 64 | } 65 | }; 66 | 67 | GAPI_EXPORTS_W inline GScalarDesc empty_scalar_desc() { return GScalarDesc(); } 68 | 69 | GAPI_EXPORTS GScalarDesc descr_of(const cv::Scalar &scalar); 70 | 71 | std::ostream& operator<<(std::ostream& os, const cv::GScalarDesc &desc); 72 | 73 | } // namespace cv 74 | 75 | #endif // OPENCV_GAPI_GSCALAR_HPP 76 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/infer/bindings_ie.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) 2020 Intel Corporation 6 | 7 | #ifndef OPENCV_GAPI_INFER_BINDINGS_IE_HPP 8 | #define OPENCV_GAPI_INFER_BINDINGS_IE_HPP 9 | 10 | #include 11 | #include "opencv2/gapi/own/exports.hpp" // GAPI_EXPORTS 12 | #include // GKernelPackage 13 | #include // Params 14 | 15 | #include 16 | 17 | namespace cv { 18 | namespace gapi { 19 | namespace ie { 20 | 21 | // NB: Used by python wrapper 22 | // This class can be marked as SIMPLE, because it's implemented as pimpl 23 | class GAPI_EXPORTS_W_SIMPLE PyParams { 24 | public: 25 | PyParams() = default; 26 | 27 | PyParams(const std::string &tag, 28 | const std::string &model, 29 | const std::string &weights, 30 | const std::string &device); 31 | 32 | PyParams(const std::string &tag, 33 | const std::string &model, 34 | const std::string &device); 35 | 36 | GBackend backend() const; 37 | std::string tag() const; 38 | cv::util::any params() const; 39 | 40 | private: 41 | std::shared_ptr> m_priv; 42 | }; 43 | 44 | GAPI_EXPORTS_W PyParams params(const std::string &tag, 45 | const std::string &model, 46 | const std::string &weights, 47 | const std::string &device); 48 | 49 | GAPI_EXPORTS_W PyParams params(const std::string &tag, 50 | const std::string &model, 51 | const std::string &device); 52 | } // namespace ie 53 | } // namespace gapi 54 | } // namespace cv 55 | 56 | #endif // OPENCV_GAPI_INFER_BINDINGS_IE_HPP 57 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/media.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) 2020 Intel Corporation 6 | 7 | #ifndef OPENCV_GAPI_MEDIA_HPP 8 | #define OPENCV_GAPI_MEDIA_HPP 9 | 10 | #include // unique_ptr<>, shared_ptr<> 11 | #include // array<> 12 | #include // function<> 13 | #include // forward<>() 14 | 15 | #include 16 | 17 | namespace cv { 18 | 19 | class GAPI_EXPORTS MediaFrame { 20 | public: 21 | enum class Access { R, W }; 22 | class IAdapter; 23 | class View; 24 | using AdapterPtr = std::unique_ptr; 25 | 26 | MediaFrame(); 27 | explicit MediaFrame(AdapterPtr &&); 28 | template static cv::MediaFrame Create(Args&&...); 29 | 30 | View access(Access) const; 31 | cv::GFrameDesc desc() const; 32 | 33 | // Cast underlying MediaFrame adapter to the particular adapter type, 34 | // return nullptr if underlying type is different 35 | template T* get() const 36 | { 37 | static_assert(std::is_base_of::value, 38 | "T is not derived from cv::MediaFrame::IAdapter!"); 39 | auto* adapter = getAdapter(); 40 | GAPI_Assert(adapter != nullptr); 41 | return dynamic_cast(adapter); 42 | } 43 | 44 | private: 45 | struct Priv; 46 | std::shared_ptr m; 47 | IAdapter* getAdapter() const; 48 | }; 49 | 50 | template 51 | inline cv::MediaFrame cv::MediaFrame::Create(Args&&... args) { 52 | std::unique_ptr ptr(new T(std::forward(args)...)); 53 | return cv::MediaFrame(std::move(ptr)); 54 | } 55 | 56 | class GAPI_EXPORTS MediaFrame::View final { 57 | public: 58 | static constexpr const size_t MAX_PLANES = 4; 59 | using Ptrs = std::array; 60 | using Strides = std::array; // in bytes 61 | using Callback = std::function; 62 | 63 | View(Ptrs&& ptrs, Strides&& strs, Callback &&cb = [](){}); 64 | View(const View&) = delete; 65 | View(View&&) = default; 66 | View& operator = (const View&) = delete; 67 | ~View(); 68 | 69 | Ptrs ptr; 70 | Strides stride; 71 | 72 | private: 73 | Callback m_cb; 74 | }; 75 | 76 | class GAPI_EXPORTS MediaFrame::IAdapter { 77 | public: 78 | virtual ~IAdapter() = 0; 79 | virtual cv::GFrameDesc meta() const = 0; 80 | virtual MediaFrame::View access(MediaFrame::Access) = 0; 81 | }; 82 | 83 | } //namespace cv 84 | 85 | #endif // OPENCV_GAPI_MEDIA_HPP 86 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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_W cv::gapi::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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | # include // cv::gapi::own::Rect/Size/Point 20 | # include // cv::gapi::own::Scalar 21 | # include 22 | // replacement of cv's structures: 23 | namespace cv { 24 | using Rect = gapi::own::Rect; 25 | using Size = gapi::own::Size; 26 | using Point = gapi::own::Point; 27 | using Point2f = gapi::own::Point2f; 28 | using Scalar = gapi::own::Scalar; 29 | using Mat = gapi::own::Mat; 30 | } // namespace cv 31 | #endif // !defined(GAPI_STANDALONE) 32 | 33 | #endif // OPENCV_GAPI_OPENCV_INCLUDES_HPP 34 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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-2020 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_OWN_ASSERT_HPP 9 | #define OPENCV_GAPI_OWN_ASSERT_HPP 10 | 11 | #include 12 | 13 | #define GAPI_DbgAssertNoOp(expr) { \ 14 | constexpr bool _assert_tmp = false && (expr); \ 15 | cv::util::suppress_unused_warning(_assert_tmp); \ 16 | } 17 | 18 | #if !defined(GAPI_STANDALONE) 19 | #include 20 | #define GAPI_Assert CV_Assert 21 | 22 | #if defined _DEBUG || defined CV_STATIC_ANALYSIS 23 | # define GAPI_DbgAssert CV_DbgAssert 24 | #else 25 | # define GAPI_DbgAssert(expr) GAPI_DbgAssertNoOp(expr) 26 | #endif 27 | 28 | #else 29 | #include 30 | #include 31 | #include 32 | 33 | namespace detail 34 | { 35 | [[noreturn]] inline void assert_abort(const char* str, int line, const char* file, const char* func) 36 | { 37 | std::stringstream ss; 38 | ss << file << ":" << line << ": Assertion " << str << " in function " << func << " failed\n"; 39 | cv::util::throw_error(std::logic_error(ss.str())); 40 | } 41 | } 42 | 43 | #define GAPI_Assert(expr) \ 44 | { if (!(expr)) ::detail::assert_abort(#expr, __LINE__, __FILE__, __func__); } 45 | 46 | 47 | #ifdef NDEBUG 48 | # define GAPI_DbgAssert(expr) GAPI_DbgAssertNoOp(expr) 49 | #else 50 | # define GAPI_DbgAssert(expr) GAPI_Assert(expr) 51 | #endif 52 | 53 | #endif // GAPI_STANDALONE 54 | 55 | #endif // OPENCV_GAPI_OWN_ASSERT_HPP 56 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/own/convert.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_CONVERT_HPP 9 | #define OPENCV_GAPI_OWN_CONVERT_HPP 10 | 11 | #if !defined(GAPI_STANDALONE) 12 | 13 | #include 14 | #include 15 | 16 | namespace cv 17 | { 18 | template 19 | std::vector to_own(const cv::MatSize &sz) { 20 | std::vector result(sz.dims()); 21 | for (int i = 0; i < sz.dims(); i++) { 22 | // Note: cv::MatSize is not iterable 23 | result[i] = static_cast(sz[i]); 24 | } 25 | return result; 26 | } 27 | 28 | cv::gapi::own::Mat to_own(Mat&&) = delete; 29 | 30 | inline cv::gapi::own::Mat to_own(Mat const& m) { 31 | return (m.dims == 2) 32 | ? cv::gapi::own::Mat{m.rows, m.cols, m.type(), m.data, m.step} 33 | : cv::gapi::own::Mat{to_own(m.size), m.type(), m.data}; 34 | }; 35 | 36 | namespace gapi 37 | { 38 | namespace own 39 | { 40 | 41 | inline cv::Mat to_ocv(Mat const& m) { 42 | return m.dims.empty() 43 | ? cv::Mat{m.rows, m.cols, m.type(), m.data, m.step} 44 | : cv::Mat{m.dims, m.type(), m.data}; 45 | } 46 | 47 | cv::Mat to_ocv(Mat&&) = delete; 48 | 49 | } // namespace own 50 | } // namespace gapi 51 | } // namespace cv 52 | 53 | #endif // !defined(GAPI_STANDALONE) 54 | 55 | #endif // OPENCV_GAPI_OWN_CONVERT_HPP 56 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | /* special informative macros for wrapper generators */ 15 | # define GAPI_PROP CV_PROP 16 | # define GAPI_WRAP CV_WRAP 17 | # define GAPI_EXPORTS_W_SIMPLE CV_EXPORTS_W_SIMPLE 18 | # define GAPI_EXPORTS_W CV_EXPORTS_W 19 | # else 20 | # define GAPI_PROP 21 | # define GAPI_WRAP 22 | # define GAPI_EXPORTS 23 | # define GAPI_EXPORTS_W_SIMPLE 24 | # define GAPI_EXPORTS_W 25 | 26 | #if 0 // Note: the following version currently is not needed for non-OpenCV build 27 | # if defined _WIN32 28 | # define GAPI_EXPORTS __declspec(dllexport) 29 | # elif defined __GNUC__ && __GNUC__ >= 4 30 | # define GAPI_EXPORTS __attribute__ ((visibility ("default"))) 31 | # endif 32 | 33 | # ifndef GAPI_EXPORTS 34 | # define GAPI_EXPORTS 35 | # endif 36 | #endif 37 | 38 | # endif 39 | 40 | #endif // OPENCV_GAPI_OWN_TYPES_HPP 41 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/own/saturate.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_SATURATE_HPP 9 | #define OPENCV_GAPI_OWN_SATURATE_HPP 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | namespace cv { namespace gapi { namespace own { 19 | //----------------------------- 20 | // 21 | // Numeric cast with saturation 22 | // 23 | //----------------------------- 24 | 25 | template 26 | static inline DST saturate(SRC x) 27 | { 28 | // only integral types please! 29 | GAPI_DbgAssert(std::is_integral::value && 30 | std::is_integral::value); 31 | 32 | if (std::is_same::value) 33 | return static_cast(x); 34 | 35 | if (sizeof(DST) > sizeof(SRC)) 36 | return static_cast(x); 37 | 38 | // compiler must recognize this saturation, 39 | // so compile saturate(a + b) with adds 40 | // instruction (e.g.: _mm_adds_epi16 if x86) 41 | return x < std::numeric_limits::min()? 42 | std::numeric_limits::min(): 43 | x > std::numeric_limits::max()? 44 | std::numeric_limits::max(): 45 | static_cast(x); 46 | } 47 | 48 | // Note, that OpenCV rounds differently: 49 | // - like std::round() for add, subtract 50 | // - like std::rint() for multiply, divide 51 | template 52 | static inline DST saturate(SRC x, R round) 53 | { 54 | if (std::is_floating_point::value) 55 | { 56 | return static_cast(x); 57 | } 58 | else if (std::is_integral::value) 59 | { 60 | GAPI_DbgAssert(std::is_integral::value && 61 | std::is_integral::value); 62 | return saturate(x); 63 | } 64 | else 65 | { 66 | GAPI_DbgAssert(std::is_integral::value && 67 | std::is_floating_point::value); 68 | #ifdef _WIN32 69 | // Suppress warning about converting x to floating-point 70 | // Note that x is already floating-point at this point 71 | #pragma warning(disable: 4244) 72 | #endif 73 | int ix = static_cast(round(x)); 74 | #ifdef _WIN32 75 | #pragma warning(default: 4244) 76 | #endif 77 | return saturate(ix); 78 | } 79 | } 80 | 81 | // explicit suffix 'd' for double type 82 | inline double ceild(double x) { return ceil(x); } 83 | inline double floord(double x) { return floor(x); } 84 | inline double roundd(double x) { return round(x); } 85 | inline double rintd(double x) { return rint(x); } 86 | 87 | } //namespace own 88 | } //namespace gapi 89 | } //namespace cv 90 | #endif /* OPENCV_GAPI_OWN_SATURATE_HPP */ 91 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/plaidml/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) 2019 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_PLAIDML_CORE_HPP 9 | #define OPENCV_GAPI_PLAIDML_CORE_HPP 10 | 11 | #include // GKernelPackage 12 | #include // GAPI_EXPORTS 13 | 14 | namespace cv { namespace gapi { namespace core { namespace plaidml { 15 | 16 | GAPI_EXPORTS cv::gapi::GKernelPackage kernels(); 17 | 18 | }}}} 19 | 20 | #endif // OPENCV_GAPI_PLAIDML_CORE_HPP 21 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/plaidml/plaidml.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 | 8 | #ifndef OPENCV_GAPI_PLAIDML_PLAIDML_HPP 9 | #define OPENCV_GAPI_PLAIDML_PLAIDML_HPP 10 | 11 | #include 12 | #include // CompileArgTag 13 | 14 | namespace cv 15 | { 16 | namespace gapi 17 | { 18 | namespace plaidml 19 | { 20 | 21 | /** \addtogroup gapi_compile_args 22 | * @{ 23 | */ 24 | /** 25 | * @brief This structure represents the basic parameters for the experimental 26 | * PlaidML backend. 27 | */ 28 | struct config 29 | { 30 | std::string dev_id; //!< Device ID. Refer to PlaidML documentation for details. 31 | std::string trg_id; //!< Target ID. Refer to PlaidML documentation for details. 32 | }; 33 | /** @} gapi_compile_args */ 34 | 35 | } // namespace plaidml 36 | } // namespace gapi 37 | 38 | namespace detail 39 | { 40 | template<> struct CompileArgTag 41 | { 42 | static const char* tag() { return "gapi.plaidml.config"; } 43 | }; 44 | } // namespace detail 45 | 46 | } // namespace cv 47 | 48 | #endif // OPENCV_GAPI_PLAIDML_PLAIDML_HPP 49 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/python/python.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) 2021 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_PYTHON_API_HPP 9 | #define OPENCV_GAPI_PYTHON_API_HPP 10 | 11 | #include // GKernelPackage 12 | #include // GAPI_EXPORTS 13 | 14 | namespace cv { 15 | namespace gapi { 16 | namespace python { 17 | 18 | GAPI_EXPORTS cv::gapi::GBackend backend(); 19 | 20 | struct GPythonContext 21 | { 22 | const cv::GArgs &ins; 23 | const cv::GMetaArgs &in_metas; 24 | const cv::GTypesInfo &out_info; 25 | }; 26 | 27 | using Impl = std::function; 28 | 29 | class GAPI_EXPORTS GPythonKernel 30 | { 31 | public: 32 | GPythonKernel() = default; 33 | GPythonKernel(Impl run); 34 | 35 | cv::GRunArgs operator()(const GPythonContext& ctx); 36 | private: 37 | Impl m_run; 38 | }; 39 | 40 | class GAPI_EXPORTS GPythonFunctor : public cv::gapi::GFunctor 41 | { 42 | public: 43 | using Meta = cv::GKernel::M; 44 | 45 | GPythonFunctor(const char* id, const Meta &meta, const Impl& impl); 46 | 47 | GKernelImpl impl() const override; 48 | gapi::GBackend backend() const override; 49 | 50 | private: 51 | GKernelImpl impl_; 52 | }; 53 | 54 | } // namespace python 55 | } // namespace gapi 56 | } // namespace cv 57 | 58 | #endif // OPENCV_GAPI_PYTHON_API_HPP 59 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/render.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_RENDER_ROOT_HPP 8 | #define OPENCV_GAPI_RENDER_ROOT_HPP 9 | 10 | // This file is just a shortcut to render/render.hpp 11 | 12 | #include 13 | 14 | #endif // OPENCV_GAPI_RENDER_ROOT_HPP 15 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/s11n/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 | // Copyright (C) 2020 Intel Corporation 6 | 7 | #ifndef OPENCV_GAPI_S11N_BASE_HPP 8 | #define OPENCV_GAPI_S11N_BASE_HPP 9 | 10 | #include 11 | #include 12 | 13 | namespace cv { 14 | namespace gapi { 15 | namespace s11n { 16 | struct IOStream; 17 | struct IIStream; 18 | 19 | namespace detail { 20 | 21 | struct NotImplemented { 22 | }; 23 | 24 | // The default S11N for custom types is NotImplemented 25 | // Don't! sublass from NotImplemented if you actually implement S11N. 26 | template 27 | struct S11N: public NotImplemented { 28 | static void serialize(IOStream &, const T &) { 29 | GAPI_Assert(false && "No serialization routine is provided!"); 30 | } 31 | static T deserialize(IIStream &) { 32 | GAPI_Assert(false && "No deserialization routine is provided!"); 33 | } 34 | }; 35 | 36 | template struct has_S11N_spec { 37 | static constexpr bool value = !std::is_base_of::type>>::value; 39 | }; 40 | 41 | } // namespace detail 42 | } // namespace s11n 43 | } // namespace gapi 44 | } // namespace cv 45 | 46 | #endif // OPENCV_GAPI_S11N_BASE_HPP 47 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/stereo.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 distereoibution and at http://opencv.org/license.html. 4 | // 5 | // Copyright (C) 2021 Intel Corporation 6 | 7 | #ifndef OPENCV_GAPI_STEREO_HPP 8 | #define OPENCV_GAPI_STEREO_HPP 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | namespace cv { 15 | namespace gapi { 16 | 17 | enum class StereoOutputFormat { 18 | DEPTH_FLOAT16, 19 | DEPTH_FLOAT32, 20 | DISPARITY_FIXED16_11_5, 21 | DISPARITY_FIXED16_12_4 22 | }; 23 | 24 | namespace calib3d { 25 | 26 | G_TYPED_KERNEL(GStereo, , "org.opencv.stereo") { 27 | static GMatDesc outMeta(const GMatDesc &left, const GMatDesc &right, const StereoOutputFormat of) { 28 | GAPI_Assert(left.chan == 1); 29 | GAPI_Assert(left.depth == CV_8U); 30 | 31 | GAPI_Assert(right.chan == 1); 32 | GAPI_Assert(right.depth == CV_8U); 33 | 34 | switch(of) { 35 | case StereoOutputFormat::DEPTH_FLOAT16: 36 | return left.withDepth(CV_16FC1); 37 | case StereoOutputFormat::DEPTH_FLOAT32: 38 | return left.withDepth(CV_32FC1); 39 | case StereoOutputFormat::DISPARITY_FIXED16_11_5: 40 | case StereoOutputFormat::DISPARITY_FIXED16_12_4: 41 | return left.withDepth(CV_16SC1); 42 | default: 43 | GAPI_Assert(false && "Unknown output format!"); 44 | } 45 | } 46 | }; 47 | 48 | } // namespace calib3d 49 | 50 | /** @brief Extract disparity/depth information depending on passed StereoOutputFormat argument. 51 | The function extracts disparity/depth information depending on passed StereoOutputFormat argument from 52 | given stereo-pair. 53 | 54 | @param left left 8-bit unsigned 1-channel image of @ref CV_8UC1 type 55 | @param right right 8-bit unsigned 1-channel image of @ref CV_8UC1 type 56 | @param of enum to specify output kind: depth or disparity and corresponding type 57 | */ 58 | GAPI_EXPORTS GMat stereo(const GMat& left, 59 | const GMat& right, 60 | const StereoOutputFormat of = StereoOutputFormat::DEPTH_FLOAT32); 61 | } // namespace gapi 62 | } // namespace cv 63 | 64 | #endif // OPENCV_GAPI_STEREO_HPP 65 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/streaming/desync.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) 2020 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_GSTREAMING_DESYNC_HPP 9 | #define OPENCV_GAPI_GSTREAMING_DESYNC_HPP 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | namespace cv { 20 | namespace gapi { 21 | namespace streaming { 22 | 23 | namespace detail { 24 | struct GDesync { 25 | static const char *id() { 26 | return "org.opencv.streaming.desync"; 27 | } 28 | 29 | // An universal yield for desync. 30 | // Yields output objects according to the input Types... 31 | // Reuses gkernel machinery. 32 | // FIXME: This function can be generic and declared in gkernel.hpp 33 | // (it is there already, but a part of GKernelType[M] 34 | template 35 | static std::tuple yield(cv::GCall &call, cv::detail::Seq) { 36 | return std::make_tuple(cv::detail::Yield::yield(call, IIs)...); 37 | } 38 | }; 39 | 40 | template 41 | G desync(const G &g) { 42 | cv::GKernel k{ 43 | GDesync::id() // kernel id 44 | , "" // kernel tag 45 | , [](const GMetaArgs &a, const GArgs &) {return a;} // outMeta callback 46 | , {cv::detail::GTypeTraits::shape} // output Shape 47 | , {cv::detail::GTypeTraits::op_kind} // input data kinds 48 | , {cv::detail::GObtainCtor::get()} // output template ctors 49 | }; 50 | cv::GCall call(std::move(k)); 51 | call.pass(g); 52 | return std::get<0>(GDesync::yield(call, cv::detail::MkSeq<1>::type())); 53 | } 54 | } // namespace detail 55 | 56 | /** 57 | * @brief Starts a desynchronized branch in the graph. 58 | * 59 | * This operation takes a single G-API data object and returns a 60 | * graph-level "duplicate" of this object. 61 | * 62 | * Operations which use this data object can be desynchronized 63 | * from the rest of the graph. 64 | * 65 | * This operation has no effect when a GComputation is compiled with 66 | * regular cv::GComputation::compile(), since cv::GCompiled objects 67 | * always produce their full output vectors. 68 | * 69 | * This operation only makes sense when a GComputation is compiled in 70 | * straming mode with cv::GComputation::compileStreaming(). If this 71 | * operation is used and there are desynchronized outputs, the user 72 | * should use a special version of cv::GStreamingCompiled::pull() 73 | * which produces an array of cv::util::optional<> objects. 74 | * 75 | * @note This feature is highly experimental now and is currently 76 | * limited to a single GMat argument only. 77 | */ 78 | GAPI_EXPORTS GMat desync(const GMat &g); 79 | 80 | } // namespace streaming 81 | } // namespace gapi 82 | } // namespace cv 83 | 84 | #endif // OPENCV_GAPI_GSTREAMING_DESYNC_HPP 85 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/streaming/format.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) 2020 Intel Corporation 6 | 7 | #ifndef OPENCV_GAPI_GSTREAMING_FORMAT_HPP 8 | #define OPENCV_GAPI_GSTREAMING_FORMAT_HPP 9 | 10 | #include // GKernelPackage 11 | 12 | namespace cv { 13 | namespace gapi { 14 | namespace streaming { 15 | 16 | GAPI_EXPORTS cv::gapi::GKernelPackage kernels(); 17 | 18 | G_API_OP(GBGR, , "org.opencv.streaming.BGR") 19 | { 20 | static GMatDesc outMeta(const GFrameDesc& in) { return GMatDesc{CV_8U, 3, in.size}; } 21 | }; 22 | 23 | G_API_OP(GY, , "org.opencv.streaming.Y") { 24 | static GMatDesc outMeta(const GFrameDesc& frameDesc) { 25 | return GMatDesc { CV_8U, 1, frameDesc.size , false }; 26 | } 27 | }; 28 | 29 | G_API_OP(GUV, , "org.opencv.streaming.UV") { 30 | static GMatDesc outMeta(const GFrameDesc& frameDesc) { 31 | return GMatDesc { CV_8U, 2, cv::Size(frameDesc.size.width / 2, frameDesc.size.height / 2), 32 | false }; 33 | } 34 | }; 35 | 36 | /** @brief Gets bgr plane from input frame 37 | 38 | @note Function textual ID is "org.opencv.streaming.BGR" 39 | 40 | @param in Input frame 41 | @return Image in BGR format 42 | */ 43 | GAPI_EXPORTS cv::GMat BGR(const cv::GFrame& in); 44 | 45 | /** @brief Extracts Y plane from media frame. 46 | 47 | Output image is 8-bit 1-channel image of @ref CV_8UC1. 48 | 49 | @note Function textual ID is "org.opencv.streaming.Y" 50 | 51 | @param frame input media frame. 52 | */ 53 | GAPI_EXPORTS GMat Y(const cv::GFrame& frame); 54 | 55 | /** @brief Extracts UV plane from media frame. 56 | 57 | Output image is 8-bit 2-channel image of @ref CV_8UC2. 58 | 59 | @note Function textual ID is "org.opencv.streaming.UV" 60 | 61 | @param frame input media frame. 62 | */ 63 | GAPI_EXPORTS GMat UV(const cv::GFrame& frame); 64 | } // namespace streaming 65 | 66 | //! @addtogroup gapi_transform 67 | //! @{ 68 | /** @brief Makes a copy of the input image. Note that this copy may be not real 69 | (no actual data copied). Use this function to maintain graph contracts, 70 | e.g when graph's input needs to be passed directly to output, like in Streaming mode. 71 | 72 | @note Function textual ID is "org.opencv.streaming.copy" 73 | 74 | @param in Input image 75 | @return Copy of the input 76 | */ 77 | GAPI_EXPORTS GMat copy(const GMat& in); 78 | 79 | /** @brief Makes a copy of the input frame. Note that this copy may be not real 80 | (no actual data copied). Use this function to maintain graph contracts, 81 | e.g when graph's input needs to be passed directly to output, like in Streaming mode. 82 | 83 | @note Function textual ID is "org.opencv.streaming.copy" 84 | 85 | @param in Input frame 86 | @return Copy of the input 87 | */ 88 | GAPI_EXPORTS GFrame copy(const GFrame& in); 89 | //! @} gapi_transform 90 | 91 | } // namespace gapi 92 | } // namespace cv 93 | 94 | #endif // OPENCV_GAPI_GSTREAMING_FORMAT_HPP 95 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/streaming/meta.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) 2020 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_GSTREAMING_META_HPP 9 | #define OPENCV_GAPI_GSTREAMING_META_HPP 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | namespace cv { 17 | namespace gapi { 18 | namespace streaming { 19 | 20 | // FIXME: the name is debatable 21 | namespace meta_tag { 22 | static constexpr const char * timestamp = "org.opencv.gapi.meta.timestamp"; 23 | static constexpr const char * seq_id = "org.opencv.gapi.meta.seq_id"; 24 | } // namespace meta_tag 25 | 26 | namespace detail { 27 | struct GMeta { 28 | static const char *id() { 29 | return "org.opencv.streaming.meta"; 30 | } 31 | // A universal yield for meta(), same as in GDesync 32 | template 33 | static std::tuple yield(cv::GCall &call, cv::detail::Seq) { 34 | return std::make_tuple(cv::detail::Yield::yield(call, IIs)...); 35 | } 36 | // Also a universal outMeta stub here 37 | static GMetaArgs getOutMeta(const GMetaArgs &args, const GArgs &) { 38 | return args; 39 | } 40 | }; 41 | } // namespace detail 42 | 43 | template 44 | cv::GOpaque meta(G g, const std::string &tag) { 45 | using O = cv::GOpaque; 46 | cv::GKernel k{ 47 | detail::GMeta::id() // kernel id 48 | , tag // kernel tag. Use meta tag here 49 | , &detail::GMeta::getOutMeta // outMeta callback 50 | , {cv::detail::GTypeTraits::shape} // output Shape 51 | , {cv::detail::GTypeTraits::op_kind} // input data kinds 52 | , {cv::detail::GObtainCtor::get()} // output template ctors 53 | }; 54 | cv::GCall call(std::move(k)); 55 | call.pass(g); 56 | return std::get<0>(detail::GMeta::yield(call, cv::detail::MkSeq<1>::type())); 57 | } 58 | 59 | template 60 | cv::GOpaque timestamp(G g) { 61 | return meta(g, meta_tag::timestamp); 62 | } 63 | 64 | template 65 | cv::GOpaque seq_id(G g) { 66 | return meta(g, meta_tag::seq_id); 67 | } 68 | 69 | template 70 | cv::GOpaque seqNo(G g) { 71 | // Old name, compatibility only 72 | return seq_id(g); 73 | } 74 | 75 | } // namespace streaming 76 | } // namespace gapi 77 | } // namespace cv 78 | 79 | #endif // OPENCV_GAPI_GSTREAMING_META_HPP 80 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/streaming/source.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_STREAMING_SOURCE_HPP 8 | #define OPENCV_GAPI_STREAMING_SOURCE_HPP 9 | 10 | #include // shared_ptr 11 | #include // is_base_of 12 | 13 | #include // GMetaArg 14 | 15 | 16 | namespace cv { 17 | namespace gapi { 18 | namespace wip { 19 | struct Data; // "forward-declaration" of GRunArg 20 | 21 | /** 22 | * @brief Abstract streaming pipeline source. 23 | * 24 | * Implement this interface if you want customize the way how data is 25 | * streaming into GStreamingCompiled. 26 | * 27 | * Objects implementing this interface can be passed to 28 | * GStreamingCompiled using setSource() with cv::gin(). Regular 29 | * compiled graphs (GCompiled) don't support input objects of this 30 | * type. 31 | * 32 | * Default cv::VideoCapture-based implementation is available, see 33 | * cv::gapi::wip::GCaptureSource. 34 | * 35 | * @note stream sources are passed to G-API via shared pointers, so 36 | * please use ptr() when passing a IStreamSource implementation to 37 | * cv::gin(). 38 | */ 39 | class IStreamSource: public std::enable_shared_from_this 40 | { 41 | public: 42 | using Ptr = std::shared_ptr; 43 | Ptr ptr() { return shared_from_this(); } 44 | virtual bool pull(Data &data) = 0; 45 | virtual GMetaArg descr_of() const = 0; 46 | virtual ~IStreamSource() = default; 47 | }; 48 | 49 | template 50 | IStreamSource::Ptr inline make_src(Args&&... args) 51 | { 52 | static_assert(std::is_base_of::value, 53 | "T must implement the cv::gapi::IStreamSource interface!"); 54 | auto src_ptr = std::make_shared(std::forward(args)...); 55 | return src_ptr->ptr(); 56 | } 57 | 58 | } // namespace wip 59 | } // namespace gapi 60 | } // namespace cv 61 | 62 | #endif // OPENCV_GAPI_STREAMING_SOURCE_HPP 63 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/streaming/sync.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) 2021 Intel Corporation 6 | 7 | #ifndef OPENCV_GAPI_STREAMING_SYNC_HPP 8 | #define OPENCV_GAPI_STREAMING_SYNC_HPP 9 | 10 | namespace cv { 11 | namespace gapi { 12 | namespace streaming { 13 | 14 | enum class sync_policy { 15 | dont_sync, 16 | drop 17 | }; 18 | 19 | } // namespace streaming 20 | } // namespace gapi 21 | 22 | namespace detail { 23 | template<> struct CompileArgTag { 24 | static const char* tag() { return "gapi.streaming.sync_policy"; } 25 | }; 26 | 27 | } // namespace detail 28 | } // namespace cv 29 | 30 | #endif // OPENCV_GAPI_STREAMING_SYNC_HPP 31 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/util/copy_through_move.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) 2020 Intel Corporation 6 | 7 | #ifndef OPENCV_GAPI_UTIL_COPY_THROUGH_MOVE_HPP 8 | #define OPENCV_GAPI_UTIL_COPY_THROUGH_MOVE_HPP 9 | 10 | #include //decay_t 11 | 12 | namespace cv 13 | { 14 | namespace util 15 | { 16 | //This is a tool to move initialize captures of a lambda in C++11 17 | template 18 | struct copy_through_move_t{ 19 | T value; 20 | const T& get() const {return value;} 21 | T& get() {return value;} 22 | copy_through_move_t(T&& g) : value(std::move(g)) {} 23 | copy_through_move_t(copy_through_move_t&&) = default; 24 | copy_through_move_t(copy_through_move_t const& lhs) : copy_through_move_t(std::move(const_cast(lhs))) {} 25 | }; 26 | 27 | template 28 | copy_through_move_t> copy_through_move(T&& t){ 29 | return std::forward(t); 30 | } 31 | } // namespace util 32 | } // namespace cv 33 | 34 | #endif /* OPENCV_GAPI_UTIL_COPY_THROUGH_MOVE_HPP */ 35 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/gapi/util/type_traits.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) 2020 Intel Corporation 6 | 7 | 8 | #ifndef OPENCV_GAPI_UTIL_TYPE_TRAITS_HPP 9 | #define OPENCV_GAPI_UTIL_TYPE_TRAITS_HPP 10 | 11 | #include 12 | 13 | namespace cv 14 | { 15 | namespace util 16 | { 17 | //these are C++14 parts of type_traits : 18 | template< bool B, class T = void > 19 | using enable_if_t = typename std::enable_if::type; 20 | 21 | template 22 | using decay_t = typename std::decay::type; 23 | 24 | //this is not part of C++14 but still, of pretty common usage 25 | template 26 | using are_different_t = enable_if_t< !std::is_same, decay_t>::value, V>; 27 | 28 | } // namespace cv 29 | } // namespace util 30 | 31 | #endif // OPENCV_GAPI_UTIL_TYPE_TRAITS_HPP 32 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/highgui/highgui.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/highgui.hpp" 49 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/imgcodecs/imgcodecs.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/imgcodecs.hpp" 49 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/imgcodecs/ios.h: -------------------------------------------------------------------------------- 1 | 2 | /*M/////////////////////////////////////////////////////////////////////////////////////// 3 | // 4 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 5 | // 6 | // By downloading, copying, installing or using the software you agree to this license. 7 | // If you do not agree to this license, do not download, install, 8 | // copy or use the software. 9 | // 10 | // 11 | // License Agreement 12 | // For Open Source Computer Vision Library 13 | // 14 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 15 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #import 45 | #import 46 | #import 47 | #import 48 | #include "opencv2/core.hpp" 49 | 50 | //! @addtogroup imgcodecs_ios 51 | //! @{ 52 | 53 | CV_EXPORTS CGImageRef MatToCGImage(const cv::Mat& image) CF_RETURNS_RETAINED; 54 | CV_EXPORTS void CGImageToMat(const CGImageRef image, cv::Mat& m, bool alphaExist = false); 55 | CV_EXPORTS UIImage* MatToUIImage(const cv::Mat& image); 56 | CV_EXPORTS void UIImageToMat(const UIImage* image, 57 | cv::Mat& m, bool alphaExist = false); 58 | 59 | //! @} 60 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/imgcodecs/macosx.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 | #if !defined(__APPLE__) || !defined(__MACH__) 6 | #error This header should be used in macOS ObjC/Swift projects. 7 | #endif 8 | 9 | #import 10 | #include "opencv2/core.hpp" 11 | 12 | //! @addtogroup imgcodecs_macosx 13 | //! @{ 14 | 15 | CV_EXPORTS CGImageRef MatToCGImage(const cv::Mat& image) CF_RETURNS_RETAINED; 16 | CV_EXPORTS void CGImageToMat(const CGImageRef image, cv::Mat& m, bool alphaExist = false); 17 | CV_EXPORTS NSImage* MatToNSImage(const cv::Mat& image); 18 | CV_EXPORTS void NSImageToMat(const NSImage* image, cv::Mat& m, bool alphaExist = false); 19 | 20 | //! @} 21 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/imgproc/bindings.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_IMGPROC_BINDINGS_HPP 6 | #define OPENCV_IMGPROC_BINDINGS_HPP 7 | 8 | // This file contains special overloads for OpenCV bindings 9 | // No need to use these functions in C++ code. 10 | 11 | namespace cv { 12 | 13 | /** @brief Finds lines in a binary image using the standard Hough transform and get accumulator. 14 | * 15 | * @note This function is for bindings use only. Use original function in C++ code 16 | * 17 | * @sa HoughLines 18 | */ 19 | CV_WRAP static inline 20 | void HoughLinesWithAccumulator( 21 | InputArray image, OutputArray lines, 22 | double rho, double theta, int threshold, 23 | double srn = 0, double stn = 0, 24 | double min_theta = 0, double max_theta = CV_PI 25 | ) 26 | { 27 | std::vector lines_acc; 28 | HoughLines(image, lines_acc, rho, theta, threshold, srn, stn, min_theta, max_theta); 29 | Mat(lines_acc).copyTo(lines); 30 | } 31 | 32 | } // namespace 33 | 34 | #endif // OPENCV_IMGPROC_BINDINGS_HPP 35 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/imgproc/imgproc.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/imgproc.hpp" 49 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/ml/ml.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/ml.hpp" 49 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/objdetect/objdetect.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/objdetect.hpp" 49 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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_CALIB3D 14 | #define HAVE_OPENCV_CORE 15 | #define HAVE_OPENCV_DNN 16 | #define HAVE_OPENCV_FEATURES2D 17 | #define HAVE_OPENCV_FLANN 18 | #define HAVE_OPENCV_GAPI 19 | #define HAVE_OPENCV_HIGHGUI 20 | #define HAVE_OPENCV_IMGCODECS 21 | #define HAVE_OPENCV_IMGPROC 22 | #define HAVE_OPENCV_ML 23 | #define HAVE_OPENCV_OBJDETECT 24 | #define HAVE_OPENCV_PHOTO 25 | #define HAVE_OPENCV_STITCHING 26 | #define HAVE_OPENCV_VIDEO 27 | #define HAVE_OPENCV_VIDEOIO 28 | 29 | 30 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/photo/photo.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/photo.hpp" 49 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/stitching/detail/camera.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef OPENCV_STITCHING_CAMERA_HPP 44 | #define OPENCV_STITCHING_CAMERA_HPP 45 | 46 | #include "opencv2/core.hpp" 47 | 48 | namespace cv { 49 | namespace detail { 50 | 51 | //! @addtogroup stitching 52 | //! @{ 53 | 54 | /** @brief Describes camera parameters. 55 | 56 | @note Translation is assumed to be zero during the whole stitching pipeline. : 57 | */ 58 | struct CV_EXPORTS_W_SIMPLE CameraParams 59 | { 60 | CameraParams(); 61 | CameraParams(const CameraParams& other); 62 | CameraParams& operator =(const CameraParams& other); 63 | CV_WRAP Mat K() const; 64 | 65 | CV_PROP_RW double focal; // Focal length 66 | CV_PROP_RW double aspect; // Aspect ratio 67 | CV_PROP_RW double ppx; // Principal point X 68 | CV_PROP_RW double ppy; // Principal point Y 69 | CV_PROP_RW Mat R; // Rotation 70 | CV_PROP_RW Mat t; // Translation 71 | }; 72 | 73 | //! @} 74 | 75 | } // namespace detail 76 | } // namespace cv 77 | 78 | #endif // #ifndef OPENCV_STITCHING_CAMERA_HPP 79 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/video.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifndef OPENCV_VIDEO_HPP 45 | #define OPENCV_VIDEO_HPP 46 | 47 | /** 48 | @defgroup video Video Analysis 49 | @{ 50 | @defgroup video_motion Motion Analysis 51 | @defgroup video_track Object Tracking 52 | @defgroup video_c C API 53 | @} 54 | */ 55 | 56 | #include "opencv2/video/tracking.hpp" 57 | #include "opencv2/video/background_segm.hpp" 58 | 59 | #endif //OPENCV_VIDEO_HPP 60 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/video/video.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/video.hpp" 49 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/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_W bool hasBackend(VideoCaptureAPIs api); 43 | 44 | /** @brief Returns true if backend is built in (false if backend is used as plugin) */ 45 | CV_EXPORTS_W bool isBackendBuiltIn(VideoCaptureAPIs api); 46 | 47 | /** @brief Returns description and ABI/API version of videoio plugin's camera interface */ 48 | CV_EXPORTS_W std::string getCameraBackendPluginVersion( 49 | VideoCaptureAPIs api, 50 | CV_OUT int& version_ABI, 51 | CV_OUT int& version_API 52 | ); 53 | 54 | /** @brief Returns description and ABI/API version of videoio plugin's stream capture interface */ 55 | CV_EXPORTS_W std::string getStreamBackendPluginVersion( 56 | VideoCaptureAPIs api, 57 | CV_OUT int& version_ABI, 58 | CV_OUT int& version_API 59 | ); 60 | 61 | /** @brief Returns description and ABI/API version of videoio plugin's writer interface */ 62 | CV_EXPORTS_W std::string getWriterBackendPluginVersion( 63 | VideoCaptureAPIs api, 64 | CV_OUT int& version_ABI, 65 | CV_OUT int& version_API 66 | ); 67 | 68 | 69 | //! @} 70 | }} // namespace 71 | 72 | #endif // OPENCV_VIDEOIO_REGISTRY_HPP 73 | -------------------------------------------------------------------------------- /external/opencv_build/include/opencv4/opencv2/videoio/videoio.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/videoio.hpp" 49 | -------------------------------------------------------------------------------- /external/opencv_build/lib64/cmake/opencv4/OpenCVConfig-version.cmake: -------------------------------------------------------------------------------- 1 | set(OpenCV_VERSION 4.5.2) 2 | set(PACKAGE_VERSION ${OpenCV_VERSION}) 3 | 4 | set(PACKAGE_VERSION_EXACT False) 5 | set(PACKAGE_VERSION_COMPATIBLE False) 6 | 7 | if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION) 8 | set(PACKAGE_VERSION_EXACT True) 9 | set(PACKAGE_VERSION_COMPATIBLE True) 10 | endif() 11 | 12 | if(PACKAGE_FIND_VERSION_MAJOR EQUAL 4 13 | AND PACKAGE_FIND_VERSION VERSION_LESS PACKAGE_VERSION) 14 | set(PACKAGE_VERSION_COMPATIBLE True) 15 | endif() 16 | -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_calib3d.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_calib3d.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_core.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_core.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_dnn.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_dnn.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_features2d.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_features2d.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_flann.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_flann.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_gapi.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_gapi.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_highgui.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_highgui.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_imgcodecs.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_imgcodecs.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_imgproc.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_imgproc.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_ml.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_ml.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_objdetect.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_objdetect.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_photo.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_photo.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_stitching.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_stitching.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_video.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_video.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/lib64/libopencv_videoio.so.4.5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/lib64/libopencv_videoio.so.4.5.2 -------------------------------------------------------------------------------- /external/opencv_build/share/licenses/opencv4/SoftFloat-COPYING.txt: -------------------------------------------------------------------------------- 1 | 2 | License for Berkeley SoftFloat Release 3c 3 | 4 | John R. Hauser 5 | 2017 February 10 6 | 7 | The following applies to the whole of SoftFloat Release 3c as well as to 8 | each source file individually. 9 | 10 | Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the 11 | University of California. All rights reserved. 12 | 13 | Redistribution and use in source and binary forms, with or without 14 | modification, are permitted provided that the following conditions are met: 15 | 16 | 1. Redistributions of source code must retain the above copyright notice, 17 | this list of conditions, and the following disclaimer. 18 | 19 | 2. Redistributions in binary form must reproduce the above copyright 20 | notice, this list of conditions, and the following disclaimer in the 21 | documentation and/or other materials provided with the distribution. 22 | 23 | 3. Neither the name of the University nor the names of its contributors 24 | may be used to endorse or promote products derived from this software 25 | without specific prior written permission. 26 | 27 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY 28 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 29 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE 30 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY 31 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 32 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 33 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 34 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 36 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | -------------------------------------------------------------------------------- /external/opencv_build/share/licenses/opencv4/ippicv-third-party-programs.txt: -------------------------------------------------------------------------------- 1 | This third-party-programs.txt file applies to the Intel(R) Integrated Performance Primitives 2020 Gold 2 | There are not any Third Party Programs (as defined in the Agreement) included in this version of the Intel(R) Integrated Performance Primitives. -------------------------------------------------------------------------------- /external/opencv_build/share/licenses/opencv4/ippiw-support.txt: -------------------------------------------------------------------------------- 1 | Please use the following information when submitting customer support requests: 2 | 3 | Package ID: ippicv_2020_lnx_intel64_20191018_general 4 | Package Contents: Intel(R) Integrated Performance Primitives for OpenCV 2020 Gold 5 | 6 | Please direct customer support requests through http://www.intel.com/software/products/support -------------------------------------------------------------------------------- /external/opencv_build/share/licenses/opencv4/ippiw-third-party-programs.txt: -------------------------------------------------------------------------------- 1 | This third-party-programs.txt file applies to the Intel(R) Integrated Performance Primitives 2020 Gold 2 | There are not any Third Party Programs (as defined in the Agreement) included in this version of the Intel(R) Integrated Performance Primitives. -------------------------------------------------------------------------------- /external/opencv_build/share/licenses/opencv4/ittnotify-LICENSE.BSD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdeZhang/cpp_python_share_memory/fd09dc5626c123226dcb9a7ab99be2e5f3fd3f92/external/opencv_build/share/licenses/opencv4/ittnotify-LICENSE.BSD -------------------------------------------------------------------------------- /external/opencv_build/share/licenses/opencv4/libopenjp2-LICENSE: -------------------------------------------------------------------------------- 1 | /* 2 | * The copyright in this software is being made available under the 2-clauses 3 | * BSD License, included below. This software may be subject to other third 4 | * party and contributor rights, including patent rights, and no such rights 5 | * are granted under this license. 6 | * 7 | * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium 8 | * Copyright (c) 2002-2014, Professor Benoit Macq 9 | * Copyright (c) 2003-2014, Antonin Descampe 10 | * Copyright (c) 2003-2009, Francois-Olivier Devaux 11 | * Copyright (c) 2005, Herve Drolon, FreeImage Team 12 | * Copyright (c) 2002-2003, Yannick Verschueren 13 | * Copyright (c) 2001-2003, David Janssens 14 | * Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France 15 | * Copyright (c) 2012, CS Systemes d'Information, France 16 | * 17 | * All rights reserved. 18 | * 19 | * Redistribution and use in source and binary forms, with or without 20 | * modification, are permitted provided that the following conditions 21 | * are met: 22 | * 1. Redistributions of source code must retain the above copyright 23 | * notice, this list of conditions and the following disclaimer. 24 | * 2. Redistributions in binary form must reproduce the above copyright 25 | * notice, this list of conditions and the following disclaimer in the 26 | * documentation and/or other materials provided with the distribution. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' 29 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 30 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 31 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 32 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 33 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 34 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 35 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 36 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 37 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | * POSSIBILITY OF SUCH DAMAGE. 39 | */ 40 | -------------------------------------------------------------------------------- /external/opencv_build/share/licenses/opencv4/libtiff-COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright (c) 1988-1997 Sam Leffler 2 | Copyright (c) 1991-1997 Silicon Graphics, Inc. 3 | 4 | Permission to use, copy, modify, distribute, and sell this software and 5 | its documentation for any purpose is hereby granted without fee, provided 6 | that (i) the above copyright notices and this permission notice appear in 7 | all copies of the software and related documentation, and (ii) the names of 8 | Sam Leffler and Silicon Graphics may not be used in any advertising or 9 | publicity relating to the software without the specific, prior written 10 | permission of Sam Leffler and Silicon Graphics. 11 | 12 | THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 13 | EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 14 | WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR 17 | ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, 18 | OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 19 | WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 20 | LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 21 | OF THIS SOFTWARE. 22 | -------------------------------------------------------------------------------- /external/opencv_build/share/licenses/opencv4/opencl-headers-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2015 The Khronos Group Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | copy of this software and/or associated documentation files (the 5 | "Materials"), to deal in the Materials without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Materials, and to 8 | permit persons to whom the Materials are furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Materials. 13 | 14 | MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS 15 | KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS 16 | SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT 17 | https://www.khronos.org/registry/ 18 | 19 | THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 23 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 | MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 26 | -------------------------------------------------------------------------------- /external/opencv_build/share/licenses/opencv4/openexr-AUTHORS.ilmbase: -------------------------------------------------------------------------------- 1 | Developers: 2 | ----------- 3 | 4 | Florian Kainz 5 | Rod Bogart 6 | Drew Hess 7 | Bill Anderson 8 | Wojciech Jarosz 9 | 10 | Contributors: 11 | ------------- 12 | 13 | Rito Trevino 14 | Josh Pines 15 | Christian Rouet 16 | 17 | Win32 build system: 18 | ------------------- 19 | 20 | Nick Porcino 21 | Kimball Thurston 22 | -------------------------------------------------------------------------------- /external/opencv_build/share/licenses/opencv4/openexr-AUTHORS.openexr: -------------------------------------------------------------------------------- 1 | Developers: 2 | ----------- 3 | 4 | Florian Kainz 5 | Rod Bogart 6 | Drew Hess 7 | Paul Schneider 8 | Bill Anderson 9 | Wojciech Jarosz 10 | Andrew Kunz 11 | Piotr Stanczyk 12 | Peter Hillman 13 | Nick Porcino 14 | Kimball Thurston 15 | 16 | Contributors: 17 | ------------- 18 | 19 | Simon Green 20 | Rito Trevino 21 | Josh Pines 22 | Christian Rouet 23 | Rodrigo Damazio 24 | Greg Ward 25 | Joseph Goldstone 26 | Loren Carpenter, Pixar Animation Studios 27 | Nicholas Yue 28 | Yunfeng Bai (ILM) 29 | Pascal Jette (Autodesk) 30 | Karl Rasche, DreamWorks Animation 31 | 32 | Win32 build system: 33 | ------------------- 34 | 35 | Nick Porcino 36 | Kimball Thurston 37 | 38 | Win32 port contributors: 39 | ------------------------ 40 | 41 | Dustin Graves 42 | Jukka Liimatta 43 | Baumann Konstantin 44 | Daniel Koch 45 | E. Scott Larsen 46 | stephan mantler 47 | Andreas Kahler 48 | Frank Jargstorff 49 | Lutz Latta 50 | -------------------------------------------------------------------------------- /external/opencv_build/share/licenses/opencv4/openexr-LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006, Industrial Light & Magic, a division of Lucasfilm 2 | Entertainment Company Ltd. Portions contributed and copyright held by 3 | others as indicated. All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are 7 | met: 8 | 9 | * Redistributions of source code must retain the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above 14 | copyright notice, this list of conditions and the following 15 | disclaimer in the documentation and/or other materials provided with 16 | the distribution. 17 | 18 | * Neither the name of Industrial Light & Magic nor the names of 19 | any other contributors to this software may be used to endorse or 20 | promote products derived from this software without specific prior 21 | written permission. 22 | 23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 24 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 25 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 26 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 27 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 28 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 29 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 30 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 31 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 32 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 33 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | -------------------------------------------------------------------------------- /external/opencv_build/share/licenses/opencv4/protobuf-LICENSE: -------------------------------------------------------------------------------- 1 | This license applies to all parts of Protocol Buffers except the following: 2 | 3 | - Atomicops support for generic gcc, located in 4 | src/google/protobuf/stubs/atomicops_internals_generic_gcc.h. 5 | This file is copyrighted by Red Hat Inc. 6 | 7 | - Atomicops support for AIX/POWER, located in 8 | src/google/protobuf/stubs/atomicops_internals_power.h. 9 | This file is copyrighted by Bloomberg Finance LP. 10 | 11 | Copyright 2014, Google Inc. All rights reserved. 12 | 13 | Redistribution and use in source and binary forms, with or without 14 | modification, are permitted provided that the following conditions are 15 | met: 16 | 17 | * Redistributions of source code must retain the above copyright 18 | notice, this list of conditions and the following disclaimer. 19 | * Redistributions in binary form must reproduce the above 20 | copyright notice, this list of conditions and the following disclaimer 21 | in the documentation and/or other materials provided with the 22 | distribution. 23 | * Neither the name of Google Inc. nor the names of its 24 | contributors may be used to endorse or promote products derived from 25 | this software without specific prior written permission. 26 | 27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 28 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 29 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 30 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 31 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 32 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 33 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 34 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 35 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 36 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 37 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | 39 | Code generated by the Protocol Buffer compiler is owned by the owner 40 | of the input file used when generating it. This code is not 41 | standalone and requires a support library to be linked with it. This 42 | support library is itself covered by the above license. 43 | -------------------------------------------------------------------------------- /external/opencv_build/share/licenses/opencv4/protobuf-README.md: -------------------------------------------------------------------------------- 1 | Project: Protocol Buffers - Google's data interchange format 2 | Source code: https://github.com/protocolbuffers/protobuf 3 | Version: 3.5.2 4 | -------------------------------------------------------------------------------- /external/opencv_build/share/licenses/opencv4/quirc-LICENSE: -------------------------------------------------------------------------------- 1 | quirc -- QR-code recognition library 2 | Copyright (C) 2010-2012 Daniel Beer 3 | 4 | Permission to use, copy, modify, and/or distribute this software for 5 | any purpose with or without fee is hereby granted, provided that the 6 | above copyright notice and this permission notice appear in all 7 | copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 | WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 | WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 | AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 | DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 | PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 | PERFORMANCE OF THIS SOFTWARE. 17 | -------------------------------------------------------------------------------- /test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "cpp_src/share_memory.h" 3 | #include 4 | #include 5 | #include 6 | 7 | using namespace chrono; 8 | 9 | inline double GetSpan(std::chrono::system_clock::time_point start, std::chrono::system_clock::time_point end){ 10 | auto duration = std::chrono::duration_cast(end - start); 11 | return double(duration.count()) * std::chrono::microseconds::period::num / std::chrono::microseconds::period::den; 12 | } 13 | 14 | int main( int argc, char** argv ){ 15 | 16 | int img_rows = atoi(argv[1]); 17 | int img_cols = atoi(argv[2]); 18 | int img_nums = atoi(argv[3]); 19 | std::cout << "图片尺寸: " << img_rows << "*" << img_cols << std::endl; 20 | std::cout << "测试数量: " << img_nums << std::endl; 21 | 22 | std::cout << "=========开始传输数据=========" << std::endl; 23 | //cv::Mat Img = cv::imread(argv[2],cv::IMREAD_COLOR); 24 | cv::Mat Img = cv::Mat(img_rows, img_cols, CV_8UC3, cv::Scalar(0, 255, 0)); 25 | std::cout << "图片大小: " << Img.cols * Img.rows * Img.channels() << std::endl; 26 | 27 | ShareMem::ShareMemory ShareImpl(12331); 28 | ShareImpl.SetStatus(CAN_WRITE); 29 | ShareImpl.SetShareHead(Img.rows, Img.cols); 30 | ShareImpl.ShareMemoryPtr()->frame = 0; 31 | 32 | auto time_start = system_clock::now(); // 开始计时 33 | auto time_end = system_clock::now(); // 结束计时 34 | double time_send_total = 0; // 发送总时间 35 | 36 | while(true){ 37 | if (ShareImpl.FlagStatus() == CAN_WRITE){ 38 | if (ShareImpl.ShareMemoryPtr()->frame == 2){ 39 | time_start = system_clock::now(); 40 | time_send_total = 0; 41 | } 42 | auto time_start_cpy = system_clock::now(); 43 | 44 | ShareImpl.PutShareBody((u_char *)Img.data, Img.cols * Img.rows * Img.channels()); 45 | ShareImpl.ShareMemoryPtr()->frame++; 46 | 47 | auto time_end_cpy = system_clock::now(); 48 | time_send_total += GetSpan(time_start_cpy, time_end_cpy); 49 | 50 | } 51 | 52 | if (ShareImpl.ShareMemoryPtr()->frame >= img_nums && ShareImpl.ShareMemoryPtr()->flag == CAN_WRITE){ 53 | time_end = system_clock::now(); // 结束计时 54 | ShareImpl.ShareMemoryPtr()->flag = 3; 55 | break; 56 | } 57 | } 58 | 59 | std::cout<< "平均写入共享内存耗时: " << time_send_total *1000/(img_nums - 2)<<"ms"<