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
92702059
Commit
92702059
authored
Jun 26, 2013
by
peng xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build errors
parent
132b885b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
perf_opticalflow.cpp
modules/ocl/perf/perf_opticalflow.cpp
+4
-6
optical_flow_farneback.cpp
modules/ocl/src/optical_flow_farneback.cpp
+6
-6
No files found.
modules/ocl/perf/perf_opticalflow.cpp
View file @
92702059
...
...
@@ -293,12 +293,10 @@ PERFTEST(FarnebackOpticalFlow)
std
::
vector
<
cv
::
Mat
>
flowxy
;
cv
::
split
(
flow
,
flowxy
);
double
diff0
=
0.0
;
TestSystem
::
instance
().
setAccurate
(
ExceptedMatSimilar
(
flowxy
[
0
],
cv
::
Mat
(
d_flowx
),
0.1
,
diff0
));
TestSystem
::
instance
().
setDiff
(
diff0
);
double
diff1
=
0.0
;
TestSystem
::
instance
().
setAccurate
(
ExceptedMatSimilar
(
flowxy
[
1
],
cv
::
Mat
(
d_flowy
),
0.1
,
diff1
));
TestSystem
::
instance
().
setDiff
(
diff1
);
Mat
md_flowx
=
cv
::
Mat
(
d_flowx
);
Mat
md_flowy
=
cv
::
Mat
(
d_flowy
);
TestSystem
::
instance
().
ExceptedMatSimilar
(
flowxy
[
0
],
md_flowx
,
0.1
);
TestSystem
::
instance
().
ExceptedMatSimilar
(
flowxy
[
1
],
md_flowy
,
0.1
);
if
(
useInitFlow
)
{
...
...
modules/ocl/src/optical_flow_farneback.cpp
View file @
92702059
...
...
@@ -82,7 +82,7 @@ namespace cv { namespace ocl { namespace optflow_farneback
gKer
.
upload
(
t_gKer
);
}
void
gaussianBlurOcl
(
const
oclMat
&
src
,
int
ksizeHalf
,
oclMat
&
dst
)
static
void
gaussianBlurOcl
(
const
oclMat
&
src
,
int
ksizeHalf
,
oclMat
&
dst
)
{
string
kernelName
(
"gaussianBlur"
);
size_t
localThreads
[
3
]
=
{
256
,
1
,
1
};
...
...
@@ -105,7 +105,7 @@ namespace cv { namespace ocl { namespace optflow_farneback
globalThreads
,
localThreads
,
args
,
-
1
,
-
1
);
}
void
polynomialExpansionOcl
(
const
oclMat
&
src
,
int
polyN
,
oclMat
&
dst
)
static
void
polynomialExpansionOcl
(
const
oclMat
&
src
,
int
polyN
,
oclMat
&
dst
)
{
string
kernelName
(
"polynomialExpansion"
);
size_t
localThreads
[
3
]
=
{
256
,
1
,
1
};
...
...
@@ -132,7 +132,7 @@ namespace cv { namespace ocl { namespace optflow_farneback
globalThreads
,
localThreads
,
args
,
-
1
,
-
1
,
opt
);
}
void
updateMatricesOcl
(
const
oclMat
&
flowx
,
const
oclMat
&
flowy
,
const
oclMat
&
R0
,
const
oclMat
&
R1
,
oclMat
&
M
)
static
void
updateMatricesOcl
(
const
oclMat
&
flowx
,
const
oclMat
&
flowy
,
const
oclMat
&
R0
,
const
oclMat
&
R1
,
oclMat
&
M
)
{
string
kernelName
(
"updateMatrices"
);
size_t
localThreads
[
3
]
=
{
32
,
8
,
1
};
...
...
@@ -158,7 +158,7 @@ namespace cv { namespace ocl { namespace optflow_farneback
globalThreads
,
localThreads
,
args
,
-
1
,
-
1
);
}
void
boxFilter5Ocl
(
const
oclMat
&
src
,
int
ksizeHalf
,
oclMat
&
dst
)
static
void
boxFilter5Ocl
(
const
oclMat
&
src
,
int
ksizeHalf
,
oclMat
&
dst
)
{
string
kernelName
(
"boxFilter5"
);
int
height
=
src
.
rows
/
5
;
...
...
@@ -180,7 +180,7 @@ namespace cv { namespace ocl { namespace optflow_farneback
globalThreads
,
localThreads
,
args
,
-
1
,
-
1
);
}
void
updateFlowOcl
(
const
oclMat
&
M
,
oclMat
&
flowx
,
oclMat
&
flowy
)
static
void
updateFlowOcl
(
const
oclMat
&
M
,
oclMat
&
flowx
,
oclMat
&
flowy
)
{
string
kernelName
(
"updateFlow"
);
int
cols
=
divUp
(
flowx
.
cols
,
4
);
...
...
@@ -203,7 +203,7 @@ namespace cv { namespace ocl { namespace optflow_farneback
globalThreads
,
localThreads
,
args
,
-
1
,
-
1
);
}
void
gaussianBlur5Ocl
(
const
oclMat
&
src
,
int
ksizeHalf
,
oclMat
&
dst
)
static
void
gaussianBlur5Ocl
(
const
oclMat
&
src
,
int
ksizeHalf
,
oclMat
&
dst
)
{
string
kernelName
(
"gaussianBlur5"
);
int
height
=
src
.
rows
/
5
;
...
...
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