1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-17 15:26:00 +08:00
Commit Graph

42 Commits

Author SHA1 Message Date
MrKepzie
55f5303cf3 rlof optflow: fix crash when no match are found 2021-01-09 17:45:59 +01:00
Tobias Senst
4b63202293 Merge pull request #2476 from tsenst:optimize_performance_rlof
Rework RLOF by using HAL universal instructions

* * distinguish between SSE2 and SSE 4.1 support
* SSE2 now implements no paralellized _blendv functiona and allows to compile with SSE2 instructions

* * add interface function do enable disable M-estimator framework
* bugfix blendv functions

* * make use of _mm_store and _mm_load functions in blendv_ps and blendv_epi function to fix compiler error

* * implement substitute of _mm_cvtepi8_epi16 and _mm_cvtepi16_epi32 when compiling with less than SSE 4.1 support

* * implement substitute of _mm_abs_epi16 when compiling with less than SSE 3 support

* * move _mm_abs_epi16 to SSE4 req.

* * add HAL intrinsic functions for RLOF ICA
* first tests are OK

* * HAL intrinsic functions -> RLOF ICA is ready now

* * add HAL functions for RLOF illumination model

* * add HAL for PLK ILL

* * add HAL functions for plk ica

* * commit HAL functions for beplk ica

* * add HAL functions for berlof ica

* * add HAL functions for BEPLK ILL

* *remove unused #ifdef

* * remove white spaces and unused variables

* * remove not used variables

* + remove get4BitMask function which contained pure SEE instructions

* * remove buffIdx which has not been used but initialized

* * fix replacement of #ifdef CV_SIMD128 with #if CV_SIMD128
* rename useMEstimator to setUseMEstimator

* *remove whitespace

* * remove unused variable abss

* * remove unused value

* * rename W_BITS1 to W_BITS since they contain same value
2020-03-31 15:20:18 +00:00
Tobias Senst
40b238b01d Merge pull request #2367 from tsenst:add_robust_interpolation_of_correspondence
Add RIC method for sparse match interpolation

* * add RIC

* sparse_match_interpolators EdgeAwareInterpolation - enhance limitation of the maximal number of matches to be interpolated from SHORT_MAX to INT_MAX by substituting short by int types

* * add RIC citation

* * update EdgeAwareInterpolatorImpl

* * add intermediate RIC implementation

* * implementation of new paralelization classes. First test where sucessfull.

* * update documentation RICInterpolatorImpl and RLOF

* * update CMakeLists.txt remove highgui
* add test for RIC
* add ASSERTION for curr image

* * add cost map interface

* * fix internal cost map allocation bug

* * remove white spaces
* fix warnings

* *fix compiler warnings

* * remove double whitespaces
* underscore from parameters
* substitute parallel_for_() classes with lambda functions
* remove complex assertion statements
* remove dead code
* substitute swap function with std::swap()
* ocv_define_module now contains video instead of tracking module

* * remove whitespace endings

* * documentation update

* * remove double declarations that lead to warnings

* * unrole tracker.py
*  remove double space
* use static for inner functions
* update create function
* modify mem init. to avoid manual memory management

* * uncomment parallel_for_ for parallelization

* * unrole unwanted changes
* uncomment paralellization

* * remove empty comment
* change CHECK to CHK_GD
* remove not necessary ;

* *documentation remove double space
2019-12-09 18:46:16 +03:00
Alexander Alekhin
35972a1ec4 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-11-18 07:19:57 +00:00
Alexander Alekhin
4c5f06128b build: GCC9 compilation 2019-11-12 18:50:43 +03:00
Tobias Senst
7ac648c2bd Merge pull request #2097 from tsenst:robust_optical_flow_fix
optflow: RLOF fixes (python-binding, status flag, flat textures) (#2097)

* * Bugfix for python-binding related to issue #2094. Copying the prevPtsMat to prevPoints was broken, when using python-binding.

* * Connect the blurred image correctly to CROSS support region segmentation. This allows to compute more robust support region shapes. Commit refers to issue #2094.

* * Bugfix to avoid the unintended assertion on flat textures discussed in issue #2094.

* * Bugfix on SparseRLOFOpticalFlow status was wrongly to to 0 if forward backward error < threshold, which is wrong. Inequation has been corrected. Refers to in issue #2087.

* small documentation changes

* bugfix on assertions and small test changes
2019-04-17 22:12:11 +03:00
tsenst
1c9e23745c Merge pull request #1940 from tsenst:add_robust_optical_flow_implementation
Add robust local optical flow (RLOF) implementations (#1940)

* Add robust local optical flow (RLOF) implementations which is an improved pyramidal iterative Lucas-Kanade approach. This implementations contains interfaces for sparse optical flow for feature tracking and dense optical flow based on sparse-to-dense interpolation schemes.
Add performance and accuracy tests have been implementation as well as documentation with the related publications

* - exchange tabs with spaces
- fix optflow.bib indentation
- remove optflow_o.hpp
- change RLOFOpticalFlowParameter interfaces to Ptr<RLOFOpticalFlowParameter>
to remove error on building. Fix warnings

* introducing precompiler flag RLOD_SSE

* remove header that could not be found

* remove whitespaces
fix perf and accuracy tests

* remove x86intrin.h header

* fix ios and arm by removing last sse commands

* fix warnings for windows compilation

* fix documentation RLOFOpticalFlowParameter

* integrate cast to remove last warnings

* * add create method and function inferfaces to RLOFOpticalFlowParamter to enable python wrapper interfaces

* white space fixes / coding style

* fix perf test

* other changes: precomp.hpp / static

* use Matx44f and Vec4f instead of Mat

* normSigmas into constants

* replace ceil() calls

* maximum level is set to 5 so that it is similar value used in the papers

* implement paralellized horizontal cross segmentation as used in Geistert2016

* drop dead code

* Avoid using "data" and "step" calculations. Use .ptr<mat_type>(row, col) instead.

* Avoid using "data" and "step" calculations. Use .ptr<mat_type>(row, col) instead.

* bugfix on BEPLK with ica and adapt the accuracy tests

* more 'static' functions

* bugfix after changing ptr + step to .ptr(y,x) calls by adjusting ROI of
prevImage, currImage and derivI as well as changing the offset of the
points in the invoker classes.

* add some static_cast to avoid warning

* remove 50 grid size sample from perf test. This grid size is to sparse
for the epic interpolation

* remove notSameColor function since it is not used anymore
2018-12-30 13:10:21 +03:00
Vadim Pisarevsky
2cc5ead103 moved DIS optical flow from opencv_contrib to opencv, moved TVL1 from opencv to opencv_contrib 2018-11-09 00:48:48 +03:00
Alexander Alekhin
036e699553 samples: apply CV_OVERRIDE/CV_FINAL 2018-03-28 17:25:51 +03:00
Alexander Alekhin
0aaaba08af optflow: apply CV_OVERRIDE/CV_FINAL 2018-03-28 16:49:59 +03:00
Maksim Shabunin
18a5391672 Fixed exports and removed contrib_world 2017-12-04 14:12:23 +03:00
LaurentBerger
64b3bbb620 solve issue 1165 2017-05-18 15:59:40 +02:00
Vladislav Samsonov
ac62d70f97 [GSoC] Implementation of the Global Patch Collider and demo for PCAFlow (#752)
* Minor fixes

* Start adding correspondence finding

* Added finding of correspondences using GPC

* New evaluation tool for GPC

* Changed default parameters

* Display ground truth in the evaluation tool

* Added training tool for MPI Sintel dataset

* Added the training tool for Middlebury dataset

* Added some OpenCL optimization

* Added explanatory notes

* Minor improvements: time measurements + little ocl optimization

* Added demos

* Fixed warnings

* Make parameter struct assignable

* Fix warning

* Proper command line argument usage

* Prettified training tool, added parameters

* Fixed VS warning

* Fixed VS warning

* Using of compressed forest.yml.gz files by default to save space

* Added OpenCL flag to the evaluation tool

* Updated documentation

* Major speed and memory improvements:
1) Added new (optional) type of patch descriptors which are much faster. Retraining with option --descriptor-type=1 is required.
2) Got rid of hash table for descriptors, less memory usage.

* Fixed various floating point errors related to precision.
SIMD for dot product, forest traversing is a little bit faster now.

* Tolerant floating point comparison

* Triplets

* Added comment

* Choosing negative sample among nearest neighbors

* Fix warning

* Usage of parallel_for_() in critical places. Performance improvments.

* Simulated annealing heuristic

* Moved OpenCL kernel to separate file

* Moved implementation to source file

* Added basic accuracy tests for GPC and PCAFlow

* Fixing warnings

* Test accuracy constraints were too strict

* Test accuracy constraints were too strict

* Make tests more lightweight
2016-10-17 18:15:22 +03:00
Maksim Shabunin
73459049a3 Merge pull request #745 from sbokov:DISflow_improvement 2016-08-10 22:17:08 +00:00
sbokov
406d944ec7 Temporal propagation in DISOpticalFlow
Added an option to pass an initial approximation of optical flow in
DISOpticalFlow. Added a python sample that demonstrates the use of this
feature for temporal propagation of flow vectors.
2016-08-10 00:26:24 +03:00
Vladislav Samsonov
1764f9247a Fixed OpenCL check behavior 2016-07-27 01:28:42 +03:00
Vladislav Samsonov
5146e0d2e4 Merge https://github.com/Itseez/opencv_contrib into optflow 2016-07-25 03:24:12 +03:00
Vladislav Samsonov
17831add02 Added new method for training forest 2016-07-25 03:22:31 +03:00
Vladislav Samsonov
7f93d951d3 Added training part of the Global Patch Collider 2016-07-25 02:28:23 +03:00
vbystricky
5a1fd4c873 Add methods for get/set weights of variational refiment part of DISFlow method 2016-07-15 11:43:30 +03:00
Vladislav Samsonov
3dbbad123a Added a note about key differences 2016-07-08 22:20:03 +03:00
Vladislav Samsonov
1d90d67016 Merge upstream 2016-07-08 13:49:03 +03:00
Alexander Bokov
b96a5f5963 Complete DIS optical flow implementation
Added variational refinement as a separate class (based on implementation
inside DeepFlow, but significantly accelerated, about 4-6 times faster),
accelerated the main dense inverse search algorithm. Added several new
features including patch mean normalization for increased robustness to
illumination changes and spatial propagation, which often helps to recover
from errors introduced by the coarse-to-fine scheme. Expanded the
documentation, added new accuracy and perf tests. Refactored some of
the already existing optical flow accuracy tests.
2016-07-01 18:50:10 +03:00
Vladislav Samsonov
75b3ea9f72 Fixing some compiler warnings 2016-06-22 13:53:03 +03:00
Vladislav Samsonov
e57df756a6 PR fixes 2016-06-20 03:26:54 +03:00
Vladislav Samsonov
2d68b30528 Minor fixes 2016-06-19 17:57:43 +03:00
Vladislav Samsonov
329f49e92a Passing of the prior file to the evaluation tool 2016-06-13 19:25:51 +03:00
Vladislav Samsonov
8ebe182f80 Merge recent changes 2016-06-13 02:32:27 +03:00
Vladislav Samsonov
7a18e78865 Post-review fixes 2016-06-13 02:11:38 +03:00
Vladislav Samsonov
54e746bebd Added OpenCL support 2016-06-12 23:04:38 +03:00
Alexander Bokov
d4c3765e4f Partial DIS implementation and OF benchmark
Basic interfaces and a partial implementation of the Dense Inverse
Search (DIS) optical flow algorithm without variational refinement. Also
added a python benchmarking script that can evaluate different optical
flow algorithms on the MPI Sintel and Middlebury datasets and build
overall comparative charts.
2016-06-10 13:00:36 +03:00
Vladislav Samsonov
d8aa162545 Added support for prior (covariance matrix) 2016-06-09 01:55:31 +03:00
Vladislav Samsonov
1417dc65f7 Boosted accuracy a little bit more 2016-05-21 20:21:57 +03:00
Vladislav Samsonov
65d0157447 Some improvements 2016-05-15 12:49:20 +03:00
Vladislav Samsonov
25b2958eb5 Added flow estimation using DCT basis 2016-05-09 21:10:08 +03:00
Vladislav Samsonov
fc00397160 Added naive blockmatching algorithm (just to get acquainted with the code base, this algo shouldn't be considered seriously).
Also, added boilerplate for pcaflow.
2016-05-07 09:49:43 +03:00
sbokov
831523ce02 Sparse-to-dense OF algorithm is added
* Sparse match interpolator interface and EdgeAwareInterpolator were
added to the ximgproc module
* New optical flow algorithm, based on PyrLK sparse OF and sparse match
interpolation, is added to the optflow module
2015-09-15 17:55:40 +03:00
Maksim Shabunin
61f36de542 Doxygen tutorials support 2015-02-17 12:49:37 +03:00
Maksim Shabunin
a20c5c8dd9 Doxygen documentation for all modules 2014-12-01 15:54:42 +03:00
tpietruszka
9181b2bd3d Moved deepflow to contrib, minor improvements 2014-08-18 23:35:59 +02:00
tpietruszka
4738fc2e63 Moved optflow interfaces and testing app.
Algorithm::info()-related code disabled-after moving to opencv_contrib caused compilation errors

Added usage examples

Added documentation for optflow_io

+bugfix: handling invalid algorithm choice

+ solving MSVC compilation errors; assuming that int and float are 4-bytes long - possibly needs fixing
2014-08-18 17:45:34 +02:00
Vadim Pisarevsky
4df76c353a added outflow, bgsegm modules; moved matlab from the main repository 2014-08-10 23:25:27 +04:00