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
3fea2620
Commit
3fea2620
authored
Apr 08, 2013
by
peng xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some compilation errors and warnings.
parent
77501f3e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
21 deletions
+27
-21
imgproc.cpp
modules/ocl/src/imgproc.cpp
+5
-2
match_template.cpp
modules/ocl/src/match_template.cpp
+3
-0
imgproc_mulAndScaleSpectrums.cl
modules/ocl/src/opencl/imgproc_mulAndScaleSpectrums.cl
+18
-18
test_fft.cpp
modules/ocl/test/test_fft.cpp
+1
-1
No files found.
modules/ocl/src/imgproc.cpp
View file @
3fea2620
...
@@ -1661,7 +1661,7 @@ Size cv::ocl::ConvolveBuf::estimateBlockSize(Size result_size, Size /*templ_size
...
@@ -1661,7 +1661,7 @@ Size cv::ocl::ConvolveBuf::estimateBlockSize(Size result_size, Size /*templ_size
int
width
=
(
result_size
.
width
+
2
)
/
3
;
int
width
=
(
result_size
.
width
+
2
)
/
3
;
int
height
=
(
result_size
.
height
+
2
)
/
3
;
int
height
=
(
result_size
.
height
+
2
)
/
3
;
width
=
std
::
min
(
width
,
result_size
.
width
);
width
=
std
::
min
(
width
,
result_size
.
width
);
height
=
std
::
min
(
height
,
result_size
.
height
);
height
=
std
::
min
(
height
,
result_size
.
height
);
return
Size
(
width
,
height
);
return
Size
(
width
,
height
);
}
}
...
@@ -1714,7 +1714,7 @@ static void convolve_run_fft(const oclMat &image, const oclMat &templ, oclMat &r
...
@@ -1714,7 +1714,7 @@ static void convolve_run_fft(const oclMat &image, const oclMat &templ, oclMat &r
Size
result_roi_size
(
std
::
min
(
x
+
block_size
.
width
,
result
.
cols
)
-
x
,
Size
result_roi_size
(
std
::
min
(
x
+
block_size
.
width
,
result
.
cols
)
-
x
,
std
::
min
(
y
+
block_size
.
height
,
result
.
rows
)
-
y
);
std
::
min
(
y
+
block_size
.
height
,
result
.
rows
)
-
y
);
Rect
roi1
(
x
,
y
,
result_roi_size
.
width
,
result_roi_size
.
height
);
Rect
roi1
(
x
,
y
,
result_roi_size
.
width
,
result_roi_size
.
height
);
Rect
roi2
(
0
,
0
,
result_roi_size
.
width
,
result_roi_size
.
height
);
Rect
roi2
(
0
,
0
,
result_roi_size
.
width
,
result_roi_size
.
height
);
...
@@ -1727,6 +1727,9 @@ static void convolve_run_fft(const oclMat &image, const oclMat &templ, oclMat &r
...
@@ -1727,6 +1727,9 @@ static void convolve_run_fft(const oclMat &image, const oclMat &templ, oclMat &r
#else
#else
CV_Error
(
CV_StsNotImplemented
,
"OpenCL DFT is not implemented"
);
CV_Error
(
CV_StsNotImplemented
,
"OpenCL DFT is not implemented"
);
#define UNUSED(x) (void)(x);
UNUSED
(
image
)
UNUSED
(
templ
)
UNUSED
(
result
)
UNUSED
(
ccorr
)
UNUSED
(
buf
)
#undef UNUSED
#endif
#endif
}
}
static
void
convolve_run
(
const
oclMat
&
src
,
const
oclMat
&
temp1
,
oclMat
&
dst
,
String
kernelName
,
const
char
**
kernelString
)
static
void
convolve_run
(
const
oclMat
&
src
,
const
oclMat
&
temp1
,
oclMat
&
dst
,
String
kernelName
,
const
char
**
kernelString
)
...
...
modules/ocl/src/match_template.cpp
View file @
3fea2620
...
@@ -112,6 +112,9 @@ namespace cv
...
@@ -112,6 +112,9 @@ namespace cv
else
else
return
false
;
return
false
;
#else
#else
#define UNUSED(x) (void)(x);
UNUSED
(
method
)
UNUSED
(
depth
)
UNUSED
(
size
)
#undef UNUSED
return
true
;
return
true
;
#endif
#endif
}
}
...
...
modules/ocl/src/opencl/imgproc_mulAndScaleSpectrums.cl
View file @
3fea2620
...
@@ -54,16 +54,16 @@ inline cfloat conjf(cfloat a)
...
@@ -54,16 +54,16 @@ inline cfloat conjf(cfloat a)
return
(
cfloat
)(
a.x,
-
a.y
)
;
return
(
cfloat
)(
a.x,
-
a.y
)
;
}
}
__kernel
void
__kernel
void
mulAndScaleSpectrumsKernel
(
mulAndScaleSpectrumsKernel
(
__global
const
cfloat*
a,
__global
const
cfloat*
a,
__global
const
cfloat*
b,
__global
const
cfloat*
b,
float
scale,
float
scale,
__global
cfloat*
dst,
__global
cfloat*
dst,
uint
cols,
uint
cols,
uint
rows,
uint
rows,
uint
mstep
uint
mstep
)
)
{
{
const
uint
x
=
get_global_id
(
0
)
;
const
uint
x
=
get_global_id
(
0
)
;
const
uint
y
=
get_global_id
(
1
)
;
const
uint
y
=
get_global_id
(
1
)
;
...
@@ -74,16 +74,16 @@ __kernel void
...
@@ -74,16 +74,16 @@ __kernel void
dst[idx]
=
(
cfloat
)(
v.x
*
scale,
v.y
*
scale
)
;
dst[idx]
=
(
cfloat
)(
v.x
*
scale,
v.y
*
scale
)
;
}
}
}
}
__kernel
void
__kernel
void
mulAndScaleSpectrumsKernel_CONJ
(
mulAndScaleSpectrumsKernel_CONJ
(
__global
const
cfloat*
a,
__global
const
cfloat*
a,
__global
const
cfloat*
b,
__global
const
cfloat*
b,
float
scale,
float
scale,
__global
cfloat*
dst,
__global
cfloat*
dst,
uint
cols,
uint
cols,
uint
rows,
uint
rows,
uint
mstep
uint
mstep
)
)
{
{
const
uint
x
=
get_global_id
(
0
)
;
const
uint
x
=
get_global_id
(
0
)
;
const
uint
y
=
get_global_id
(
1
)
;
const
uint
y
=
get_global_id
(
1
)
;
...
...
modules/ocl/test/test_fft.cpp
View file @
3fea2620
...
@@ -226,7 +226,7 @@ TEST_P(Convolve_DFT, Accuracy)
...
@@ -226,7 +226,7 @@ TEST_P(Convolve_DFT, Accuracy)
cv
::
ocl
::
oclMat
dst
;
cv
::
ocl
::
oclMat
dst
;
cv
::
ocl
::
convolve
(
cv
::
ocl
::
oclMat
(
src
),
cv
::
ocl
::
oclMat
(
kernel
),
dst
,
ccorr
);
cv
::
ocl
::
convolve
(
cv
::
ocl
::
oclMat
(
src
),
cv
::
ocl
::
oclMat
(
kernel
),
dst
,
ccorr
);
cv
::
Mat
dst_gold
;
cv
::
Mat
dst_gold
;
convolveDFT
(
src
,
kernel
,
dst_gold
,
ccorr
);
convolveDFT
(
src
,
kernel
,
dst_gold
,
ccorr
);
...
...
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