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
c818de99
Commit
c818de99
authored
May 15, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1640 from terfendail:disflow_fix
parents
882d7e6d
1bcb634a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
dis_flow.cpp
modules/optflow/src/dis_flow.cpp
+4
-2
No files found.
modules/optflow/src/dis_flow.cpp
View file @
c818de99
...
...
@@ -1316,7 +1316,8 @@ bool DISOpticalFlowImpl::ocl_calc(InputArray I0, InputArray I1, InputOutputArray
else
flow
.
create
(
I1Mat
.
size
(),
CV_32FC2
);
UMat
&
u_flowMat
=
flow
.
getUMatRef
();
coarsest_scale
=
(
int
)(
log
((
2
*
I0Mat
.
cols
)
/
(
4.0
*
patch_size
))
/
log
(
2.0
)
+
0.5
)
-
1
;
coarsest_scale
=
min
((
int
)(
log
(
max
(
I0Mat
.
cols
,
I0Mat
.
rows
)
/
(
4.0
*
patch_size
))
/
log
(
2.0
)
+
0.5
),
/* Original code serach for maximal movement of width/4 */
(
int
)(
log
(
min
(
I0Mat
.
cols
,
I0Mat
.
rows
)
/
patch_size
)
/
log
(
2.0
)));
/* Deepest pyramid level greater or equal than patch*/
ocl_prepareBuffers
(
I0Mat
,
I1Mat
,
u_flowMat
,
use_input_flow
);
u_Ux
[
coarsest_scale
].
setTo
(
0.0
f
);
...
...
@@ -1382,7 +1383,8 @@ void DISOpticalFlowImpl::calc(InputArray I0, InputArray I1, InputOutputArray flo
else
flow
.
create
(
I1Mat
.
size
(),
CV_32FC2
);
Mat
flowMat
=
flow
.
getMat
();
coarsest_scale
=
(
int
)(
log
((
2
*
I0Mat
.
cols
)
/
(
4.0
*
patch_size
))
/
log
(
2.0
)
+
0.5
)
-
1
;
coarsest_scale
=
min
((
int
)(
log
(
max
(
I0Mat
.
cols
,
I0Mat
.
rows
)
/
(
4.0
*
patch_size
))
/
log
(
2.0
)
+
0.5
),
/* Original code serach for maximal movement of width/4 */
(
int
)(
log
(
min
(
I0Mat
.
cols
,
I0Mat
.
rows
)
/
patch_size
)
/
log
(
2.0
)));
/* Deepest pyramid level greater or equal than patch*/
int
num_stripes
=
getNumThreads
();
prepareBuffers
(
I0Mat
,
I1Mat
,
flowMat
,
use_input_flow
);
...
...
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