if(DEBUG_opencv_calib3d)
list(APPEND debug_modules opencv_highgui)
endif()
- ocv_define_module(calib3d opencv_imgproc opencv_features2d opencv_flann ${debug_modules} WRAP java python)
-ocv_define_module(calib3d opencv_imgproc opencv_features2d ${debug_modules}
++ocv_define_module(calib3d opencv_imgproc opencv_features2d opencv_flann ${debug_modules}
+ WRAP java python js
+ )
#include "opencv2/core/ocl.hpp"
#endif
+ #define CV_TEST_TAG_DNN_SKIP_HALIDE "dnn_skip_halide"
+ #define CV_TEST_TAG_DNN_SKIP_OPENCL "dnn_skip_ocl"
+ #define CV_TEST_TAG_DNN_SKIP_OPENCL_FP16 "dnn_skip_ocl_fp16"
+ #define CV_TEST_TAG_DNN_SKIP_IE "dnn_skip_ie"
+ #define CV_TEST_TAG_DNN_SKIP_IE_2018R5 "dnn_skip_ie_2018r5"
+ #define CV_TEST_TAG_DNN_SKIP_IE_2019R1 "dnn_skip_ie_2019r1"
+ #define CV_TEST_TAG_DNN_SKIP_IE_2019R1_1 "dnn_skip_ie_2019r1_1"
+ #define CV_TEST_TAG_DNN_SKIP_IE_OPENCL "dnn_skip_ie_ocl"
+ #define CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16 "dnn_skip_ie_ocl_fp16"
+ #define CV_TEST_TAG_DNN_SKIP_IE_MYRIAD_2 "dnn_skip_ie_myriad2"
+ #define CV_TEST_TAG_DNN_SKIP_IE_MYRIAD_X "dnn_skip_ie_myriadx"
+ #define CV_TEST_TAG_DNN_SKIP_IE_MYRIAD CV_TEST_TAG_DNN_SKIP_IE_MYRIAD_2, CV_TEST_TAG_DNN_SKIP_IE_MYRIAD_X
+
++#define CV_TEST_TAG_DNN_SKIP_VULKAN "dnn_skip_vulkan"
+
namespace cv { namespace dnn {
-CV__DNN_EXPERIMENTAL_NS_BEGIN
+CV__DNN_INLINE_NS_BEGIN
void PrintTo(const cv::dnn::Backend& v, std::ostream* os);
void PrintTo(const cv::dnn::Target& v, std::ostream* os);
}
#endif // HAVE_INF_ENGINE
+
+ void initDNNTests()
+ {
+ const char* extraTestDataPath =
+ #ifdef WINRT
+ NULL;
+ #else
+ getenv("OPENCV_DNN_TEST_DATA_PATH");
+ #endif
+ if (extraTestDataPath)
+ cvtest::addDataSearchPath(extraTestDataPath);
+
+ registerGlobalSkipTag(
+ CV_TEST_TAG_DNN_SKIP_HALIDE,
+ CV_TEST_TAG_DNN_SKIP_OPENCL, CV_TEST_TAG_DNN_SKIP_OPENCL_FP16
+ );
+ #if defined(INF_ENGINE_RELEASE)
+ registerGlobalSkipTag(
+ #if INF_ENGINE_VER_MAJOR_EQ(2018050000)
+ CV_TEST_TAG_DNN_SKIP_IE_2018R5,
+ #elif INF_ENGINE_VER_MAJOR_EQ(2019010000)
+ CV_TEST_TAG_DNN_SKIP_IE_2019R1,
+ #elif INF_ENGINE_VER_MAJOR_EQ(2019010100)
+ CV_TEST_TAG_DNN_SKIP_IE_2019R1_1
+ #endif
+ CV_TEST_TAG_DNN_SKIP_IE
+ );
+ #endif
+ registerGlobalSkipTag(
+ // see validateVPUType(): CV_TEST_TAG_DNN_SKIP_IE_MYRIAD_2, CV_TEST_TAG_DNN_SKIP_IE_MYRIAD_X
+ CV_TEST_TAG_DNN_SKIP_IE_OPENCL, CV_TEST_TAG_DNN_SKIP_IE_OPENCL_FP16
+ );
++#ifdef HAVE_VULKAN
++ registerGlobalSkipTag(
++ CV_TEST_TAG_DNN_SKIP_VULKAN
++ );
++#endif
+ }
+
} // namespace
#include "test_precomp.hpp"
- static const char* extraTestDataPath =
- #ifdef WINRT
- NULL;
- #else
- getenv("OPENCV_DNN_TEST_DATA_PATH");
- #endif
-
+#if defined(HAVE_HPX)
+ #include <hpx/hpx_main.hpp>
+#endif
+
- CV_TEST_MAIN("",
- extraTestDataPath ? (void)cvtest::addDataSearchPath(extraTestDataPath) : (void)0
- )
-
- namespace opencv_test
- {
-
- using namespace cv;
- using namespace cv::dnn;
-
- }
+ CV_TEST_MAIN("", initDNNTests());
const bool kSwapRB = true;
if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16 && dtype != CV_32F)
- throw SkipTestException("");
+ applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL_FP16);
+ if (backend == DNN_BACKEND_VKCOM && dtype != CV_32F)
- throw SkipTestException("");
++ throw SkipTestException(CV_TEST_TAG_DNN_SKIP_VULKAN);
Mat inp(5, 5, CV_8UC3);
randu(inp, 0, 255);
#include <limits>
using namespace cv;
+using namespace detail;
+ namespace {
+
/*
This is implementation of image segmentation algorithm GrabCut described in
"GrabCut - Interactive Foreground Extraction using Iterated Graph Cuts".
'BFMatcher': ['isMaskSupported', 'create'],
'': ['drawKeypoints', 'drawMatches']}
+photo = {'': ['createAlignMTB', 'createCalibrateDebevec', 'createCalibrateRobertson', \
+ 'createMergeDebevec', 'createMergeMertens', 'createMergeRobertson', \
+ 'createTonemapDrago', 'createTonemapMantiuk', 'createTonemapReinhard'],
+ 'CalibrateCRF': ['process'],
+ 'AlignMTB' : ['calculateShift', 'shiftMat', 'computeBitmaps', 'getMaxBits', 'setMaxBits', \
+ 'getExcludeRange', 'setExcludeRange', 'getCut', 'setCut'],
+ 'CalibrateDebevec' : ['getLambda', 'setLambda', 'getSamples', 'setSamples', 'getRandom', 'setRandom'],
+ 'CalibrateRobertson' : ['getMaxIter', 'setMaxIter', 'getThreshold', 'setThreshold', 'getRadiance'],
+ 'MergeExposures' : ['process'],
+ 'MergeDebevec' : ['process'],
+ 'MergeMertens' : ['process', 'getContrastWeight', 'setContrastWeight', 'getSaturationWeight', \
+ 'setSaturationWeight', 'getExposureWeight', 'setExposureWeight'],
+ 'MergeRobertson' : ['process'],
+ 'Tonemap' : ['process' , 'getGamma', 'setGamma'],
+ 'TonemapDrago' : ['getSaturation', 'setSaturation', 'getBias', 'setBias', \
+ 'getSigmaColor', 'setSigmaColor', 'getSigmaSpace','setSigmaSpace'],
+ 'TonemapMantiuk' : ['getScale', 'setScale', 'getSaturation', 'setSaturation'],
+ 'TonemapReinhard' : ['getIntensity', 'setIntensity', 'getLightAdaptation', 'setLightAdaptation', \
+ 'getColorAdaptation', 'setColorAdaptation']
+ }
+
+aruco = {'': ['detectMarkers', 'drawDetectedMarkers', 'drawAxis', 'estimatePoseSingleMarkers', 'estimatePoseBoard', 'interpolateCornersCharuco', 'drawDetectedCornersCharuco'],
+ 'aruco_Dictionary': ['get', 'drawMarker'],
+ 'aruco_Board': ['create'],
+ 'aruco_GridBoard': ['create', 'draw'],
+ 'aruco_CharucoBoard': ['create', 'draw'],
+ }
+
+ calib3d = {'': ['findHomography']}
+
def makeWhiteList(module_list):
wl = {}
for m in module_list:
wl[k] = m[k]
return wl
- white_list = makeWhiteList([core, imgproc, objdetect, video, dnn, features2d, photo, aruco])
-white_list = makeWhiteList([core, imgproc, objdetect, video, dnn, features2d, calib3d])
++white_list = makeWhiteList([core, imgproc, objdetect, video, dnn, features2d, photo, aruco, calib3d])
# Features to be exported
export_enums = False
<script type="application/javascript" src="test_imgproc.js"></script>
<script type="application/javascript" src="test_objdetect.js"></script>
<script type="application/javascript" src="test_video.js"></script>
+ <script type="application/javascript" src="test_photo.js"></script>
<script type="application/javascript" src="test_features2d.js"></script>
+ <script type="application/javascript" src="test_calib3d.js"></script>
<script type='text/javascript'>
QUnit.config.autostart = false;
code: 'opencv.js',
tests: ['test_mat.js', 'test_utils.js', 'test_imgproc.js',
'test_objdetect.js', 'test_video.js', 'test_features2d.js',
- 'test_photo.js'],
++ 'test_photo.js',
+ 'test_calib3d.js'
+ ],
},
function(err, report) {
console.log(report.failed + ' failed, ' + report.passed + ' passed');
"-DWITH_QUIRC=OFF",
"-DBUILD_ZLIB=ON",
"-DBUILD_opencv_apps=OFF",
- "-DBUILD_opencv_calib3d=ON", # No bindings provided. This module is used as a dependency for other modules.
+ "-DBUILD_opencv_calib3d=ON",
"-DBUILD_opencv_dnn=ON",
"-DBUILD_opencv_features2d=ON",
- "-DBUILD_opencv_flann=OFF",
+ "-DBUILD_opencv_flann=ON", # No bindings provided. This module is used as a dependency for other modules.
+ "-DBUILD_opencv_gapi=OFF",
"-DBUILD_opencv_ml=OFF",
- "-DBUILD_opencv_photo=OFF",
+ "-DBUILD_opencv_photo=ON",
"-DBUILD_opencv_imgcodecs=OFF",
"-DBUILD_opencv_shape=OFF",
"-DBUILD_opencv_videoio=OFF",
//! [Recognize]
function loadModels(callback) {
- var proto = 'https://raw.githubusercontent.com/opencv/opencv/3.4/samples/dnn/face_detector/deploy.prototxt';
+ var utils = new Utils('');
+ var proto = 'https://raw.githubusercontent.com/opencv/opencv/master/samples/dnn/face_detector/deploy.prototxt';
var weights = 'https://raw.githubusercontent.com/opencv/opencv_3rdparty/dnn_samples_face_detector_20180205_fp16/res10_300x300_ssd_iter_140000_fp16.caffemodel';
var recognModel = 'https://raw.githubusercontent.com/pyannote/pyannote-data/master/openface.nn4.small2.v1.t7';
utils.createFileFromUrl('face_detector.prototxt', proto, () => {