Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all 41027 articles
Browse latest View live

make error: undefined reference to `carotene_o4t::add(carotene_o4t::Size2D const&, float const*, int, float const*, int, float*, int)'

$
0
0
[ 35%] Linking CXX executable ../../bin/opencv_test_core ../../lib/libopencv_core.so.4.1.0: undefined reference to `carotene_o4t::add(carotene_o4t::Size2D const&, float const*, int, float const*, int, float*, int)' ../../lib/libopencv_core.so.4.1.0: undefined reference to `carotene_o4t::add(carotene_o4t::Size2D const&, short const*, int, short const*, int, short*, int, carotene_o4t::CONVERT_POLICY)' ../../lib/libopencv_core.so.4.1.0: undefined reference to `carotene_o4t::add(carotene_o4t::Size2D const&, unsigned char const*, int, unsigned char const*, int, unsigned char*, int, carotene_o4t::CONVERT_POLICY)' ../../lib/libopencv_core.so.4.1.0: undefined reference to `carotene_o4t::add(carotene_o4t::Size2D const&, unsigned short const*, int, unsigned short const*, int, unsigned short*, int, carotene_o4t::CONVERT_POLICY)' ../../lib/libopencv_core.so.4.1.0: undefined reference to `carotene_o4t::add(carotene_o4t::Size2D const&, int const*, int, int const*, int, int*, int, carotene_o4t::CONVERT_POLICY)' ../../lib/libopencv_core.so.4.1.0: undefined reference to `carotene_o4t::add(carotene_o4t::Size2D const&, signed char const*, int, signed char const*, int, signed char*, int, carotene_o4t::CONVERT_POLICY)' collect2: error: ld returned 1 exit status modules/core/CMakeFiles/opencv_test_core.dir/build.make:855: recipe for target 'bin/opencv_test_core' failed make[2]: *** [bin/opencv_test_core] Error 1 CMakeFiles/Makefile2:1275: recipe for target 'modules/core/CMakeFiles/opencv_test_core.dir/all' failed make[1]: *** [modules/core/CMakeFiles/opencv_test_core.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: *** [all] Error 2

could someone incorporate gstreamer pipeline into opencv_contrib aruco sample, please?

$
0
0
#include #include using namespace cv; using namespace std; int main(int argc, char** argv) { VideoCapture cap("rtspsrc location=rtsp://192.168.0.?:8554/test latency=30 ! decodebin ! nvvidconv ! appsink"); if (!cap.isOpened()) { cout << "Failed to open camera." << endl; return -1; } for(;;) { Mat frame; cap >> frame; Mat bgr; cvtColor(frame, bgr, COLOR_YUV2BGR_NV12); imshow("original", bgr); waitKey(1); } cap.release(); } enter code here

multi-user image display

$
0
0
Using python and OpenCV, is it possible to display the same image on multiple users? Or choose a user to display the image? I am using cv2.imshow but it only displays the image for the user that runs the script. Thanks

OpenCV with VSCode

$
0
0
Thank you always for your help. I am trying to compile an OpenCV project with Visual Studio Code on Ubuntu. The code is like this: include iostream; include opencv2/core.hpp; include opencv2/highgui.hpp; include opencv2/imgcodecs.hpp; using namespace cv; int main() { Mat mat = cv::imread("image.jpg", cv::IMREAD_COLOR); namedWindow("Test", cv::WINDOW_AUTOSIZE); imshow("Test", mat); WaitKey(0); destroyAllWindows(); return 0; } I am sorry to write the "include" lines in a wired form. The question form seems to render differently. The code was successfully compiled by g++ test.cpp -I/usr/local/include/opencv4 -L/usr/local/lib -lopencv_core -lopencv_imgcodecs -lopencv_highgui but I cannot see how can I compile on VSCode. I modified the c_cpp_properties.json file as "includePath":[${workspaceFolder}/**, "/usr/local/include/opencv4", /usr/local/lib] but it complains that fatal error: opencv2/core.hpp: No such file or directory. I also cannot understand why there have been generated two opencv.hpp files in my environment: /home/user-name/opencv/include/opencv2/opencv.hpp /usr/local/include/opencv4/opencv2/opencv.hpp This duplicate files might cause the problem? Thank you advance:)

Where can I find the cmake options used for the 4.1.0 build

$
0
0
I was having some issues with my custom build and decided to try the prebuilt and sure enough it worked. So now I am trying to find what cmake settings were used to build the default one. Also how do you get it to output the python bindings to build to the opencv/build/python directory mine keeps trying to put it into my python environment. *EDIT:* I am using visual studio 15 2017 and cmake. Basically what I am trying to do is get the package build to work. However when I go to build it is grabbing absolute paths for my python environment. I am no longer using anaconda to do this but using the standard python 3.7.3 environment. I notice that the prebuilt 4.1.0 doesn't have this issue. I also notice that I am having a cmake warning pop up: CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message): CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install directory Call Stack (most recent call first): CMakeLists.txt:1066 (include) Below is my first configuration run and my generation run separated into two separate blocks: CONFIGURATION: The CXX compiler identification is MSVC 19.16.27030.1 The C compiler identification is MSVC 19.16.27030.1 Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Detecting C compile features Detecting C compile features - done Performing Test HAVE_CXX11 (check file: cmake/checks/cxx11.cpp) Performing Test HAVE_CXX11 - Success Found PythonInterp: C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/python.exe (found suitable version "3.7.3", minimum required is "2.7") CMake Warning at cmake/OpenCVDetectPython.cmake:81 (message): CMake's 'find_host_package(PythonInterp 2.7)' founds wrong Python version: PYTHON_EXECUTABLE=C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/python.exe PYTHON_VERSION_STRING=3.7.3 Consider specify 'PYTHON2_EXECUTABLE' variable via CMake command line or environment variables Call Stack (most recent call first): cmake/OpenCVDetectPython.cmake:275 (find_python) CMakeLists.txt:689 (include) Could NOT find Python2 (missing: Python2_EXECUTABLE Interpreter) Found PythonInterp: C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/python.exe (found suitable version "3.7.3", minimum required is "3.2") Found PythonLibs: optimized;C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/libs/python37.lib;debug;C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/libs/python37_d.lib (found suitable exact version "3.7.3") Performing Test HAVE_CPU_SSE3_SUPPORT (check file: cmake/checks/cpu_sse3.cpp) Performing Test HAVE_CPU_SSE3_SUPPORT - Success Performing Test HAVE_CPU_SSSE3_SUPPORT (check file: cmake/checks/cpu_ssse3.cpp) Performing Test HAVE_CPU_SSSE3_SUPPORT - Success Performing Test HAVE_CPU_SSE4_1_SUPPORT (check file: cmake/checks/cpu_sse41.cpp) Performing Test HAVE_CPU_SSE4_1_SUPPORT - Success Performing Test HAVE_CPU_POPCNT_SUPPORT (check file: cmake/checks/cpu_popcnt.cpp) Performing Test HAVE_CPU_POPCNT_SUPPORT - Success Performing Test HAVE_CPU_SSE4_2_SUPPORT (check file: cmake/checks/cpu_sse42.cpp) Performing Test HAVE_CPU_SSE4_2_SUPPORT - Success Performing Test HAVE_CXX_ARCH:AVX (check file: cmake/checks/cpu_fp16.cpp) Performing Test HAVE_CXX_ARCH:AVX - Success Performing Test HAVE_CXX_ARCH:AVX2 (check file: cmake/checks/cpu_avx2.cpp) Performing Test HAVE_CXX_ARCH:AVX2 - Success Performing Test HAVE_CPU_AVX_512F_SUPPORT (check file: cmake/checks/cpu_avx512.cpp) Performing Test HAVE_CPU_AVX_512F_SUPPORT - Failed AVX_512F is not supported by C++ compiler Performing Test HAVE_CPU_AVX512_SKX_SUPPORT (check file: cmake/checks/cpu_avx512skx.cpp) Performing Test HAVE_CPU_AVX512_SKX_SUPPORT - Failed AVX512_SKX is not supported by C++ compiler Dispatch optimization AVX512_SKX is not available, skipped Performing Test HAVE_CPU_BASELINE_FLAGS Performing Test HAVE_CPU_BASELINE_FLAGS - Success Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_1 Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_1 - Success Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_2 Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_2 - Success Performing Test HAVE_CPU_DISPATCH_FLAGS_FP16 Performing Test HAVE_CPU_DISPATCH_FLAGS_FP16 - Success Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX - Success Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX2 Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX2 - Success Check if the system is big endian Searching 16 bit integer Looking for sys/types.h Looking for sys/types.h - found Looking for stdint.h Looking for stdint.h - found Looking for stddef.h Looking for stddef.h - found Check size of unsigned short Check size of unsigned short - done Using unsigned short Check if the system is big endian - little endian Looking for fseeko Looking for fseeko - not found Check size of off64_t Check size of off64_t - failed libjpeg-turbo: VERSION = 2.0.2, BUILD = opencv-4.1.0-dev-libjpeg-turbo Check size of size_t Check size of size_t - done Check size of unsigned long Check size of unsigned long - done Looking for include file intrin.h Looking for include file intrin.h - found Looking for assert.h Looking for assert.h - found Looking for fcntl.h Looking for fcntl.h - found Looking for inttypes.h Looking for inttypes.h - found Looking for io.h Looking for io.h - found Looking for limits.h Looking for limits.h - found Looking for malloc.h Looking for malloc.h - found Looking for memory.h Looking for memory.h - found Looking for search.h Looking for search.h - found Looking for string.h Looking for string.h - found Performing Test C_HAS_inline Performing Test C_HAS_inline - Success Check size of signed short Check size of signed short - done Check size of unsigned short Check size of unsigned short - done Check size of signed int Check size of signed int - done Check size of unsigned int Check size of unsigned int - done Check size of signed long Check size of signed long - done Check size of signed long long Check size of signed long long - done Check size of unsigned long long Check size of unsigned long long - done Check size of unsigned char * Check size of unsigned char * - done Check size of ptrdiff_t Check size of ptrdiff_t - done Looking for memmove Looking for memmove - not found Looking for setmode Looking for setmode - found Looking for strcasecmp Looking for strcasecmp - not found Looking for strchr Looking for strchr - found Looking for strrchr Looking for strrchr - found Looking for strstr Looking for strstr - found Looking for strtol Looking for strtol - found Looking for strtol Looking for strtol - found Looking for strtoull Looking for strtoull - found Looking for lfind Looking for lfind - found Performing Test HAVE_SNPRINTF Performing Test HAVE_SNPRINTF - Success Check if the system is big endian Searching 16 bit integer Using unsigned short Check if the system is big endian - little endian IPPICV: Download: ippicv_2019_win_intel64_20180723_general.zip found Intel IPP (ICV version): 2019.0.0 [2019.0.0 Gold] at: C:/opencv/build/opencv_37/3rdparty/ippicv/ippicv_win/icv found Intel IPP Integration Wrappers sources: 2019.0.0 at: C:/opencv/build/opencv_37/3rdparty/ippicv/ippicv_win/iw Could not find OpenBLAS include. Turning OpenBLAS_FOUND off Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off Looking for sgemm_ Looking for sgemm_ - not found Looking for pthread.h Looking for pthread.h - not found Found Threads: TRUE Could NOT find BLAS (missing: BLAS_LIBRARIES) LAPACK requires BLAS A library with LAPACK API not found. Please specify library location. Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file ADE: Download: v0.1.1d.zip OpenCV Python: during development append to PYTHONPATH: C:/opencv/build/opencv_37/python_loader Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) FFMPEG: Download: opencv_ffmpeg.dll FFMPEG: Download: opencv_ffmpeg_64.dll FFMPEG: Download: ffmpeg_version.cmake Looking for mfapi.h Looking for mfapi.h - found Looking for d3d11_4.h Looking for d3d11_4.h - found Excluding from source files list: modules/imgproc/src/sumpixels.avx512_skx.cpp Excluding from source files list: /modules/dnn/layers/layers_common.avx512_skx.cpp CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message): CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install directory Call Stack (most recent call first): CMakeLists.txt:1066 (include) General configuration for OpenCV 4.1.0-dev ===================================== Version control: 4.1.0-76-gd0032b071 Platform: Timestamp: 2019-04-23T04:00:00Z Host: Windows 10.0.17763 AMD64 CMake: 3.14.2 CMake generator: Visual Studio 15 2017 CMake build tool: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe MSVC: 1916 CPU/HW features: Baseline: SSE SSE2 SSE3 requested: SSE3 Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2 requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX SSE4_1 (15 files): + SSSE3 SSE4_1 SSE4_2 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX AVX2 (29 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 C/C++: Built as dynamic libs?: YES C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe (ver 19.16.27030.1) C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP12 /MD /O2 /Ob2 /DNDEBUG C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP12 /MDd /Zi /Ob0 /Od /RTC1 C Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP12 /MD /O2 /Ob2 /DNDEBUG C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP12 /MDd /Zi /Ob0 /Od /RTC1 Linker flags (Release): /machine:x64 /INCREMENTAL:NO Linker flags (Debug): /machine:x64 /debug /INCREMENTAL ccache: NO Precompiled headers: YES Extra dependencies: 3rdparty dependencies: OpenCV modules: To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo python3 stitching ts video videoio Disabled: world Disabled by dependency: - Unavailable: java js python2 Applications: tests perf_tests apps Documentation: NO Non-free algorithms: NO Windows RT support: NO GUI: Win32 UI: YES VTK support: NO Media I/O: ZLib: build (ver 1.2.11) JPEG: build-libjpeg-turbo (ver 2.0.2-62) WEBP: build (ver encoder: 0x020e) PNG: build (ver 1.6.36) TIFF: build (ver 42 - 4.0.10) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1) HDR: YES SUNRASTER: YES PXM: YES PFM: YES Video I/O: DC1394: NO FFMPEG: YES (prebuilt binaries) avcodec: YES (58.35.100) avformat: YES (58.20.100) avutil: YES (56.22.100) swscale: YES (5.3.100) avresample: YES (4.0.0) GStreamer: YES (1.15.90) DirectShow: YES Media Foundation: YES DXVA: YES Parallel framework: Concurrency Trace: YES (with Intel ITT) Other third-party libraries: Intel IPP: 2019.0.0 Gold [2019.0.0] at: C:/opencv/build/opencv_37/3rdparty/ippicv/ippicv_win/icv Intel IPP IW: sources (2019.0.0) at: C:/opencv/build/opencv_37/3rdparty/ippicv/ippicv_win/iw Lapack: NO Eigen: NO Custom HAL: NO Protobuf: build (3.5.1) OpenCL: YES (NVD3D11) Include path: C:/opencv/source/opencv/3rdparty/include/opencl/1.2 Link libraries: Dynamic load Python 3: Interpreter: C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/python.exe (ver 3.7.3) Libraries: optimized C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/libs/python37.lib debug C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/libs/python37_d.lib (ver 3.7.3) numpy: C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/lib/site-packages/numpy/core/include (ver 1.16.2) install path: C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/Lib/site-packages/cv2/python-3.7 Python (for build): C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/python.exe Java: ant: NO JNI: NO Java wrappers: NO Java tests: NO Install to: C:/opencv/build/opencv_37/install ----------------------------------------------------------------- Configuring done GENERATION: Found PythonInterp: C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/python.exe (found suitable version "3.7.3", minimum required is "2.7") AVX_512F is not supported by C++ compiler AVX512_SKX is not supported by C++ compiler Dispatch optimization AVX512_SKX is not available, skipped libjpeg-turbo: VERSION = 2.0.2, BUILD = opencv-4.1.0-dev-libjpeg-turbo found Intel IPP (ICV version): 2019.0.0 [2019.0.0 Gold] at: C:/opencv/build/opencv_37/3rdparty/ippicv/ippicv_win/icv found Intel IPP Integration Wrappers sources: 2019.0.0 at: C:/opencv/build/opencv_37/3rdparty/ippicv/ippicv_win/iw Could not find OpenBLAS include. Turning OpenBLAS_FOUND off Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off Could NOT find BLAS (missing: BLAS_LIBRARIES) LAPACK requires BLAS A library with LAPACK API not found. Please specify library location. Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file OpenCV Python: during development append to PYTHONPATH: C:/opencv/build/opencv_37/python_loader Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Caffe: NO Protobuf: NO Glog: NO freetype2: NO harfbuzz: NO Module opencv_ovis disabled because OGRE3D was not found No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available. Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake. Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components. Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags Excluding from source files list: modules/imgproc/src/sumpixels.avx512_skx.cpp Excluding from source files list: /modules/dnn/layers/layers_common.avx512_skx.cpp Tesseract: NO xfeatures2d/boostdesc: Download: boostdesc_bgm.i xfeatures2d/boostdesc: Download: boostdesc_bgm_bi.i xfeatures2d/boostdesc: Download: boostdesc_bgm_hd.i xfeatures2d/boostdesc: Download: boostdesc_binboost_064.i xfeatures2d/boostdesc: Download: boostdesc_binboost_128.i xfeatures2d/boostdesc: Download: boostdesc_binboost_256.i xfeatures2d/boostdesc: Download: boostdesc_lbgm.i xfeatures2d/vgg: Download: vgg_generated_48.i xfeatures2d/vgg: Download: vgg_generated_64.i xfeatures2d/vgg: Download: vgg_generated_80.i xfeatures2d/vgg: Download: vgg_generated_120.i data: Download: face_landmark_model.dat CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message): CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install directory Call Stack (most recent call first): CMakeLists.txt:1066 (include) General configuration for OpenCV 4.1.0-dev ===================================== Version control: 4.1.0-76-gd0032b071 Extra modules: Location (extra): C:/opencv/source/opencv_contrib/modules Version control (extra): 4.1.0-20-g64eba174 Platform: Timestamp: 2019-04-23T04:00:00Z Host: Windows 10.0.17763 AMD64 CMake: 3.14.2 CMake generator: Visual Studio 15 2017 CMake build tool: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe MSVC: 1916 CPU/HW features: Baseline: SSE SSE2 SSE3 requested: SSE3 Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2 requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX SSE4_1 (15 files): + SSSE3 SSE4_1 SSE4_2 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX AVX2 (29 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 C/C++: Built as dynamic libs?: YES C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe (ver 19.16.27030.1) C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP12 /MD /O2 /Ob2 /DNDEBUG C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP12 /MDd /Zi /Ob0 /Od /RTC1 C Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP12 /MD /O2 /Ob2 /DNDEBUG C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP12 /MDd /Zi /Ob0 /Od /RTC1 Linker flags (Release): /machine:x64 /INCREMENTAL:NO Linker flags (Debug): /machine:x64 /debug /INCREMENTAL ccache: NO Precompiled headers: YES Extra dependencies: 3rdparty dependencies: OpenCV modules: To be built: aruco bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dpm face features2d flann fuzzy gapi hfs highgui img_hash imgcodecs imgproc line_descriptor ml objdetect optflow phase_unwrapping photo plot python3 quality reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto Disabled: world Disabled by dependency: - Unavailable: cnn_3dobj cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv freetype hdf java js matlab ovis python2 sfm viz Applications: tests perf_tests apps Documentation: NO Non-free algorithms: NO Windows RT support: NO GUI: Win32 UI: YES VTK support: NO Media I/O: ZLib: build (ver 1.2.11) JPEG: build-libjpeg-turbo (ver 2.0.2-62) WEBP: build (ver encoder: 0x020e) PNG: build (ver 1.6.36) TIFF: build (ver 42 - 4.0.10) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1) HDR: YES SUNRASTER: YES PXM: YES PFM: YES Video I/O: DC1394: NO FFMPEG: YES (prebuilt binaries) avcodec: YES (58.35.100) avformat: YES (58.20.100) avutil: YES (56.22.100) swscale: YES (5.3.100) avresample: YES (4.0.0) GStreamer: YES (1.15.90) DirectShow: YES Media Foundation: YES DXVA: YES Parallel framework: Concurrency Trace: YES (with Intel ITT) Other third-party libraries: Intel IPP: 2019.0.0 Gold [2019.0.0] at: C:/opencv/build/opencv_37/3rdparty/ippicv/ippicv_win/icv Intel IPP IW: sources (2019.0.0) at: C:/opencv/build/opencv_37/3rdparty/ippicv/ippicv_win/iw Lapack: NO Eigen: NO Custom HAL: NO Protobuf: build (3.5.1) OpenCL: YES (NVD3D11) Include path: C:/opencv/source/opencv/3rdparty/include/opencl/1.2 Link libraries: Dynamic load Python 3: Interpreter: C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/python.exe (ver 3.7.3) Libraries: optimized C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/libs/python37.lib debug C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/libs/python37_d.lib (ver 3.7.3) numpy: C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/lib/site-packages/numpy/core/include (ver 1.16.2) install path: C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/Lib/site-packages/cv2/python-3.7 Python (for build): C:/Users/DoD_Admin/AppData/Local/Programs/Python/Python37/python.exe Java: ant: NO JNI: NO Java wrappers: NO Java tests: NO Install to: C:/opencv/build/opencv_37/install ----------------------------------------------------------------- Configuring done Generating done

What is the best way to overlay multiple smaller images onto a bigger image ?

$
0
0
To overlay one image onto another, we can use addWeighted with alpha=1.0. But my use case is to overlay multiple images onto a bigger image. Is there any openCV API which takes in an arbitrary number of images and merges into one ?

How to element-wise multiplication of Mat.

$
0
0
Mat A; Mat B; Mat C; C = A * B; //element_wise; Expected result: Assume A = [a, b, c; d, e, f; g, h, i]; B = [1, 2, 3; 4, 5, 6; 7, 8, 9]; C = [a * 1, b * 2, c * 3; d * 4, e * 5, f * 6; g * 7, h * 8, i * 9]; Can I use the cv::multiply(A, B, C); ?

Runing python Surface-Matching sample code leads to different result

$
0
0
I run the sample code of surface matching with python, but get the difference result with official website. ![image description](/upfiles/15560236572005649.jpg) here is my code: def Match(modelname, surfacename, resultname): N = 2 detector = cv.ppf_match_3d_PPF3DDetector(0.025, 0.05) model = cv.ppf_match_3d.loadPLYSimple(modelname, 1) detector.trainModel(model) pcTest = cv.ppf_match_3d.loadPLYSimple(surfacename, 1) results = detector.match(pcTest, 1.0 / 40.0, 0.05) icp = cv.ppf_match_3d_ICP(100) _, results = icp.registerModelToScene(model, pcTest, results[:N]) for i, result in enumerate(results): print("\n-- Pose to Model Index %d: NumVotes = %d, Residual = %f\n%s\n" % ( result.modelIndex, result.numVotes, result.residual, result.pose)) if i == 0: pct = cv.ppf_match_3d.transformPCPose(model, result.pose) cv.ppf_match_3d.writePLY(pct, resultname) and the model and scene I used https://github.com/opencv/opencv_contrib/blob/master/modules/surface_matching/samples/data/parasaurolophus_6700.ply https://github.com/opencv/opencv_contrib/blob/master/modules/surface_matching/samples/data/rs1_normals.ply could any one give me some tips?

Searching for image in large database

$
0
0
Hi, I am trying to build image search engine that would allow searching for image/part of the image inside a large database of images. The plan is following: 1) Index all database images by extracting their SURF feature descriptors 2) Extract SURF descriptors from the file we want to find 3) Find the best match inside a database I am stuck in a 3) where I cannot perform really fast search inside a database. Approaches like "Feature Matching with FLANN" work, but are slow and unscalable on large datasets. Please point me to the right direction on how to: 1) perform a really fast search 2) prepare SURF descriptors so that they could be indexed (the size of outgoing descriptors varies from image to image, and I guess needs to be normalized somehow)

net.forward() crash in Faster-RCNN Object Detection Sample

$
0
0
Hello, I'm trying to run the Objection Detection Sample ([object_detection.cpp](https://github.com/opencv/opencv/blob/master/samples/dnn/object_detection.cpp)) from the opencv repo. I'm using "faster_rcnn_inception_v2_coco_2018_01_28" model from open model zoo. But I'm experiencing error when I my code reaches **net.forward()->...->initInfEngine()**. ![image description](/upfiles/15560279028050335.png) **Stack Trace**: > opencv_world410d.dll!cv::dnn::DetectionOutputLayerImpl::initInfEngine(const std::vector,std::allocator>>& __formal) Line 956 C++ opencv_world410d.dll!cv::dnn::dnn4_v20190412::Net::Impl::initInfEngineBackend() Line 1679 C++ opencv_world410d.dll!cv::dnn::dnn4_v20190412::Net::Impl::initBackend() Line 1396 C++ opencv_world410d.dll!cv::dnn::dnn4_v20190412::Net::Impl::setUpNet(const std::vector>& blobsToKeep_) Line 1255 C++ opencv_world410d.dll!cv::dnn::dnn4_v20190412::Net::forward(const cv::debug_build_guard::_OutputArray & outputBlobs, const std::vector,std::allocator>,std::allocator,std::allocator>>>& outBlobNames) Line 2844 C++ Obj_demo.exe!main(int argc, char * * argv) Line 150 C++ OS: Windows 10 IDE: Visual Studio 2015 Opencv 4.1.0 (opencv-master) Openvino 2019 R1 **Test 1**: crash modelPath = **frozen_inference_graph.pb** from [faster_rcnn_inception_v2_coco_2018_01_28.tar.gz](http://download.tensorflow.org/models/object_detection/faster_rcnn_inception_v2_coco_2018_01_28.tar.gz) configPath = [faster_rcnn_inception_v2_coco_2018_01_28.pbtxt](https://github.com/opencv/opencv_extra/raw/master/testdata/dnn/faster_rcnn_inception_v2_coco_2018_01_28.pbtxt) **Test 2**: Same as test1, except I put the model through Openvino's model optimizer. Still crashes. > python "C:\Program Files > (x86)\IntelSWTools\openvino_2019.1.087\deployment_tools\model_optimizer/mo_tf.py" > **--input_model**=C:\models\faster_rcnn_inception_v2_coco_2018_01_28\frozen_inference_graph.pb > **--tensorflow_use_custom_operations_config** > "C:\Program Files > (x86)\IntelSWTools\openvino_2019.1.087\deployment_tools\model_optimizer\extensions\front\tf\faster_rcnn_support.json" > **--tensorflow_object_detection_api_pipeline_config** > C:\models\faster_rcnn_inception_v2_coco_2018_01_28\pipeline.config And then I feed the xml and bin to dnn:readnet() **Test3**: Use **DNN_BACKEND_OPENCV**, works. (just for information) > net.setPreferableBackend(DNN_BACKEND_OPENCV); Appreciate any help!

Calculate median/mode but ignore black colour

$
0
0
In OpenCV Python, I have masked out parts of the image, thus they are black. I need to calculate the median (or mode) colour that occurs in the image but ignore the masked/black pixels. How can I do this because the functions I use still consider black pixels AFAIK: mode = scipy.stats.mode(img) # will consider black pixels wont it? median = np.median(img, axis=(0,1)) # will consider black pixels wont it?

Batch inference not working when InferenceEngine as backend

$
0
0
Hi, I am using OpenCV DNN module for NN inference. Inference on single image, i.e. batch size of 1 works fine but when I try to use more than one images in inference batch, it fails giving error what(): OpenCV(4.0.1-openvino) /home/jenkins/workspace/OpenCV/OpenVINO/build/opencv/modules/dnn/src/op_inf_engine.cpp:553: error: (-215:Assertion failed) Failed to initialize Inference Engine backend: Input blob size is not equal network input size (1350000!=270000). in function 'initPlugin' I am using blobFromImages instead of blobFromImage. Blob has 'batch_size' images in it but just inference doesn't work. I know OpenVINO API has SetBatch() method. Should I instead switch to OpenVINO API for inference? Thanks for your time.

detectAndCompute method not working for useProvidedKeypoints flag

$
0
0
(JAVA) I am using Akaze to detect keypoints. I then prune keypoints according to few criteria. But passing those keypoints to the detectAndCompute method by setting the 'useProvidedKeypoints' flag to true, doesn't compute the descriptor. Instead the keypoint becomes null after calling the method. Please post the necessary fix.

How to count how many times a point was tracked with opticalFlow

$
0
0
Hello, I'm trying to color points that have been tracked by calcOpticalFlowPyrLK based on how long they have been tracked to mark some "stable" points. So e.g. points that have been tracked in 3 less than 10 consecutive pictures shall be marked in blue while points that have been tracked in more than 10 consecutive pictures shall be marked in green. But I'm stucking on how to count this (intensity shall be my counter). I have tried this: calcOpticalFlowPyrLK(img_1, img_2, points1, points2, status, err, winSize, 3, termcrit, 0, 0.001); int indexCorrection = 0; for (int i = 0; i

problem with stereoRectify() results [magnified output]

$
0
0
Hello, newbie here. I have problems concerning the rectification of a stereo image pair. I have as a input videos from a pair of cameras attached to a stereo microscope. My final task is to 3D reconstruct the result. At this point I have stereo calibrated them with a reprojection error of about 1.1 per camera and 4 for the stereo result. After, I pass the calibration results for stereo rectification in stereoRectify() and remap. stereoRectify(KL , DL , KR , DR , image_size , R , T , R1 , R2 , P1 , P2 , Q , 0, 0.01 ) ; initUndistortRectifyMap(KL,DL,R1,P1,image_size, CV_16SC2 , map11, map12) ; initUndistortRectifyMap(KR,DR,R2,P2,image_size, CV_16SC2 , map21, map22) ; remap(initial_image[0],remappedImage0, map11,map12, INTER_LINEAR, BORDER_CONSTANT, Scalar()); remap(initial_image[1],remappedImage1, map21,map22, INTER_LINEAR, BORDER_CONSTANT, Scalar()); Now the output image pair looks rectified, but its a scaled up version of the input. Actually I see only a magnified region of the center on both final images as the rectification result. I try to realize why this is happening, but I'm still missing something and I'm stuck. Is there any hint or reference or someone that has faced similar problems in the past? I attach a couple of images for reference. One is with the pair of the original and the rectified image (where the zoom in is obvious), and the second one is the rectification result. Any help would be invaluable. My opencv version is 3.4.5 on Linux Mint 18.3 -A pair of the original and the rectified image ![A pair of the original and the rectified image](/upfiles/1555429439424476.jpg) - Stereo rectification image pair ![Stereo rectification image pair](/upfiles/15554295311831289.jpg)

Copy smaller mat to part of bigger mat

$
0
0
Hello everyone, I have a mat1 (320x100), that I want to copy to a part of a bigger mat2 (320x480), so mat1 starts at (0, 75) from mat2 and ends at (320, 175). How do I do this? I would also like to now how to create a mat of a given color (e.g. mat3 (320x480) that is totally blue). How do I do this? I am using OpenCV 3.4.6 for android. Thank you in advance

Hi. Trying to troubleshoot this error

i have 6 errors when trying to install opencv on my macbook pro

$
0
0
/Users/vadli/Documents/ opencv-4.1.0/modules/core/include/opencv2/core/cvdef.h:782:39: error: use of undeclared identifier '_mm_cvtps_ph'; did you mean '_mm_cvtss_sd'? w = (ushort)_mm_cvtsi128_si32(_mm_cvtps_ph(v, 0)); ^~~~~~~~~~~~ _mm_cvtss_sd /Users/vadli/Documents/opencv-4.1.0/modules/core/include/opencv2/core/cvdef.h:782:55: error: cannot initialize a parameter of type '__m128' (vector of 4 'float' values) with an rvalue of type 'int' w = (ushort)_mm_cvtsi128_si32(_mm_cvtps_ph(v, 0)); /Users/vadli/Documents/opencv-4.1.0/modules/core/include/opencv2/core/cvdef.h:813:26: error: use of undeclared identifier '_mm_cvtph_ps'; did you mean '_mm_cvtpd_ps'? _mm_store_ss(&f, _mm_cvtph_ps(_mm_cvtsi32_si128(w))); ^~~~~~~~~~~~ _mm_cvtpd_ps /Users/vadli/Documents/opencv-4.1.0/modules/core/include/opencv2/core/hal/intrin_avx.hpp:2746:24: error: use of undeclared identifier '_mm256_cvtph_ps'; did you mean '_mm256_cvtpd_ps'? return v_float32x8(_mm256_cvtph_ps(_mm_loadu_si128((const __m128i*)ptr))); ^~~~~~~~~~~~~~~ _mm256_cvtpd_ps /Users/vadli/Documents/opencv-4.1.0/modules/core/include/opencv2/core/hal/intrin_avx.hpp:2746:40: error: cannot initialize a parameter of type '__m256d' (vector of 4 'double' values) with an rvalue of type '__m128i' (vector of 2 'long long' values) return v_float32x8(_mm256_cvtph_ps(_mm_loadu_si128((const __m128i*)ptr))); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/vadli/Documents/opencv-4.1.0/modules/core/include/opencv2/core/hal/intrin_avx.hpp:2751:18: error: use of undeclared identifier '_mm256_cvtps_ph' __m128i ah = _mm256_cvtps_ph(a.val, 0); ^ 6 errors generated. make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/mathfuncs_core.avx2.cpp.o] Error 1 make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2 make: *** [all] Error 2

Could not connect pins - RenderStream() UnityEngine.WebCamTexture:Play()

$
0
0
I am trying to use my Intel D435 depth camera for face tracking but i am getting this error in unity.

how to create 4 dims array using CvMatND.

$
0
0
Hi @dkurt, @berak how to create 4 dims array using CvMatND, I have to create an array for (1 x 64 x 64 x 3) matrix.
Viewing all 41027 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>