Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
3ff3cd84
Commit
3ff3cd84
authored
Jun 10, 2016
by
Maksim Shabunin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #689 from sbokov:DIS_optical_flow
parents
cd5993c6
d4c3765e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
2 deletions
+49
-2
optflow.bib
modules/optflow/doc/optflow.bib
+7
-0
optflow.hpp
modules/optflow/include/opencv2/optflow.hpp
+38
-0
optical_flow_benchmark.py
modules/optflow/samples/optical_flow_benchmark.py
+0
-0
optical_flow_evaluation.cpp
modules/optflow/samples/optical_flow_evaluation.cpp
+4
-2
dis_flow.cpp
modules/optflow/src/dis_flow.cpp
+0
-0
No files found.
modules/optflow/doc/optflow.bib
View file @
3ff3cd84
...
...
@@ -37,3 +37,10 @@
year={2013},
organization={IEEE}
}
@article{Kroeger2016,
title={Fast Optical Flow using Dense Inverse Search},
author={Kroeger, Till and Timofte, Radu and Dai, Dengxin and Van Gool, Luc},
journal={arXiv preprint arXiv:1603.03590},
year={2016}
}
modules/optflow/include/opencv2/optflow.hpp
View file @
3ff3cd84
...
...
@@ -191,6 +191,44 @@ CV_EXPORTS_W Ptr<DenseOpticalFlow> createOptFlow_Farneback();
//! Additional interface to the SparseToDenseFlow algorithm - calcOpticalFlowSparseToDense()
CV_EXPORTS_W
Ptr
<
DenseOpticalFlow
>
createOptFlow_SparseToDense
();
/** @brief DIS optical flow algorithm.
This class implements the Dense Inverse Search (DIS) optical flow algorithm. More
details about the algorithm can be found at @cite Kroeger2016 .
*/
class
CV_EXPORTS_W
DISOpticalFlow
:
public
DenseOpticalFlow
{
public
:
/** @brief Finest level of the gaussian pyramid on which the flow is computed (zero level
corresponds to the original image resolution).The final flow is obtained by bilinear upscaling.
@see setFinestScale */
virtual
int
getFinestScale
()
const
=
0
;
/** @copybrief getFinestScale @see getFinestScale */
virtual
void
setFinestScale
(
int
val
)
=
0
;
/** @brief Size of an image patch for matching (in pixels)
@see setPatchSize */
virtual
int
getPatchSize
()
const
=
0
;
/** @copybrief getPatchSize @see getPatchSize */
virtual
void
setPatchSize
(
int
val
)
=
0
;
/** @brief Stride between neighbor patches. Must be less than patch size.
@see setPatchStride */
virtual
int
getPatchStride
()
const
=
0
;
/** @copybrief getPatchStride @see getPatchStride */
virtual
void
setPatchStride
(
int
val
)
=
0
;
/** @brief number of gradient descent iterations in the patch inverse search stage
@see setGradientDescentIterations */
virtual
int
getGradientDescentIterations
()
const
=
0
;
/** @copybrief getGradientDescentIterations @see getGradientDescentIterations */
virtual
void
setGradientDescentIterations
(
int
val
)
=
0
;
};
/** @brief Creates an instance of DISOpticalFlow
*/
CV_EXPORTS_W
Ptr
<
DISOpticalFlow
>
createOptFlow_DIS
();
//! @}
}
//optflow
...
...
modules/optflow/samples/optical_flow_benchmark.py
0 → 100644
View file @
3ff3cd84
This diff is collapsed.
Click to expand it.
modules/optflow/samples/optical_flow_evaluation.cpp
View file @
3ff3cd84
...
...
@@ -11,7 +11,7 @@ using namespace optflow;
const
String
keys
=
"{help h usage ? | | print this message }"
"{@image1 | | image1 }"
"{@image2 | | image2 }"
"{@algorithm | | [farneback, simpleflow, tvl1, deepflow
or sparsetodense
flow] }"
"{@algorithm | | [farneback, simpleflow, tvl1, deepflow
, sparsetodenseflow or DIS
flow] }"
"{@groundtruth | | path to the .flo file (optional), Middlebury format }"
"{m measure |endpoint| error measure - [endpoint or angular] }"
"{r region |all | region to compute stats about [all, discontinuities, untextured] }"
...
...
@@ -229,7 +229,7 @@ int main( int argc, char** argv )
if
(
i2
.
depth
()
!=
CV_8U
)
i2
.
convertTo
(
i2
,
CV_8U
);
if
(
(
method
==
"farneback"
||
method
==
"tvl1"
||
method
==
"deepflow"
)
&&
i1
.
channels
()
==
3
)
if
(
(
method
==
"farneback"
||
method
==
"tvl1"
||
method
==
"deepflow"
||
method
==
"DISflow"
)
&&
i1
.
channels
()
==
3
)
{
// 1-channel images are expected
cvtColor
(
i1
,
i1
,
COLOR_BGR2GRAY
);
cvtColor
(
i2
,
i2
,
COLOR_BGR2GRAY
);
...
...
@@ -252,6 +252,8 @@ int main( int argc, char** argv )
algorithm
=
createOptFlow_DeepFlow
();
else
if
(
method
==
"sparsetodenseflow"
)
algorithm
=
createOptFlow_SparseToDense
();
else
if
(
method
==
"DISflow"
)
algorithm
=
createOptFlow_DIS
();
else
{
printf
(
"Wrong method!
\n
"
);
...
...
modules/optflow/src/dis_flow.cpp
0 → 100644
View file @
3ff3cd84
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment