platform/upstream/opencv.git
5 years agoMerge pull request #13052 from elatkin:yl/gapi_sobel3x3_f32_v2
Evgeny Latkin [Tue, 6 Nov 2018 20:08:50 +0000 (23:08 +0300)]
Merge pull request #13052 from elatkin:yl/gapi_sobel3x3_f32_v2

* GAPI: Sobel 3x3 with FP32 input

* GAPI: Sobel 3x3 with FP32 input, v2

5 years agoMerge pull request #13010 from dkurt:fix_cl_eye_fp16
Alexander Alekhin [Tue, 6 Nov 2018 18:36:09 +0000 (18:36 +0000)]
Merge pull request #13010 from dkurt:fix_cl_eye_fp16

5 years agoMerge pull request #13032 from ijean:mingw-w64-build
Alexander Alekhin [Tue, 6 Nov 2018 16:26:56 +0000 (16:26 +0000)]
Merge pull request #13032 from ijean:mingw-w64-build

5 years agoMerge pull request #13041 from berak:docs_highgui
Alexander Alekhin [Tue, 6 Nov 2018 16:19:51 +0000 (19:19 +0300)]
Merge pull request #13041 from berak:docs_highgui

5 years agoMerge pull request #13055 from vpisarev:remove_old_haar
Alexander Alekhin [Tue, 6 Nov 2018 16:01:28 +0000 (16:01 +0000)]
Merge pull request #13055 from vpisarev:remove_old_haar

5 years agoremoved the old C API for Haar-based object detection; use CascadeClassifier from...
Vadim Pisarevsky [Tue, 6 Nov 2018 12:39:37 +0000 (15:39 +0300)]
removed the old C API for Haar-based object detection; use CascadeClassifier from now on

5 years agodocs: remove NULL strings from highgui.hpp
berak [Sun, 4 Nov 2018 08:58:58 +0000 (09:58 +0100)]
docs: remove NULL strings from highgui.hpp

5 years agoReplaced strcpy_s, strcat_s for MinGW builds.
Jean Carass [Fri, 2 Nov 2018 15:51:57 +0000 (08:51 -0700)]
Replaced strcpy_s, strcat_s for MinGW builds.

5 years agoMerge remote-tracking branch 'upstream/3.4' into merge-3.4
Alexander Alekhin [Fri, 2 Nov 2018 05:31:07 +0000 (05:31 +0000)]
Merge remote-tracking branch 'upstream/3.4' into merge-3.4

5 years agoFix https://github.com/opencv/opencv/issues/12824
Dmitry Kurtaev [Thu, 1 Nov 2018 09:57:21 +0000 (12:57 +0300)]
Fix https://github.com/opencv/opencv/issues/12824

