Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
449b99a6
Commit
449b99a6
authored
Aug 16, 2013
by
Roman Donchenko
Committed by
OpenCV Buildbot
Aug 16, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1286 from SpecLad:optflow-sf-init
parents
7919bcef
7d768d21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
simpleflow.cpp
modules/video/src/simpleflow.cpp
+4
-4
No files found.
modules/video/src/simpleflow.cpp
View file @
449b99a6
...
@@ -287,7 +287,7 @@ static Mat upscaleOpticalFlow(int new_rows,
...
@@ -287,7 +287,7 @@ static Mat upscaleOpticalFlow(int new_rows,
static
Mat
calcIrregularityMat
(
const
Mat
&
flow
,
int
radius
)
{
static
Mat
calcIrregularityMat
(
const
Mat
&
flow
,
int
radius
)
{
const
int
rows
=
flow
.
rows
;
const
int
rows
=
flow
.
rows
;
const
int
cols
=
flow
.
cols
;
const
int
cols
=
flow
.
cols
;
Mat
irregularity
(
rows
,
cols
,
CV_32F
);
Mat
irregularity
=
Mat
::
zeros
(
rows
,
cols
,
CV_32F
);
for
(
int
r
=
0
;
r
<
rows
;
++
r
)
{
for
(
int
r
=
0
;
r
<
rows
;
++
r
)
{
const
int
start_row
=
max
(
0
,
r
-
radius
);
const
int
start_row
=
max
(
0
,
r
-
radius
);
const
int
end_row
=
min
(
rows
-
1
,
r
+
radius
);
const
int
end_row
=
min
(
rows
-
1
,
r
+
radius
);
...
@@ -409,7 +409,7 @@ static void extrapolateFlow(Mat& flow,
...
@@ -409,7 +409,7 @@ static void extrapolateFlow(Mat& flow,
const
Mat
&
speed_up
)
{
const
Mat
&
speed_up
)
{
const
int
rows
=
flow
.
rows
;
const
int
rows
=
flow
.
rows
;
const
int
cols
=
flow
.
cols
;
const
int
cols
=
flow
.
cols
;
Mat
done
(
rows
,
cols
,
CV_8U
);
Mat
done
=
Mat
::
zeros
(
rows
,
cols
,
CV_8U
);
for
(
int
r
=
0
;
r
<
rows
;
++
r
)
{
for
(
int
r
=
0
;
r
<
rows
;
++
r
)
{
for
(
int
c
=
0
;
c
<
cols
;
++
c
)
{
for
(
int
c
=
0
;
c
<
cols
;
++
c
)
{
if
(
!
done
.
at
<
uchar
>
(
r
,
c
)
&&
speed_up
.
at
<
uchar
>
(
r
,
c
)
>
1
)
{
if
(
!
done
.
at
<
uchar
>
(
r
,
c
)
&&
speed_up
.
at
<
uchar
>
(
r
,
c
)
>
1
)
{
...
@@ -504,8 +504,8 @@ CV_EXPORTS_W void calcOpticalFlowSF(Mat& from,
...
@@ -504,8 +504,8 @@ CV_EXPORTS_W void calcOpticalFlowSF(Mat& from,
Mat
mask
=
Mat
::
ones
(
curr_from
.
size
(),
CV_8U
);
Mat
mask
=
Mat
::
ones
(
curr_from
.
size
(),
CV_8U
);
Mat
mask_inv
=
Mat
::
ones
(
curr_from
.
size
(),
CV_8U
);
Mat
mask_inv
=
Mat
::
ones
(
curr_from
.
size
(),
CV_8U
);
Mat
flow
(
curr_from
.
size
(),
CV_32FC2
);
Mat
flow
=
Mat
::
zeros
(
curr_from
.
size
(),
CV_32FC2
);
Mat
flow_inv
(
curr_to
.
size
(),
CV_32FC2
);
Mat
flow_inv
=
Mat
::
zeros
(
curr_to
.
size
(),
CV_32FC2
);
Mat
confidence
;
Mat
confidence
;
Mat
confidence_inv
;
Mat
confidence_inv
;
...
...
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