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
30239ad5
Commit
30239ad5
authored
Jun 26, 2013
by
peng xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build error.
parent
9b3c318e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
13 deletions
+21
-13
perf_superres_ocl.cpp
modules/superres/perf/perf_superres_ocl.cpp
+21
-13
No files found.
modules/superres/perf/perf_superres_ocl.cpp
View file @
30239ad5
...
...
@@ -41,10 +41,10 @@
//M*/
#include "perf_precomp.hpp"
#include "opencv2/ocl/ocl.hpp"
#ifdef HAVE_OPENCL
#include "opencv2/ocl/ocl.hpp"
using
namespace
std
;
using
namespace
testing
;
using
namespace
perf
;
...
...
@@ -58,13 +58,9 @@ namespace
public
:
explicit
OneFrameSource_OCL
(
const
ocl
::
oclMat
&
frame
)
:
frame_
(
frame
)
{}
void
nextFrame
(
OutputArray
)
{
}
void
nextFrame
(
ocl
::
oclMat
&
frame
)
void
nextFrame
(
OutputArray
frame
)
{
frame_
.
copyTo
(
frame
)
;
ocl
::
getOclMatRef
(
frame
)
=
frame_
;
}
void
reset
()
{
...
...
@@ -78,15 +74,27 @@ namespace
class
ZeroOpticalFlowOCL
:
public
DenseOpticalFlowExt
{
public
:
void
calc
(
ocl
::
oclMat
&
frame0
,
ocl
::
oclMat
&
,
ocl
::
oclMat
&
flow1
,
ocl
::
oclMat
&
flow2
)
void
calc
(
InputArray
frame0
,
InputArray
,
OutputArray
flow1
,
OutputArray
flow2
)
{
cv
::
Size
size
=
frame0
.
size
();
ocl
::
oclMat
&
frame0_
=
ocl
::
getOclMatRef
(
frame0
);
ocl
::
oclMat
&
flow1_
=
ocl
::
getOclMatRef
(
flow1
);
ocl
::
oclMat
&
flow2_
=
ocl
::
getOclMatRef
(
flow2
);
flow1
.
create
(
size
,
CV_32FC1
);
flow2
.
create
(
size
,
CV_32FC1
);
cv
::
Size
size
=
frame0_
.
size
();
flow1
.
setTo
(
Scalar
::
all
(
0
));
flow2
.
setTo
(
Scalar
::
all
(
0
));
if
(
!
flow2
.
needed
())
{
flow1_
.
create
(
size
,
CV_32FC2
);
flow1_
.
setTo
(
Scalar
::
all
(
0
));
}
else
{
flow1_
.
create
(
size
,
CV_32FC1
);
flow2_
.
create
(
size
,
CV_32FC1
);
flow1_
.
setTo
(
Scalar
::
all
(
0
));
flow2_
.
setTo
(
Scalar
::
all
(
0
));
}
}
void
collectGarbage
()
...
...
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