Skip to content

Instantly share code, notes, and snippets.

@tomoaki0705
tomoaki0705 / list.md
Last active Dec 31, 2020
List of generated binary in OpenCV 5.0.0
View list.md
$ ls bin
opencv_annotation               opencv_test_core
opencv_interactive-calibration  opencv_test_dnn
opencv_perf_3d                  opencv_test_features2d
opencv_perf_calib               opencv_test_flann
opencv_perf_core                opencv_test_gapi
opencv_perf_dnn                 opencv_test_highgui
opencv_perf_features2d          opencv_test_imgcodecs
opencv_perf_gapi                opencv_test_imgproc
@tomoaki0705
tomoaki0705 / text.md
Last active Apr 6, 2021
「OpenCVの画像処理をGPU(CUDA)で高速化する」を読んでresizeをマルチコア対応するお話。
View text.md

はじめに

OpenCVでの処理(リサイズなど)を、簡単にマルチコア化する方法をどなたかご存知でしたら教えて頂けないでしょうか? TBBを使ってスレッドを作る方法は色々見つかったのですが、単にcv::resize()をマルチコア動作で高速化させたいです。

TL;DR

  • Python バインディングが遅い
  • OpenCV の resize はずっと昔からマルチコア対応している
@tomoaki0705
tomoaki0705 / result.md
Last active Sep 6, 2020
Allocater test
View result.md
========= Type 32FC1 =============
data  :0xfd5600
data1 :0xfd57d4
stride:  1d4(468)
========= Type 32FC3 =============
data  :0xfd5600
data1 :0xfd5b7c
stride:  57c(1404)
========= Type 32FC3 =============
View buildlog.txt
$ cd ~/opencv_contrib
$ git reset --hard 80cdf41e
HEAD is now at 80cdf41e Merge pull request #2606 from DumDereDum:tsdf_fix_and_test
$ cd -
$ cd ~/opencv-fork
$ git reset --hard 3ebb877085
HEAD is now at 3ebb877085 refactor: remove unused _opencv_ffmpeg_free function
$ rm -rf build
$ mkdir build
$ cd build
View cmake_log.md
$ export
declare -x OPENCV_MAJOR_VERSION="4"
declare -x BUILD_DIR="build"
declare -x CMAKE_BUILD_OPTION="-DWITH_CUDA=ON -DOPENCV_CMAKE_CUDA_DEBUG=1"
declare -x CONTRIB_BRANCH="6d801fca93013d96d1e3851080084120f3b8b65f"
declare -x DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1001/bus"
declare -x EXECUTOR_NUMBER="0"
declare -x GTEST_FILTER="-videoio_dynamic.basic_write:videoio/Videoio_Synthetic.write_read_position*:videoio/Videoio_Writer.write_nothing*:videoio/videoio_synthetic.write_read_position/8:videoio/videoio_synthetic.write_read_position/11:videoio/videoio_synthetic.write_read_position/22:videoio/videoio_synthetic.write_read_position/25:CUDA_OptFlow/NvidiaOpticalFlow_1_0*:Objdetect_QRCode_Close.regression/4:Tracking/DistanceAndOverlap*:Video_FGDStatModel*:videoio/videoio_synthetic.write_read_position/9:videoio/videoio_synthetic.write_read_position/23"
declare -x HOME="/home/nvidia"
@tomoaki0705
tomoaki0705 / error.md
Created Jul 6, 2020
Test failure log of gapi
View error.md
CTEST_FULL_OUTPUT
OpenCV version: 4.4.0-pre
OpenCV VCS version: 4.3.0-532-g657c8d1
Build type: Release
Compiler: /usr/bin/c++  (ver 5.4.0)
Parallel framework: pthreads (nthreads=6)
CPU features: NEON FP16
OpenCL Platforms: 
    ARM Platform
View arm-jetson-tx2-opencv_test_cudabgsegm.txt
Started by upstream project "OpenCV-matrix-test-cuda" build number 65
originally caused by:
Started by upstream project "OpenCV-trigger" build number 709
originally caused by:
Started by an SCM change
Running as SYSTEM
Building remotely on arm-jetson-tx2 (arm) in workspace /home/nvidia/workspace/OpenCV-matrix-test-cuda/POSSIBLE_BRANCH/3/TARGET_JOB/opencv_test_cudabgsegm/TARGET_NODE/arm-jetson-tx2
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
@tomoaki0705
tomoaki0705 / notes.md
Last active Apr 16, 2020
test failure of opencv_test_objdetect
View notes.md
  • Tets passes on ODROID-XU4
  • Still, it fails on Jetson TX2
  • Both in Debug mode
  • Needed break points
2       breakpoint     keep y   0x0002f12e in opencv_test::(anonymous namespace)::Objdetect_QRCode_Close_regression_Test::Body()
                                           at /home/odroid/opencv-fork/modules/objdetect/test/test_qrcode.cpp:283
        breakpoint already hit 1 time
3       breakpoint     keep y   0xb6f7a6bc in cv::QRCodeDetector::detectAndDecode[abi:cxx11](cv::_InputArray const&, cv::_OutputArray const&, cv
@tomoaki0705
tomoaki0705 / README.md
Last active Apr 12, 2020
runtime unstable
View README.md
$ time ./bin/opencv_test_cudaimgproc --gtest_filter=*LBGR2Lab/* --gtest_repeat=1000 | grep -e OK -e FAILED |  cut -f 1 -d \( | sort | uniq -c
     14  1 FAILED TEST
    132  2 FAILED TESTS
    389  3 FAILED TESTS
    464  4 FAILED TESTS
     14 [  FAILED  ] 1 test, listed below:
    132 [  FAILED  ] 2 tests, listed below:
    389 [  FAILED  ] 3 tests, listed below:
View OpenCL_failure_log.txt
Configuring Python paths...
PYTHON2_DIR=C:\utils\soft\python27-x64
Set environment for VC14 compiler: x64
Run: C:\build\precommit_opencl\build\bin\Release\opencv_test_imgproc.exe --gtest_output=xml:results_test_imgproc-ippicv-opencl.xml --skip_unstable=1
CTEST_FULL_OUTPUT
OpenCV version: 3.4.10-dev
OpenCV VCS version: 3.4.10-3-g2586126
Build type: N/A
WARNING: build value differs from runtime: Release
Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe (ver 19.0.24215.1)