5 years agocompletely new C++ persistence implementation (#13011)
Vadim Pisarevsky [Thu, 1 Nov 2018 21:27:06 +0000 (00:27 +0300)]
completely new C++ persistence implementation (#13011)

* integrated the new C++ persistence; removed old persistence; most of OpenCV compiles fine! the tests have not been run yet

* fixed multiple bugs in the new C++ persistence

* fixed raw size of the parsed empty sequences

* [temporarily] excluded obsolete applications traincascade and createsamples from build

* fixed several compiler warnings and multiple test failures

* undo changes in cocoa window rendering (that was fixed in another PR)

* fixed more compile warnings and the remaining test failures (hopefully)

* trying to fix the last little warning

5 years agoMerge pull request #10584 from eruffaldi:F10583_videoio_ffmpeg_lossless
Alexander Alekhin [Thu, 1 Nov 2018 16:57:11 +0000 (16:57 +0000)]
Merge pull request #10584 from eruffaldi:F10583_videoio_ffmpeg_lossless

5 years agoMerge pull request #13003 from native-api:cross_cutting_frameworks
Alexander Alekhin [Thu, 1 Nov 2018 16:46:11 +0000 (16:46 +0000)]
Merge pull request #13003 from native-api:cross_cutting_frameworks

5 years agoDetect cross-cutting frameworks before libraries so the latter can use them
Ivan Pozdeev [Wed, 31 Oct 2018 20:28:18 +0000 (23:28 +0300)]
Detect cross-cutting frameworks before libraries so the latter can use them

5 years agoMerge pull request #13002 from dkurt:onnx_padding
Alexander Alekhin [Thu, 1 Nov 2018 11:40:22 +0000 (11:40 +0000)]
Merge pull request #13002 from dkurt:onnx_padding

5 years agoMerge pull request #12989 from venalil:fix_thresholded_tiff_read
Ilari Venäläinen [Thu, 1 Nov 2018 11:34:34 +0000 (13:34 +0200)]
Merge pull request #12989 from venalil:fix_thresholded_tiff_read

* Fix reading of black-and-white (thresholded) TIFF images

I recently updated my local OpenCV version to 3.4.3 and found out that
I could not read my TIFF images related to my project. After debugging I
found out that there has been some static analysis fixes made
that accidentally have broken reading those black-and-white TIFF images.

Commit hash in which reading of mentioned TIFF images has been broken:
cbb1e867e5141412c62ff534def7f117e28e04e8

Basically the fix is to revert back to the same functionality that has been there before,
when black-and-white images are read bpp (bitspersample) is 1.
Without the case 1: this TiffDecoder::readHeader() function always return false.

* Added type and default error message

* Added stdexcept include

* Use CV_Error instead of throw std::runtime_error

* imgcodecs(test): add TIFF B/W decoding tests

5 years agoMerge pull request #13007 from dkurt:fix_12970
Alexander Alekhin [Thu, 1 Nov 2018 11:30:37 +0000 (11:30 +0000)]
Merge pull request #13007 from dkurt:fix_12970

5 years agoFix https://github.com/opencv/opencv/issues/12970
Dmitry Kurtaev [Thu, 1 Nov 2018 08:22:28 +0000 (11:22 +0300)]
Fix https://github.com/opencv/opencv/issues/12970

5 years agoffmpeg for lossy
Emanuele Ruffaldi [Fri, 12 Jan 2018 23:49:21 +0000 (00:49 +0100)]
ffmpeg for lossy

5 years agoMerge pull request #12991 from alalek:update_libpng_1.6.35
Alexander Alekhin [Wed, 31 Oct 2018 16:47:48 +0000 (16:47 +0000)]
Merge pull request #12991 from alalek:update_libpng_1.6.35

5 years agoAdd ONNX's padding import
Dmitry Kurtaev [Wed, 31 Oct 2018 15:24:05 +0000 (18:24 +0300)]
Add ONNX's padding import

5 years agoMerge pull request #12889 from alalek:drop_untested_flann_hdf5_header
Alexander Alekhin [Wed, 31 Oct 2018 15:11:32 +0000 (15:11 +0000)]
Merge pull request #12889 from alalek:drop_untested_flann_hdf5_header

5 years agoMerge pull request #12971 from sturkmen72:upd_imgproc_hpp
Suleyman TURKMEN [Wed, 31 Oct 2018 15:08:24 +0000 (18:08 +0300)]
Merge pull request #12971 from sturkmen72:upd_imgproc_hpp

* Update imgproc.hpp

* update color conversion codes

5 years agoMerge pull request #12997 from alalek:eliminate_gcc4_warnings
Alexander Alekhin [Wed, 31 Oct 2018 15:03:00 +0000 (15:03 +0000)]
Merge pull request #12997 from alalek:eliminate_gcc4_warnings

5 years agoMerge pull request #12988 from LaurentBerger:test_copyto_py
Alexander Alekhin [Wed, 31 Oct 2018 14:23:08 +0000 (14:23 +0000)]
Merge pull request #12988 from LaurentBerger:test_copyto_py

5 years agocmake: eliminate GCC4.x warnings
Alexander Alekhin [Wed, 31 Oct 2018 13:04:55 +0000 (16:04 +0300)]
cmake: eliminate GCC4.x warnings

5 years agoMerge pull request #12994 from vpisarev:fix_imshow_mac
Vadim Pisarevsky [Wed, 31 Oct 2018 11:13:28 +0000 (11:13 +0000)]
Merge pull request #12994 from vpisarev:fix_imshow_mac

5 years agofixed imshow on mac; before that just the window titlebar was shown, without the...
Vadim Pisarevsky [Wed, 31 Oct 2018 07:40:58 +0000 (10:40 +0300)]
fixed imshow on mac; before that just the window titlebar was shown, without the window content.

5 years agoMerge pull request #12951 from catree:easy_fixes_const_viz
Alexander Alekhin [Tue, 30 Oct 2018 18:55:21 +0000 (18:55 +0000)]
Merge pull request #12951 from catree:easy_fixes_const_viz

5 years agoMerge pull request #12982 from eldruin:python-gen-close-file
Alexander Alekhin [Tue, 30 Oct 2018 18:41:23 +0000 (18:41 +0000)]
Merge pull request #12982 from eldruin:python-gen-close-file

5 years agoMerge pull request #12990 from rgarnov:gapi_fluid_reshape_support
Ruslan Garnov [Tue, 30 Oct 2018 18:12:36 +0000 (21:12 +0300)]
Merge pull request #12990 from rgarnov:gapi_fluid_reshape_support

G-API: Introduce new `reshape()` API (#12990)

* Moved initFluidUnits, initLineConsumption, calcLatency, calcSkew to separate functions

* Added Fluid::View::allocate method (moved allocation logic from constructor)

* Changed util::zip to util::indexed, utilized collectInputMeta in GFluidExecutable constructor

* Added makeReshape method to FluidExecutable

* Removed m_outputRoi from GFluidExecutable

* Added reshape feature

* Added switch of resize mapper if agent ratio was changed

* Added more TODOs and renamed a function

* G-API reshape(): add missing `override` specifiers

Fix warnings on all platforms

5 years agoMerge pull request #12949 from AsyaPronina:missed_multiply_operator_for_GMAT
AsyaPronina [Tue, 30 Oct 2018 18:10:47 +0000 (21:10 +0300)]
Merge pull request #12949 from AsyaPronina:missed_multiply_operator_for_GMAT

Made scale parameter optional for mul kernel wrapper (#12949)

* Added missed operator*(GMat, GMat). Made scale parameter optional for mul kernel.

* Fixed perf test for mul(GMat, GMat) kernel

* Removed operator*(GMat, GMat) as not needed

5 years ago3rdparty: update libpng 1.6.35
Alexander Alekhin [Tue, 30 Oct 2018 16:03:14 +0000 (19:03 +0300)]
3rdparty: update libpng 1.6.35

http://www.libpng.org/pub/png/libpng.html

5 years agoMerge pull request #12876 from savuor:color_rgb2rgb_wide
Rostislav Vasilikhin [Tue, 30 Oct 2018 15:36:23 +0000 (18:36 +0300)]
Merge pull request #12876 from savuor:color_rgb2rgb_wide

* RGB2RGB initially rewritten

* NEON impl removed

* templated version added for ushort, float

* data copying allowed for RGB2RGB

* inplace processing fixed

* fields to local vars

* no zeroupper until it's fixed

* vx_cleanup() added back

5 years agoMerge pull request #12948 from catree:add_drawFrameAxes
Alexander Alekhin [Tue, 30 Oct 2018 13:33:01 +0000 (13:33 +0000)]
Merge pull request #12948 from catree:add_drawFrameAxes

5 years agoAdd python test for copyto with mask
LaurentBerger [Tue, 30 Oct 2018 09:34:54 +0000 (10:34 +0100)]
Add python test for copyto with mask

5 years agoMerge pull request #12938 from dkurt:java_ndim_mat
Alexander Alekhin [Mon, 29 Oct 2018 17:06:44 +0000 (17:06 +0000)]
Merge pull request #12938 from dkurt:java_ndim_mat

5 years agoMerge pull request #12703 from wzw-intel:vkcom
WuZhiwen [Mon, 29 Oct 2018 14:51:26 +0000 (14:51 +0000)]
Merge pull request #12703 from wzw-intel:vkcom

* dnn: Add a Vulkan based backend

This commit adds a new backend "DNN_BACKEND_VKCOM" and a
new target "DNN_TARGET_VULKAN". VKCOM means vulkan based
computation library.

This backend uses Vulkan API and SPIR-V shaders to do
the inference computation for layers. The layer types
that implemented in DNN_BACKEND_VKCOM include:
Conv, Concat, ReLU, LRN, PriorBox, Softmax, MaxPooling,
AvePooling, Permute

This is just a beginning work for Vulkan in OpenCV DNN,
more layer types will be supported and performance
tuning is on the way.

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
* dnn/vulkan: Add FindVulkan.cmake to detect Vulkan SDK

In order to build dnn with Vulkan support, need installing
Vulkan SDK and setting environment variable "VULKAN_SDK" and
add "-DWITH_VULKAN=ON" to cmake command.

You can download Vulkan SDK from:
https://vulkan.lunarg.com/sdk/home#linux

For how to install, see
https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html
https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html
https://vulkan.lunarg.com/doc/sdk/latest/mac/getting_started.html
respectively for linux, windows and mac.

To run the vulkan backend, also need installing mesa driver.
On Ubuntu, use this command 'sudo apt-get install mesa-vulkan-drivers'

To test, use command '$BUILD_DIR/bin/opencv_test_dnn --gtest_filter=*VkCom*'

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
* dnn/Vulkan: dynamically load Vulkan runtime

No compile-time dependency on Vulkan library.
If Vulkan runtime is unavailable, fallback to CPU path.

Use environment "OPENCL_VULKAN_RUNTIME" to specify path to your
own vulkan runtime library.

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
* dnn/Vulkan: Add a python script to compile GLSL shaders to SPIR-V shaders

The SPIR-V shaders are in format of text-based 32-bit hexadecimal
numbers, and inserted into .cpp files as unsigned int32 array.

* dnn/Vulkan: Put Vulkan headers into 3rdparty directory and some other fixes

Vulkan header files are copied from
https://github.com/KhronosGroup/Vulkan-Docs/tree/master/include/vulkan
to 3rdparty/include

Fix the Copyright declaration issue.

Refine OpenCVDetectVulkan.cmake

* dnn/Vulkan: Add vulkan backend tests into existing ones.

Also fixed some test failures.

- Don't use bool variable as uniform for shader
- Fix dispathed group number beyond max issue
- Bypass "group > 1" convolution. This should be support in future.

* dnn/Vulkan: Fix multiple initialization in one thread.

5 years agoMerge pull request #12944 from dbudniko:dbudniko/tests_thresholds
Dmitry Budnikov [Mon, 29 Oct 2018 14:34:20 +0000 (17:34 +0300)]
Merge pull request #12944 from dbudniko:dbudniko/tests_thresholds

* added threshold to g-api imgproc tests

* trailing spaces remove

* try to fix warnings

* fix license header

* fix random numbers issue

* fix Sobel test

* license headers + precompiled headers included

5 years agoMake cast() function const. Make parameters of addLight() const.
catree [Thu, 25 Oct 2018 18:05:01 +0000 (20:05 +0200)]
Make cast() function const. Make parameters of addLight() const.

5 years agoMerge pull request #12978 from xoox:fix-collectCalibrationData-signature
Alexander Alekhin [Mon, 29 Oct 2018 12:23:39 +0000 (12:23 +0000)]
Merge pull request #12978 from xoox:fix-collectCalibrationData-signature

5 years agoFix closing input file
Diego Barrios Romero [Mon, 29 Oct 2018 09:54:50 +0000 (10:54 +0100)]
Fix closing input file

5 years agoMerge pull request #12964 from savuor:fix/zeroupper_all
Vadim Pisarevsky [Mon, 29 Oct 2018 11:35:57 +0000 (11:35 +0000)]
Merge pull request #12964 from savuor:fix/zeroupper_all

5 years agoMerge pull request #12966 from catree:fix_distortion_image
Vadim Pisarevsky [Mon, 29 Oct 2018 11:27:49 +0000 (11:27 +0000)]
Merge pull request #12966 from catree:fix_distortion_image

5 years agoMerge pull request #12980 from LaurentBerger:copyToPy
Vadim Pisarevsky [Mon, 29 Oct 2018 11:22:20 +0000 (11:22 +0000)]
Merge pull request #12980 from LaurentBerger:copyToPy

5 years agoMerge pull request #12975 from allnes:fix_russian_test
Vadim Pisarevsky [Mon, 29 Oct 2018 11:14:16 +0000 (11:14 +0000)]
Merge pull request #12975 from allnes:fix_russian_test

5 years agoFix dataset: russian.jpg
Alexander Nesterov [Sun, 28 Oct 2018 20:11:38 +0000 (19:11 -0100)]
Fix dataset: russian.jpg

5 years agoadd python copyto with mask (https://github.com/opencv/opencv/issues/10225)
LaurentBerger [Sat, 27 Oct 2018 18:57:02 +0000 (20:57 +0200)]
add python copyto with mask (https://github.com/opencv/opencv/issues/10225)

5 years agoFix signature of static collectCalibrationData()
Wenfeng CAI [Mon, 29 Oct 2018 02:19:02 +0000 (10:19 +0800)]
Fix signature of static collectCalibrationData()

This is a fix to the signature of static function
collectCalibrationData() and clean-up for #12772. Since fallback scheme
in calibration method selection is not used anymore. As an input
parameter, iFixedPoint should be passed by value according to the OpenCV
coding style guide.

5 years agoMerge pull request #12954 from seanm:MinorMac
Alexander Alekhin [Sun, 28 Oct 2018 14:52:31 +0000 (14:52 +0000)]
Merge pull request #12954 from seanm:MinorMac

5 years agoMerge pull request #12967 from catree:add_tutorial_video_java_python
Alexander Alekhin [Sat, 27 Oct 2018 17:04:49 +0000 (17:04 +0000)]
Merge pull request #12967 from catree:add_tutorial_video_java_python

5 years agoMerge pull request #12947 from AsyaPronina:sobel_renaming
AsyaPronina [Sat, 27 Oct 2018 16:54:32 +0000 (19:54 +0300)]
Merge pull request #12947 from AsyaPronina:sobel_renaming

* Renamed Sobel operator GAPI kernel to match with OpenCV naming rules

* Fixed perf tests

* Small refactoring to check CI issue

* Refactored alignment for kernel wrappers in imgproc.hpp

5 years agoMerge pull request #12958 from kamino410:doc_dist_param
Alexander Alekhin [Sat, 27 Oct 2018 16:28:57 +0000 (16:28 +0000)]
Merge pull request #12958 from kamino410:doc_dist_param

5 years agoUpdate background subtraction tutorial with Java and Python codes.
catree [Fri, 26 Oct 2018 20:17:18 +0000 (22:17 +0200)]
Update background subtraction tutorial with Java and Python codes.

5 years agoFix distortion figure in calib3d. Positive radial distortion corresponds to pincushio...
catree [Fri, 26 Oct 2018 18:27:37 +0000 (20:27 +0200)]
Fix distortion figure in calib3d. Positive radial distortion corresponds to pincushion distortion and negative to barrel distortion. Add another figure that illustrates the influence of k1 in the distortion effect.

5 years agoMerge pull request #12952 from seanm:fix12933
Alexander Alekhin [Fri, 26 Oct 2018 18:27:27 +0000 (18:27 +0000)]
Merge pull request #12952 from seanm:fix12933

5 years agoMerge pull request #12946 from HenryDev:patch-1
Alexander Alekhin [Fri, 26 Oct 2018 18:26:06 +0000 (18:26 +0000)]
Merge pull request #12946 from HenryDev:patch-1

5 years ago_mm256_zeroupper replaced by zeroall
Rostislav Vasilikhin [Fri, 26 Oct 2018 15:12:07 +0000 (18:12 +0300)]
_mm256_zeroupper replaced by zeroall

5 years agoMerge remote-tracking branch 'upstream/3.4' into merge-3.4
Alexander Alekhin [Fri, 26 Oct 2018 14:56:28 +0000 (17:56 +0300)]
Merge remote-tracking branch 'upstream/3.4' into merge-3.4

5 years agoMerge pull request #12960 from alalek:workaround_ipp_sse42_meanstddev
Alexander Alekhin [Fri, 26 Oct 2018 14:50:49 +0000 (14:50 +0000)]
Merge pull request #12960 from alalek:workaround_ipp_sse42_meanstddev

5 years agocore(ipp): disable SSE4.2 meanStdDev() optimization for CV_32F
Alexander Alekhin [Fri, 26 Oct 2018 11:57:20 +0000 (14:57 +0300)]
core(ipp): disable SSE4.2 meanStdDev() optimization for CV_32F

5 years agofix document about camera distortion parameters
kamino410 [Fri, 26 Oct 2018 10:55:46 +0000 (19:55 +0900)]
fix document about camera distortion parameters

5 years agoFixed a few comments related to macOS support
Sean McBride [Thu, 25 Oct 2018 19:16:55 +0000 (15:16 -0400)]
Fixed a few comments related to macOS support

5 years agoFixed #12933: added cast to silence clang -Wcomma warning
Sean McBride [Thu, 25 Oct 2018 17:27:17 +0000 (13:27 -0400)]
Fixed #12933: added cast to silence clang -Wcomma warning

5 years agoMerge pull request #12138 from wanghanmin:wanghanmin-patch-videoio_crossbarsetting-1
wanghanmin [Thu, 25 Oct 2018 16:41:37 +0000 (00:41 +0800)]
Merge pull request #12138 from wanghanmin:wanghanmin-patch-videoio_crossbarsetting-1

* Update videoio.hpp

add VideoCapturePropertie for clossbar input pin setting

* Update cap_dshow.cpp

For some kind of capture card, such as "avermedia cv710 " , it use SerialDigital as input pin and so it can not work.
Here added new PhysicalConnectorType enumeration: PhysConn_Video_YRYBY and PhysConn_Video_SerialDigital to support it.
And also provide new property parameter CAP_CROSSBAR_INPIN_TYPE to set the crossbar input pin type which will be used in videoInput::start(int deviceID, videoDevice *VD):
" if(VD->useCrossbar)
    {
        DebugPrintOut("SETUP: Checking crossbar\n");
        routeCrossbar(&VD->pCaptureGraph, &VD->pVideoInputFilter, VD->connection, CAPTURE_MODE);

    }
"

And at last ,fixed one issue for function setSizeAndSubtype, added code
pVih->rcSource.top = pVih->rcSource.left = pVih->rcTarget.top =pVih->rcTarget.left=0;
pVih->rcSource.right = pVih->rcTarget.right= attemptWidth;
pVih->rcSource.bottom = pVih->rcTarget.bottom = attemptHeight;

without these code , rcSource and rcTarget will keeping use default resolution and cause fail in hr = VD->streamConf->SetFormat(VD->pAmMediaType) and cannot find suitable MediaType.

Tested with python3 and mfc (Avermedia cv710)
Python3 code:
import cv2
print("test cv")
cap=cv2.VideoCapture(0)
cap.set(5,60)
cap.set(3,1920)
cap.set(4,1080)
cap.set(31,6)

ret,img=cap.read()
cv2.namedWindow("cap",cv2.WINDOW_NORMAL)
cv2.resizeWindow("cap",960,640);
while True:
    ret,img=cap.read()
    if ret==False:
        continue
    cv2.imshow("cap",img)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break
cap.release()

cv2.destroyAllWindows()

MFC code:
void CcvtestDlg::OnBnClickedButton1()
{
VideoCapture cap(0);
cap.set(CAP_PROP_FRAME_WIDTH, 1920);
cap.set(CAP_PROP_FRAME_HEIGHT, 1080);

cap.set(CAP_CROSSBAR_INPIN_TYPE , 6);
Mat img;
namedWindow("test", WINDOW_NORMAL);
resizeWindow("test", 960, 640);
while (1)
{
if (cap.read(img))
{
imshow("test", img);
if ('q' ==waitKey(1))
break;
}
}
destroyAllWindows();
cap.release();
}

* Update cap_dshow.cpp

* Update videoio.hpp

move enum value of CAP_CROSSBAR_INPIN_TYPE to the end of list

* Update videoio.hpp

* Update cap_dshow.cpp

removed trailing whitespace

* Update test_camera.cpp

Add test for capture device using PhysConn_Video_SerialDigital as crossbar input pin

* Update test_camera.cpp

Correction of misunderstanding about how to add test case.

5 years agoMerge pull request #12772 from xoox:calib-release-object
Wenfeng CAI [Thu, 25 Oct 2018 16:38:55 +0000 (00:38 +0800)]
Merge pull request #12772 from xoox:calib-release-object

More accurate pinhole camera calibration with imperfect planar target (#12772)
43 commits:

* Add derivatives with respect to object points

Add an output parameter to calculate derivatives of image points with
respect to 3D coordinates of object points. The output jacobian matrix
is a 2Nx3N matrix where N is the number of points.

This commit introduces incompatibility to old function signature.

* Set zero for dpdo matrix before using

dpdo is a sparse matrix with only non-zero value close to major
diagonal. Set it to zero because only elements near major diagonal are
computed.

* Add jacobian columns to projectPoints()

The output jacobian matrix of derivatives with respect to coordinates of
3D object points are added. This might break callers who assume the
columns of jacobian matrix.

* Adapt test code to updated project functions

The test cases for projectPoints() and cvProjectPoints2() are updated to
fit new function signatures.

* Add accuracy test code for dpdo

* Add badarg test for dpdo

* Add new enum item for new calibration method

CALIB_RELEASE_OBJECT is used to whether to release 3D coordinates of
object points. The method was proposed in: K. H. Strobl and G. Hirzinger.
"More Accurate Pinhole Camera Calibration with Imperfect Planar Target".
In Proceedings of the IEEE International Conference on Computer Vision
(ICCV 2011), 1st IEEE Workshop on Challenges and Opportunities in Robot
Perception, Barcelona, Spain, pp. 1068-1075, November 2011.

* Add releasing object method into internal function

It's a simple extension of the standard calibration scheme. We choose to
fix the first and last object point and a user-selected fixed point.

* Add interfaces for extended calibration method

* Refine document for calibrateCamera()

When releasing object points, only the z coordinates of the
objectPoints[0].back is fixed.

* Add link to strobl2011iccv paper

* Improve documentation for calibrateCamera()

* Add implementations of wrapping calibrateCamera()

* Add checking for params of new calibration method

If input parameters are not qualified, then fall back to standard
calibration method.

* Add camera calibration method of releasing object

The current implementation is equal to or better than
https://github.com/xoox/calibrel

* Update doc for CALIB_RELEASE_OBJECT

CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with
potentially less precise and less stable in some rare cases.

* Add RELEASE_OBJECT calibration to tutorial code

To select the calibration method of releasing object points, a command
line parameter `-d=<number>` should be provided.

* Update tutorial doc for camera_calibration

If the method of releasing object points is merged into OpenCV. It will
be expected to be firstly released in 4.1, I think.

* Reduce epsilon for cornerSubPix()

Epsilon of 0.1 is a bigger one. Preciser corner positions are required
with calibration method of releasing object.

* Refine camera calibration tutorial

The hypothesis coordinates are used to indicate which distance must be
measured between two specified object points.

* Update sample calibration code method selection

Similar to camera_calibration tutorial application, a command line
argument `-dt=<number>` is used to select the calibration method.

* Add guard to flags of cvCalibrateCamera2()

cvCalibrateCamera2() doesn't accept CALIB_RELEASE_OBJECT unless overload
interface is added in the future.

* Simplify fallback when iFixedPoint is out of range

* Refactor projectPoints() to keep compatibilities

* Fix arg string "Bad rvecs header"

* Read calibration flags from test data files

Instead of being hard coded into source file, the calibration flags will
be read from test data files.
opencv_extra/testdata/cv/cameracalibration/calib?.dat must be sync with
the test code.

* Add new C interface of cvCalibrateCamera4()

With this new added C interface, the extended calibration method with
CALIB_RELEASE_OBJECT can be called by C API.

* Add regression test of extended calibration method

It has been tested with new added test data in xoox:calib-release-object
branch of opencv_extra.

* Fix assertion in test_cameracalibration.cpp

The total number of refined 3D object coordinates is checked.

* Add checker for iFixedPoint in cvCalibrateCamera4

If iFixedPoint is out of rational range, fall back to standard method.

* Fix documentation for overloaded calibrateCamera()

* Remove calibration flag of CALIB_RELEASE_OBJECT

The method selection is based on the range of the index of fixed point.
For minus values, standard calibration method will be chosen.  Values in
a rational range will make the object-releasing calibration method
selected.

* Use new interfaces instead of function overload

Existing interfaces are preserved and new interfaces are added. Since
most part of the code base are shared, calibrateCamera() is now a
wrapper function of calibrateCameraRO().

* Fix exported name of calibrateCameraRO()

* Update documentation for calibrateCameraRO()

The circumstances where this method is mostly helpful are described.

* Add note on the rigidity of the calibration target

* Update documentation for calibrateCameraRO()

It is clarified that iFixedPoint is used as a switch to select
calibration method. If input data are not qualified, exceptions will be
thrown instead of fallback scheme.

* Clarify iFixedPoint as switch and remove fallback

iFixedPoint is now used as a switch for calibration method selection. No
fallback scheme is utilized anymore. If the input data are not
qualified, exceptions will be thrown.

* Add badarg test for object-releasing method

* Fix document format of sample list

List items of same level should be indented the same way. Otherwise they
will be formatted as nested lists by Doxygen.

* Add brief intro for objectPoints and imagePoints

* Sync tutorial to sample calibration code

* Update tutorial compatibility version to 4.0

5 years agoAdd a function that draws frame axes. Useful for debugging purpose and to check the...
catree [Thu, 25 Oct 2018 15:57:18 +0000 (17:57 +0200)]
Add a function that draws frame axes. Useful for debugging purpose and to check the correctness of the output of a pose estimation method.

5 years agoMerge pull request #12905 from tomoaki0705:fixQrcodePeakyFailure
Alexander Alekhin [Thu, 25 Oct 2018 16:24:56 +0000 (16:24 +0000)]
Merge pull request #12905 from tomoaki0705:fixQrcodePeakyFailure

5 years agoUpdate intro.markdown
Henry [Thu, 25 Oct 2018 15:54:07 +0000 (10:54 -0500)]
Update intro.markdown

"as opposed to" is a phrase of opposed meaning distinguished from or in contrast with. e.g., "an approach that is theoretical as opposed to practical"
synonyms: in contrast with, as against, as contrasted with, rather than, instead of, as an alternative to
example: "we use only steam, as opposed to chemical products, to clean our house"

5 years agoMerge pull request #12937 from mshabunin:fix-static-4
Alexander Alekhin [Thu, 25 Oct 2018 15:15:15 +0000 (15:15 +0000)]
Merge pull request #12937 from mshabunin:fix-static-4

5 years agoMerge pull request #12935 from alalek:python_so_warning
Alexander Alekhin [Thu, 25 Oct 2018 15:11:44 +0000 (15:11 +0000)]
Merge pull request #12935 from alalek:python_so_warning

5 years agoMerge pull request #12804 from alalek:editorconfig
Alexander Alekhin [Thu, 25 Oct 2018 14:17:42 +0000 (14:17 +0000)]
Merge pull request #12804 from alalek:editorconfig

5 years agoMerge pull request #12854 from allnes:detect_qr_code
Alexander Alekhin [Thu, 25 Oct 2018 14:16:55 +0000 (14:16 +0000)]
Merge pull request #12854 from allnes:detect_qr_code

5 years agoMerge pull request #12930 from aliyasineser:3.4
Alexander Alekhin [Thu, 25 Oct 2018 14:12:16 +0000 (17:12 +0300)]
Merge pull request #12930 from aliyasineser:3.4

Update depth map for python-opencv

5 years agoMerge pull request #12927 from alalek:docs_filter_gapi_exports
Alexander Alekhin [Thu, 25 Oct 2018 11:53:06 +0000 (11:53 +0000)]
Merge pull request #12927 from alalek:docs_filter_gapi_exports

5 years agoMerge pull request #12925 from alalek:fix_cmake_conditions
Alexander Alekhin [Thu, 25 Oct 2018 11:52:39 +0000 (11:52 +0000)]
Merge pull request #12925 from alalek:fix_cmake_conditions

5 years agoMerge pull request #12934 from alalek:issue_12932
Alexander Alekhin [Thu, 25 Oct 2018 11:28:12 +0000 (11:28 +0000)]
Merge pull request #12934 from alalek:issue_12932

5 years agocore: move compiler defines from base.hpp into cvdef.h
Alexander Alekhin [Thu, 25 Oct 2018 03:02:01 +0000 (03:02 +0000)]
core: move compiler defines from base.hpp into cvdef.h

5 years agoMerge pull request #12928 from alalek:fix_typo_3.4
Alexander Alekhin [Thu, 25 Oct 2018 11:04:59 +0000 (11:04 +0000)]
Merge pull request #12928 from alalek:fix_typo_3.4

5 years agoAdd methods to reshape Mat in Java by array of shapes and retreive sizes of each...
Dmitry Kurtaev [Thu, 25 Oct 2018 07:48:23 +0000 (10:48 +0300)]
Add methods to reshape Mat in Java by array of shapes and retreive sizes of each dimension.

5 years agoFixed several issues found by static analysis
Maksim Shabunin [Tue, 23 Oct 2018 12:06:33 +0000 (15:06 +0300)]
Fixed several issues found by static analysis

5 years agopython: eliminate DeprecationWarning: SO -> EXT_SUFFIX
Alexander Alekhin [Thu, 25 Oct 2018 03:47:59 +0000 (03:47 +0000)]
python: eliminate DeprecationWarning: SO -> EXT_SUFFIX

- https://python.readthedocs.io/en/stable/whatsnew/3.4.html
- The `sysconfig` key `SO` is deprecated, it has been replaced by `EXT_SUFFIX`

5 years agocore: move compiler defines from base.hpp into cvdef.h
Alexander Alekhin [Thu, 25 Oct 2018 03:02:01 +0000 (03:02 +0000)]
core: move compiler defines from base.hpp into cvdef.h

5 years agoMerge pull request #12868 from VladKarpushin:tutorial-using-periodic-noise-removing...
Alexander Alekhin [Wed, 24 Oct 2018 20:24:50 +0000 (20:24 +0000)]
Merge pull request #12868 from VladKarpushin:tutorial-using-periodic-noise-removing-filter

5 years agoUpdate depth map for pytho-opencv
Ali Yasin Eser [Wed, 24 Oct 2018 17:29:27 +0000 (19:29 +0200)]
Update depth map for pytho-opencv

5 years agoAdded perf tests with sanity check
Alexander Nesterov [Tue, 16 Oct 2018 12:27:37 +0000 (12:27 +0000)]
Added perf tests with sanity check

5 years agoMerge pull request #12888 from alalek:cmake_fix_objdetect
Alexander Alekhin [Wed, 24 Oct 2018 16:22:26 +0000 (16:22 +0000)]
Merge pull request #12888 from alalek:cmake_fix_objdetect

5 years agovideoio: fix typo
Alexander Alekhin [Wed, 24 Oct 2018 16:12:35 +0000 (19:12 +0300)]
videoio: fix typo

5 years agoMerge pull request #12894 from alalek:c_api_drop_samples
Alexander Alekhin [Wed, 24 Oct 2018 15:40:03 +0000 (15:40 +0000)]
Merge pull request #12894 from alalek:c_api_drop_samples

5 years agoMerge pull request #12922 from alalek:fix_merge_12787
Alexander Alekhin [Wed, 24 Oct 2018 15:15:13 +0000 (15:15 +0000)]
Merge pull request #12922 from alalek:fix_merge_12787

5 years agodocs: hide GAPI_EXPORTS from documentation
Alexander Alekhin [Wed, 24 Oct 2018 15:05:21 +0000 (18:05 +0300)]
docs: hide GAPI_EXPORTS from documentation

5 years agoMerge pull request #12881 from huangqinjin:orb
Alexander Alekhin [Wed, 24 Oct 2018 13:28:57 +0000 (13:28 +0000)]
Merge pull request #12881 from huangqinjin:orb

5 years agoMerge pull request #12887 from alalek:fix_cmake_conditions
Alexander Alekhin [Wed, 24 Oct 2018 13:17:54 +0000 (13:17 +0000)]
Merge pull request #12887 from alalek:fix_cmake_conditions

5 years agoMerge pull request #12914 from seiko2plus:issue12830
Alexander Alekhin [Wed, 24 Oct 2018 13:15:23 +0000 (13:15 +0000)]
Merge pull request #12914 from seiko2plus:issue12830

5 years agoMerge pull request #12921 from alalek:ios_xcode10
Alexander Alekhin [Wed, 24 Oct 2018 13:06:27 +0000 (13:06 +0000)]
Merge pull request #12921 from alalek:ios_xcode10

5 years agoMerge pull request #12909 from alalek:cmake_fix_baseline_detect_flags
Alexander Alekhin [Wed, 24 Oct 2018 13:05:14 +0000 (13:05 +0000)]
Merge pull request #12909 from alalek:cmake_fix_baseline_detect_flags

5 years agoMerge pull request #12919 from berak:fix_dnn_sample_common
Alexander Alekhin [Wed, 24 Oct 2018 13:03:37 +0000 (13:03 +0000)]
Merge pull request #12919 from berak:fix_dnn_sample_common

5 years agoMerge pull request #12877 from maver1:3.4
maver1 [Wed, 24 Oct 2018 12:02:53 +0000 (15:02 +0300)]
Merge pull request #12877 from maver1:3.4

* Updated ICV packages and IPP integration

* core(test): minMaxIdx IPP regression test

* core(ipp): workaround minMaxIdx problem

* core(ipp): workaround meanStdDev() CV_32FC3 buffer overrun

* Returned semicolon after CV_INSTRUMENT_REGION_IPP()

5 years agocore: fix merge from 3.4
Alexander Alekhin [Wed, 24 Oct 2018 11:45:45 +0000 (14:45 +0300)]
core: fix merge from 3.4

`CV_ErrorNoReturn` should not be used in OpenCV

5 years agodnn/samples: handle not set env vars gracefully
berak [Wed, 24 Oct 2018 10:37:01 +0000 (12:37 +0200)]
dnn/samples: handle not set env vars gracefully