Commit Graph

474 Commits

Author SHA1 Message Date
Glue Crow
95ce21d407 Fix #10525 2018-01-18 18:49:29 +08:00
Alexander Alekhin
f5862dacb6 Merge pull request #10432 from GlueCrow:bgfg_knn_fix 2018-01-05 14:16:17 +00:00
Alexander Alekhin
be01ea734d video(perf): add Mog2/KNN tests, fixed bug in prepareData()
prepareData() bug feeds the same image (the latest)
OCL perf test doesn't pass accuracy(!) check now, so this check is disabled.
2018-01-05 08:50:38 +00:00
Glue Crow
6045608330 Parallelization of BackgroundSubtractorKNN 2017-12-27 19:28:09 +08:00
GlueCrow
26d288bd11
Optimize OpenCL BackgroundSubstractionMOG2 2017-12-23 21:57:17 +08:00
Vitaly Tuzov
e5313246a7 Reverted calls to linear resize back to generic version for floating point matrices 2017-12-22 17:10:03 +03:00
Tomoaki Teshima
50d44e06e3 avoid the test which is too strict
* confirmed test failure on Jetson TX1 and TX2
  * show the performance but not bit exact result
2017-12-22 00:14:10 +09:00
Vitaly Tuzov
51cb56ef2c Implementation of bit-exact resize. Internal calls to linear resize updated to use bit-exact version. (#9468) 2017-12-13 15:00:38 +03:00
Alexander Alekhin
3a8a73ef6c ocl: skip unstable tests
during pre-commit testing
2017-12-06 12:58:35 +03:00
Vadim Pisarevsky
5ce38e516e Merge pull request #10223 from vpisarev:ocl_mac_fixes
* fixed OpenCL functions on Mac, so that the tests pass

* fixed compile warnings; temporarily disabled OCL branch of TV L1 optical flow on mac

* fixed other few warnings on macos
2017-12-05 13:32:28 +03:00
Alexander Alekhin
0ed3209b00 ocl: avoid unnecessary loading/initializing OpenCL subsystem
If there are no OpenCL/UMat methods calls from application.

OpenCL subsystem is initialized:
- haveOpenCL() is called from application
- useOpenCL() is called from application
- access to OpenCL allocator: UMat is created (empty UMat is ignored) or UMat <-> Mat conversions are called

Don't call OpenCL functions if OPENCV_OPENCL_RUNTIME=disabled
(independent from OpenCL linkage type)
2017-11-28 14:02:42 +03:00
KUANG Fangjun
67acfc6e25 improve doc. 2017-10-31 10:30:01 +01:00
Congxiang Pan
89b6e68e1e Merge pull request #9466 from huningxin:js
GSoC 2017: Improve and Extend the JavaScript Bindings for OpenCV (#9466)

* Initial support for build with emscripten

mkdir build_js
cd build_js
cmake -D CMAKE_TOOLCHAIN_FILE=/path/to/emsdk/emsdk-portable/emscripten/master/cmake/Modules/Platform/Emscripten.cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..

* Add js module

The output is build/bin/opencv_js.js

* Fix opencv2/calib3d.hpp not found issue

* Add module name

Usage:
var cv = cv();

* Add total memory as 128MB and allow growth

* Add compilation flags for emscripten

* Use EMSCRIPTEN build target

* Disable js module for non emscripten build

* Bind the preload file path to root

Usage:
face_cascade.load('haarcascade_frontalface_default.xml');

* add test folder

* fix test files

* Copy js module test to bin

* Support to run tests on Node.js

Fix tests to import cv Module when runtime is node.
Add tests.js to use qunit to auto run tests.
Modify umd wrapper to support Module is not defined.

Usage:
node tests.js

* Support UMD and file system

Wrap the opencv_js.js to opencv.js by UMD wrapper

Use emscripten file system API to load files instead of generating data file or
embedding them. It supports both browser and node.js usages.

* Fix incorrect module name in tests

* Add package.json to add dependence of qunit

* Add js_tutorials folder and a intro page of opencv.js

Enable BUILD_DOCS in CMakeLists.txt.
Add new folder of js_tutorials in folder opencv/doc.
Imitate the tutorials of OpenCV-Python to create a intro page of opencv.js and a setup guide

* Import and use binding gen from opencvjs project

* Modify the embindgen.py to pass the build and test

* Add classes and functions white list

* Consolidate hdr_parser.py (#31)

Use hdr_parser.py of python module

Add js flag to support js binding generator.

* Use emscripten::vecFromJSArray for input vector param

Fix part of #23

* Fix test cases after #34

Fix #39

* Expose groupRectangles and CascadeClassifier.empty

* Add js highgui tutorials

add tutorials of imread&imshow and createTrackbar in doc/js_tutorials/js_gui folder
add interactive tutorial webpage for imread&imshow and createTrackbar in doc/js_tutorials/js_interactive_tutorials folder, and some images needed.
change doc/CMakeLists.txt to copy the interactive tutorial webpage and opencv.js to the tutorials' destination folder

* rm useless annotation in doc/CMakeLists.txt

* fix some nonstandard indentation and space

* add check if canvas is valid

* Expose BackgroundSubtractorMOG2

Fix #43

* Fix build of js doc

Limit copy_js_interactive_tutorials for doxygen build
Add dep to opencv.js

Fix #53

* Implement cv.imread & cv.imshow and insert interactive pages in tutorials (#55)

* add helper.js

* delete ALL in add target copy_js_interactive_tutorials to avoid dependence error

* Insert interactive pages in tutorials

insert the old interactive pages in markdown by using \htmlonly and \endhtmlonly command.
delete the useless interactive page
rename js_interactive_tutorials to js_assets to put some images needed in

* fix the depends of the target doxygen

add opencv.js to depends and delete the useless target of copy_js_assets

* change filename helper.js to helpers.js

* disable button or trankbar before opencv.js is ready

* Expose CV_64F

Fix #65

* improve cv.imshow to display different types as native imshow

* add utils.js to reuse functions and update tutorials

* Make doxygen depend on bin/opencv.js

* Fix memory issue of matFromArray

Fix #37

* Merge pull request from ganwenyao/tutorial_18

* Add notes for ganwenyao/tutorial_18

* Modifying for ganwenyao/tutorial_18

* Change Mat constructor with data to 5 parameters

* Mat supports constructor with Scalar

Fix #60

* update cv.imread cause the memory issue of matFromArray has been fixed

* fix canvas name and default input image

* Expose cv::Moments

Fix #85

* Add -Wno-missing-prototypes for emscripten build

* fix canvas name

* add tutorial of video input and output

* Expose enums as emscripten consts

Fix #72

* update the tutorial to use Mat constructor with Scalar and change lena.jpg

* Exclude cv::Mat for vecFromJSArray

Fix #82

* Add unit tests for cv.moments

* Fix the unit tests.

* add checkbox and stop button

* add adapter.js to make sure compatibility fo video tutorials

* Support default parameters with function overloading

* modify enums to constants

* Use https URL for MathJax.js

Fix #109

* Comment out the debug print in embindgen.py

* Expose RotatedRect

Fix #96

* replace enum with constants and improve onload function

* delete some useless paras cause #105 fixed this

* Modify const name

* Modify Contour Properties

* tutorials for imgprc2 and objdec

* Expose more functions for img proc tutorials

Fix #76

* Expose polylines for video analysis tutorial

Fix #121

* Expose constants for default parameters of img proc tutorials

Fix #122

* Fix wrong parameter types of Mat.copyTo

Fix #87

* Support default parameters of mat.convertTo

Fix #123

* Support default parameters for external constructors

Fix #131

* Revert "Expose polylines for video analysis tutorial"

This reverts commit 3ce7615652e510d30e3c0014706ac38c98883189.

Fix #121

* Support cv.minMaxLoc

Fix #127

* Expose cv.minEnclosingCircle

Fix #126

* Add video analysis tutorials

add three video tutorials, Meanshift and Camshift, Optical Flow Background Subtraction
add cup.mp4 and box.mp4 for demo in tutorials

* improve image processing tutorials

* repalce console.warn with throw to throw exception

* add try-catch to throw exception in code demo

* Change mat.size() return value to JS Array object

Fix #140

* add a note about different channels order between canvas and native opencv

* add a note about how to capture video from video files

* Binding cv.Scalar to JS array

Fix #147

* Add JS cv.Scalar object into helpers.js

* Update Install OpenCV-JavaScript tutorial page

Fix #44

* Update the OpenCV-JavaScript introduction page

Fix #44

* add cv.VideoCapture and read() function

* set the size of the hidden canvas same as the video

* Add Using OpenCV-JavaScript tutorial page

Fix #44

* fix some bad code style

* Update tutorials after 8/2 sync meeting

Changes include:
- Use OpenCV.js name instead of OpenCV-JavaScript
- Put using OpenCV.js ahead of build OpenCV.js
- Refine usage and introduction page
- Muted the video in tutorials

* Fix a typo in introduction page

* use cv.VideoCapture and its read() function to read video

* replace OpenCV-JavaScript with OpenCV.js

* Use onload of async script in js_usage tutorial

* add more info about mat.data

* Change Size to value_object

* Integrate Moh and Sajjad's editing into introduction page

* Change Point to value_object

* Change Rect to value_object with helper object

* Add helper objects for Point and Size

* Change RotatedRect to value_object with helpers

* Change MinMaxLoc and Circle to value_object

* Change TermCriteria to value_object

* Fix core_bindings.cpp for MinMaxLoc and Circle

* Remove unused types

* Change meanShift and CamShift to return Rect

* Change methods of RotatedRect to static

* Change mat.data from methods to property

Fix #75 and #77

* support img id and element in cv.imread

* Change mat.size to property and add mat.step

Fix #163

* Add matFromArray and matFromImageData as JS helpers

Fix #79, #78

* Lower camel case for Mat element getters

Fix #81

* Mat.getRoiRect and tests

Fix #86

* Support type for Mat.ptr

Fix #83

* Name changing of Mat element getters

'getUcharAt` -> 'ucharAt'

* fix code style and args names

* Fix helpers.js due to cv.Mat API update

* Fix opencv.js usage tutorial

* Fix a typo of js_setup

* Change Moments to value_object

* Add Range as value_object

Fix #171

* Support Mat.diag and Mat.isContinous

Fix #84 and #89

* Support Mat.setTo

Fix #88

* Apply edits to js_intro

* Apply edits to js_usage

* Apply edits to js_setup

* update tutorials to apply data type change

* Modify tutorials

* add core tutorials

* delete MatVector elements and delete useless set operation

* add tutorials_objdec_camera

* Add instructions for WebAssembly

* apply tech writer's feedbacks into tutorials

* Organize white list by modules

* Change size to method and bind to MatExpr.size()

Fix #177

* improve tutorials

* Modify core tutorials

* add params list and explanations for OpenCV.js functions

* remove face_profile from Face Detection in Video Capture

* Add demos link

* Change Gui to GUI

* Update js_intro based on Moh and Sajjad's edits

* Fixup for 3.3.0 rebase

* Update js_intro per Moh's suggestion

* Update contributors list per Moh's idea

* add adapter.js in video_display tutorial

* Change Mat.getRoiRect to Mat.roi

Fix #194

* Remove unnecessary files for test

Fix #192

* Licenses updated to UC BSD 3-Clause

* Apply OpenCV coding style for C++ files

* Add OpenCV license for python and js files

* Fix coding style issue in helpers.js

* Remove unused test_commons.js

* Fix coding style of test_imgproc.js

* Fix coding style of test_mat.js

* Fix space before semicolon

* Fix coding style of test_objdetect.js

* Fix coding style of tests.js

* Fix coding style of test_utils.js

* Fix coding style of test_video.js

* Fix failures of node.js tests

* Add eslint rule config and fix eslint errors

* Add eslint config for js/src and fix eslint errors

* Clean up the opencv.js dependencies

Fix #186

* Fix build issue for python generator

* Fix doxygen buildbot failure

* delete trailing whitespace, blank line at EOF and replace tab with space

* Fix tutorial_js_root reference issue for non opencv.js build

* replace the file with small size

* Initial commit of build_js.py

* Move the js build configurations to build script

* Add wasm build support

* Update OpenCV.js build tutorial by using script

* Fix global var issue in tests

* Add a README.md for build_js.py

* Copy the haar cascade files from data dir for tutorials

* Not use memory init file

* Disable debug print for modules/js/CMakeLists.txt

* Check files when build done

* Fix image name in js_gradients tutorial

* Fix image load issue in js_trackbar tutorial

* Find the opencv source directory via relative path by default

* Make the cmake args based on build_doc option

* Fix a typo in js_setup.markdown

* Fix make failure issue on config generated by build_js.py

* Eliminate js branch of hdr_parser.py

* Extract examples from js_basic_ops tutorial

* Fix coding style of utils.js

* Improve examples error handling

Handle:
1. opencv.js loading errors
2. script errors (Error)
3. cv::Exception

Fix #217

* Add enable_exception option into build_js.py

* Support print exception for exception catching disabled build

* Extract example from js_usage tutorial

* Avoid copying .eslintrc.json when building doc

Fix #223

* Revert to use onload as opencv.js ready event

* Use 4 spaces indention for js examples

* embed html in tutorials with iframe tag

* Revert to use onload as opencv.js ready event

* Extract examples from js_video_display tutorial

* Implement Utils object

* modify core imgprc and face_detection tutorials

* Fix examples of js_gui tutorials

* Fix coding style of utils.js

* Modify tutorials

* Extract example from js_face_detection_camera tutorial

* Disable new-cap check in eslint

* Extract examples from js_meanshift tutorial

* Extract examples from video tutorials

* Remove new-cap declaration and update grammer in comments

* Change textarea width to 100 to align with eslint config

* Fix printError issue when opencv.js loading fails

* Remove BUILD_opencv_js dependency for doc build

Fix #213

* Expose cv::getBuildInformation

* Dump opencv build info when opencv.js loaded for live examples

* Make the button to stand out in js live examples

Fix #235

* Style for disabled button

* Add js_imgproc_camera.html example

* Fix coding style of imgproc_camera example

* Add js_imgproc_camera tutorial

* Remove link to opencv.js demos

* doc: copy opencv.js on build, use absolute paths for assets

* doc: reuse existed file box.mp4
2017-09-25 16:52:07 +03:00
Alexander Alekhin
c95a97389d Merge pull request #9235 from sturkmen72:patch-3 2017-08-03 17:04:28 +00:00
Suleyman TURKMEN
89480801b8 some improvements on tutorials 2017-07-29 20:08:19 +03:00
Alexander Alekhin
602f047fe8 build: replace WIN32 => _WIN32 2017-07-25 13:30:48 +03:00
Alexander Alekhin
a4a47b538c build: detect Android via '__ANDROID__' macro
https://sourceforge.net/p/predef/wiki/OperatingSystems
2017-07-10 12:43:59 +03:00
Tony Lian
c8783f3e23 Merge pull request #9075 from TonyLianLong:master
Remove unnecessary Non-ASCII characters from source code (#9075)

* Remove unnecessary Non-ASCII characters from source code

Remove unnecessary Non-ASCII characters and replace them with ASCII
characters

* Remove dashes in the @param statement

Remove dashes and place single space in the @param statement to keep
coding style

* misc: more fixes for non-ASCII symbols

* misc: fix non-ASCII symbol in CMake file
2017-07-03 16:14:17 +00:00
Maksim Shabunin
a769d69a9d Fixed several issues found by static analysis 2017-06-28 18:06:18 +03:00
Maksim Shabunin
32d4af36e2 Fixing some static analysis issues 2017-06-27 14:30:26 +03:00
Maksim Shabunin
87b569d812 Rewritten some tests in videoio and imgcodecs modules
general:
- all iterative tests have been replaced with parameterized tests
- old-style try..catch tests have been modified to use EXPECT_/ASSERT_ gtest macros
- added temporary files cleanup
- modified MatComparator error message formatting

imgcodecs:
- test_grfmt.cpp split to test_jpg.cpp, test_png.cpp, test_tiff.cpp, etc.

videoio:
- added public HAVE_VIDEO_INPUT, HAVE_VIDEO_OUTPUT definitions to cvconfig.h
- built-in MotionJPEG codec could not be tested on some platforms (read_write test was disabled if ffmpeg is off, encoding/decoding was handled by ffmpeg otherwise).
- image-related tests moved to imgcodecs (Videoio_Image)
- several property get/set tests have been combined into one
- added MotionJPEG test video to opencv_extra
2017-06-20 18:20:41 +03:00
Maksim Shabunin
68d01972fe Merge pull request #8883 from abratchik:DNN.java.wrappers.fix 2017-06-20 09:05:53 +00:00
abratchik
037d8fbdcd Refactor OpenCV Java Wrapping 2017-06-15 20:35:12 +04:00
LukeZhu
cc47ee3b43 Modify the pyrlk.cl to support winSize from 8*8 to 24*24 for optical flow 2017-06-07 17:46:50 +08:00
Vadim Pisarevsky
ee257ffe9e Merge pull request #8455 from terfendail:ovxhal_skipsmall 2017-05-26 12:10:18 +00:00
Vadim Pisarevsky
affb60093d Merge branch 'master' of https://github.com/MicheleCancilla/opencv into parallel_ccomp 2017-05-24 16:51:18 +03:00
LukeZhu
65be9e1978 Fix OpenCL's wrong output of calcOpticalFlowPyrLK function's output vector of err. Improve err's precison of the calcOpticalFlowPyrLK OpenCL function and add the relative test. 2017-05-04 14:07:45 +08:00
Michele Cancilla
9405c6d206 Improvement of array of equivalences’ upper bound + fix some wrong comments 2017-04-27 12:53:33 +02:00
Vitaly Tuzov
2492c299f3 Extended set of existing performance test to OpenVX HAL suitable execution modes 2017-04-27 12:32:29 +03:00
Alexander Alekhin
0d10eb5173 Merge pull request #8565 from iglesias:fix/bgsknn-initialization 2017-04-17 08:08:34 +00:00
Fernando Iglesias Garcia
21e698053f Initialize background model in background subtraction KNN.
The method does cvCheckPixelBackgroundNP (which reads bgmodel)
before it is ever updated (in cvUpdatePixelBackgroundNP). This
initialization is thus needed to avoid reads of unitialized values.
2017-04-12 10:11:50 +02:00
Utkarsh Sinha
0330934c8b Updating documentation. 2017-04-11 06:42:20 -07:00
Utkarsh Sinha
b9c2d88e69 If the user passes an empty output matrix, initialize it to identity. 2017-04-10 20:43:33 -07:00
Vitaly Tuzov
bf5b7843e8 Extended set of OpenVX HAL calls disabled for small images 2017-04-06 18:17:32 +03:00
Matthias Grundmann
13540bf7f4 Update bgfg_gaussmix2.cpp
Addressed comments.
2017-03-24 13:26:32 -07:00
Matthias Grundmann
7295dd7dec Update bgfg_gaussmix2.cpp
1e-12 -> DBL_EPSILON
2017-03-14 16:57:50 -07:00
Matthias Grundmann
0a1767a6b5 Update bgfg_gaussmix2.cpp to avoid divide by zero cases. 2017-03-08 19:27:43 -08:00
Vitaly Tuzov
9a4b5a4545 OpenVX calls updated to use single common OpenVX context per thread 2017-02-21 16:08:23 +03:00
Vladislav Sovrasov
4e0351bafd Clarify docs for MOG2::apply 2017-01-26 12:43:41 +03:00
Rostislav Vasilikhin
328151c8a4 don't run OpenVX pyrLK if user asked for err vector 2016-12-16 23:38:47 +03:00
Rostislav Vasilikhin
5372c8b331 Merge pull request #7774 from savuor:openvx_pyrlk
OpenVX optical flow PyrLK wrappers added (#7774)

* wrappers for vx_pyramid added

* initial version of Optical Flow PyrLK wrappers added

* array downloading code simplified

* disabled due to bad accuracy; fixed bugs, e.g. vendor-specific ones

* rewritten for new macro use
2016-12-16 12:46:03 +02:00
Kotrix
10ccd0328c Removed redundant calculations
Operations inside for loops are unnecessary. They are repeated anyway just below for loops
2016-12-04 20:28:56 +01:00
Alexander Alekhin
45bf60d18c perf: remove tvl1 check for magic numbers, reduce number of samples 2016-11-10 15:41:44 +03:00
Alexander Alekhin
a01a4c4b3b test: tvl1 test check update 2016-11-10 15:39:18 +03:00
mshabunin
3e28d51779 Fixed several OpenCL compiler warnings 2016-11-07 16:49:12 +03:00
Jiri Horner
c17afe0fab Merge pull request #6933 from hrnr:gsoc_all
[GSOC] New camera model for stitching pipeline

* implement estimateAffine2D

estimates affine transformation using robust RANSAC method.

* uses RANSAC framework in calib3d
* includes accuracy test
* uses SVD decomposition for solving 3 point equation

* implement estimateAffinePartial2D

estimates limited affine transformation

* includes accuracy test

* stitching: add affine matcher

initial version of matcher that estimates affine transformation

* stitching: added affine transform estimator

initial version of estimator that simply chain transformations in homogeneous coordinates

* calib3d: rename estimateAffine3D test

test Calib3d_EstimateAffineTransform rename to Calib3d_EstimateAffine3D. This is more descriptive and prevents confusion with estimateAffine2D tests.

* added perf test for estimateAffine functions

tests both estimateAffine2D and estimateAffinePartial2D

* calib3d: compare error in square in estimateAffine2D

* incorporates fix from #6768

* rerun affine estimation on inliers

* stitching: new API for parallel feature finding

due to ABI breakage new functionality is added to `FeaturesFinder2`, `SurfFeaturesFinder2` and `OrbFeaturesFinder2`

* stitching: add tests for parallel feature find API

* perf test (about linear speed up)
* accuracy test compares results with serial version

* stitching: use dynamic_cast to overcome ABI issues

adding parallel API to FeaturesFinder breaks ABI. This commit uses dynamic_cast and hardcodes thread-safe finders to avoid breaking ABI.

This should be replaced by proper method similar to FeaturesMatcher on next ABI break.

* use estimateAffinePartial2D in AffineBestOf2NearestMatcher

* add constructor to AffineBestOf2NearestMatcher

* allows to choose between full affine transform and partial affine transform. Other params are the as for BestOf2NearestMatcher
* added protected field

* samples: stitching_detailed support affine estimator and matcher

* added new flags to choose matcher and estimator

* stitching: rework affine matcher

represent transformation in homogeneous coordinates

affine matcher: remove duplicite code
rework flow to get rid of duplicite code

affine matcher: do not center points to (0, 0)
it is not needed for affine model. it should not affect estimation in any way.

affine matcher: remove unneeded cv namespacing

* stitching: add stub bundle adjuster

* adds stub bundle adjuster that does nothing
* can be used in place of standard bundle adjusters to omit bundle adjusting step

* samples: stitching detailed, support no budle adjust

* uses new NoBundleAdjuster

* added affine warper

* uses R to get whole affine transformation and propagates rotation and translation to plane warper

* add affine warper factory class

* affine warper: compensate transformation

* samples: stitching_detailed add support for affine warper

* add Stitcher::create method

this method follows similar constructor methods and returns smart pointer. This allows constructing Stitcher according to OpenCV guidelines.

* supports multiple stitcher configurations (PANORAMA and SCANS) for convenient setup
* returns cv::Ptr

* stitcher: dynamicaly determine correct estimator

we need to use affine estimator for affine matcher

* preserves ABI (but add hints for ABI 4)
* uses dynamic_cast hack to inject correct estimator

* sample stitching: add support for multiple modes

shows how to use different configurations of stitcher easily (panorama stitching and scans affine model)

* stitcher: find features in parallel

use new FeatureFinder API to find features in parallel. Parallelized using TBB.

* stitching: disable parallel feature finding for OCL

it does not bring much speedup to run features finder in parallel when OpenCL is enabled, because finder needs to wait for OCL device.

Also, currently ORB is not thread-safe when OCL is enabled.

* stitching: move matcher tests

move matchers tests perf_stich.cpp -> perf_matchers.cpp

* stitching: add affine stiching integration test

test basic affine stitching (SCANS mode of stitcher) with images that have only translation between them

* enable surf for stitching tests

stitching.b12 test was failing with surf

investigated the issue, surf is producing good result. Transformation is only slightly different from ORB, so that resulting pano does not exactly match ORB's result. That caused sanity check to fail.

* added size checks similar to other tests
* sanity check will be applied only for ORB

* stitching: fix wrong estimator choice

if case was exactly wrong, estimators were chosen wrong

added logging for estimated transformation

* enable surf for matchers stitching tests

* enable SURF
* rework sanity checking. Check estimated transform instead of matches. Est. transform should be more stable and comparable between SURF and ORB.
* remove regression checking for VectorFeatures tests. It has a lot if data andtest is the same as previous except it test different vector size for performance, so sanity checking does not add any value here. Added basic sanity asserts instead.

* stitching tests: allow relative error for transform

* allows .01 relative error for estimated homography sanity check in stitching matchers tests
* fix VS warning

stitching tests: increase relative error

increase relative error to make it pass on all platforms (results are still good).

stitching test: allow bigger relative error

transformation can differ in small values (with small absolute difference, but large relative difference). transformation output still looks usable for all platforms. This difference affects only mac and windows, linux passes fine with small difference.

* stitching: add tests for affine matcher

uses s1, s2 images. added also new sanity data.

* stitching tests: use different data for matchers tests

this data should yeild more stable transformation (it has much more matches, especially for surf). Sanity data regenerated.

* stitching test: rework tests for matchers

* separated rotation and translations as they are different by scale.
* use appropriate absolute error for them separately. (relative error does not work for values near zero.)

* stitching: fix affine warper compensation

calculation of rotation and translation extracted for plane warper was wrong

* stitching test: enable surf for opencl integration tests

* enable SURF with correct guard (HAVE_OPENCV_XFEATURES2D)
* add OPENCL guard and correct namespace as usual for opencl tests

* stitching: add ocl accuracy test for affine warper

test consistent results with ocl on and off

* stitching: add affine warper ocl perf test

add affine warper to existing warper perf tests. Added new sanity data.

* stitching: do not overwrite inliers in affine matcher

* estimation is run second time on inliers only, inliers produces in second run will not be therefore correct for all matches

* calib3d: add Levenberg–Marquardt refining to estimateAffine2D* functions

this adds affine Levenberg–Marquardt refining to estimateAffine2D functions similar to what is done in findHomography.

implements Levenberg–Marquardt refinig for both full affine and partial affine transformations.

* stitching: remove reestimation step in affine matcher

reestimation step is not needed. estimateAffine2D* functions are running their own reestimation on inliers using the Levenberg-Marquardt algorithm, which is better than simply rerunning RANSAC on inliers.

* implement partial affine bundle adjuster

bundle adjuster that expect affine transform with 4DOF. Refines parameters for all cameras together.

stitching: fix bug in BundleAdjusterAffinePartial

* use the invers properly
* use static buffer for invers to speed it up

* samples: add affine bundle adjuster option to stitching_detailed

* add support for using affine bundle adjuster with 4DOF
* improve logging of initial intristics

* sttiching: add affine bundle adjuster test

* fix build warnings

* stitching: increase limit on sanity check

prevents spurious test failures on mac. values are still pretty fine.

* stitching: set affine bundle adjuster for SCANS mode

* fix bug with AffineBestOf2NearestMatcher (we want to select affine partial mode)
* select right bundle adjuster

* stitching: increase error bound for matcher tests

* this prevents failure on mac. tranformation is still ok.

* stitching: implement affine bundle adjuster

* implements affine bundle adjuster that is using full affine transform
* existing test case modified to test both affinePartial an full affine bundle adjuster

* add stitching tutorial

* show basic usage of stitching api (Stitcher class)

* stitching: add more integration test for affine stitching

* added new datasets to existing testcase
* removed unused include

* calib3d: move `haveCollinearPoints` to common header

* added comment to make that this also checks too close points

* calib3d: redone checkSubset for estimateAffine* callback

* use common function to check collinearity
* this also ensures that point will not be too close to each other

* calib3d: change estimateAffine* functions API

* more similar to `findHomography`, `findFundamentalMat`, `findEssentialMat` and similar
* follows standard recommended semantic INPUTS, OUTPUTS, FLAGS
* allows to disable refining
* supported LMEDS robust method (tests yet to come) along with RANSAC
* extended docs with some tips

* calib3d: rewrite estimateAffine2D test

* rewrite in googletest style
* parametrize to test both robust methods (RANSAC and LMEDS)
* get rid of boilerplate

* calib3d: rework estimateAffinePartial2D test

* rework in googletest style
* add testing for LMEDS

* calib3d: rework estimateAffine*2D perf test

* test for LMEDS speed
* test with/without Levenberg-Marquart
* remove sanity checking (this is covered by accuracy tests)

* calib3d: improve estimateAffine*2D tests

* test transformations in loop
* improves test by testing more potential transformations

* calib3d: rewrite kernels for estimateAffine*2D functions

* use analytical solution instead of SVD
* this version is faster especially for smaller amount of points

* calib3d: tune up perf of estimateAffine*2D functions

* avoid copying inliers
* avoid converting input points if not necessary
* check only `from` point for collinearity, as `to` does not affect stability of transform

* tutorials: add commands examples to stitching tutorials

* add some examples how to run stitcher sample code
* mention stitching_detailed.cpp

* calib3d: change computeError for estimateAffine*2D

* do error computing in floats instead of doubles

this have required precision + we were storing the result in float anyway. This make code faster and allows auto-vectorization by smart compilers.

* documentation: mention estimateAffine*2D function

* refer to new functions on appropriate places
* prefer estimateAffine*2D over estimateRigidTransform

* stitching: add camera models documentations

* mention camera models in module documentation to give user a better overview and reduce confusion
2016-10-22 19:10:42 +03:00
Maksim Shabunin
157a90ac46 Merge pull request #7513 from abratchik:fix.wrappers.for.video.tracking 2016-10-18 12:09:14 +00:00
abratchik
c72fbd7a14 fix for #7501 2016-10-18 09:38:57 +04:00
Alexander Alekhin
5dfb810327 video: fix optflow test: NAN results shouldn't bypass checks 2016-10-17 20:06:45 +03:00
Alexander Alekhin
8213e57f3b Merge pull request #7494 from tomoaki0705:fixVideoLKPyramidARM 2016-10-17 17:06:26 +00:00