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
d3aef0d3
Commit
d3aef0d3
authored
Jan 25, 2013
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix OpenCL build warnings
parent
2e026540
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
20 deletions
+8
-20
hough.cpp
modules/ocl/src/hough.cpp
+8
-20
No files found.
modules/ocl/src/hough.cpp
View file @
d3aef0d3
...
...
@@ -59,18 +59,6 @@ void cv::ocl::HoughCirclesDownload(const oclMat&, OutputArray) { throw_nogpu();
namespace
cv
{
namespace
ocl
{
///////////////////////////OpenCL kernel strings///////////////////////////
extern
const
char
*
imgproc_hough
;
namespace
hough
{
int
buildPointList_gpu
(
const
oclMat
&
src
,
oclMat
&
list
);
void
circlesAccumCenters_gpu
(
const
unsigned
int
*
list
,
int
count
,
const
oclMat
&
dx
,
const
oclMat
&
dy
,
oclMat
&
accum
,
int
minRadius
,
int
maxRadius
,
float
idp
);
int
buildCentersList_gpu
(
const
oclMat
&
accum
,
oclMat
&
centers
,
int
threshold
);
int
circlesAccumRadius_gpu
(
const
oclMat
&
centers
,
int
centersCount
,
const
oclMat
&
list
,
int
count
,
oclMat
&
circles
,
int
maxCircles
,
float
dp
,
int
minRadius
,
int
maxRadius
,
int
threshold
);
}
}}
...
...
@@ -78,7 +66,7 @@ namespace cv { namespace ocl {
//////////////////////////////////////////////////////////
// common functions
namespace
cv
{
namespace
ocl
{
namespace
hough
namespace
{
int
buildPointList_gpu
(
const
oclMat
&
src
,
oclMat
&
list
)
{
...
...
@@ -116,12 +104,12 @@ namespace cv { namespace ocl { namespace hough
return
totalCount
;
}
}
}}
}
//////////////////////////////////////////////////////////
// HoughCircles
namespace
cv
{
namespace
ocl
{
namespace
hough
namespace
{
void
circlesAccumCenters_gpu
(
const
oclMat
&
list
,
int
count
,
const
oclMat
&
dx
,
const
oclMat
&
dy
,
oclMat
&
accum
,
int
minRadius
,
int
maxRadius
,
float
idp
)
{
...
...
@@ -239,7 +227,7 @@ namespace cv { namespace ocl { namespace hough
}
}
}}
// namespace cv { namespace ocl { namespace hough
}
// namespace
...
...
@@ -267,7 +255,7 @@ void cv::ocl::HoughCircles(const oclMat& src, oclMat& circles, HoughCirclesBuf&
cv
::
ocl
::
Canny
(
src
,
buf
.
cannyBuf
,
buf
.
edges
,
std
::
max
(
cannyThreshold
/
2
,
1
),
cannyThreshold
);
ensureSizeIsEnough
(
1
,
src
.
size
().
area
(),
CV_32SC1
,
buf
.
srcPoints
);
const
int
pointsCount
=
hough
::
buildPointList_gpu
(
buf
.
edges
,
buf
.
srcPoints
);
const
int
pointsCount
=
buildPointList_gpu
(
buf
.
edges
,
buf
.
srcPoints
);
if
(
pointsCount
==
0
)
{
circles
.
release
();
...
...
@@ -277,10 +265,10 @@ void cv::ocl::HoughCircles(const oclMat& src, oclMat& circles, HoughCirclesBuf&
ensureSizeIsEnough
(
cvCeil
(
src
.
rows
*
idp
)
+
2
,
cvCeil
(
src
.
cols
*
idp
)
+
2
,
CV_32SC1
,
buf
.
accum
);
buf
.
accum
.
setTo
(
Scalar
::
all
(
0
));
hough
::
circlesAccumCenters_gpu
(
buf
.
srcPoints
,
pointsCount
,
buf
.
cannyBuf
.
dx
,
buf
.
cannyBuf
.
dy
,
buf
.
accum
,
minRadius
,
maxRadius
,
idp
);
circlesAccumCenters_gpu
(
buf
.
srcPoints
,
pointsCount
,
buf
.
cannyBuf
.
dx
,
buf
.
cannyBuf
.
dy
,
buf
.
accum
,
minRadius
,
maxRadius
,
idp
);
ensureSizeIsEnough
(
1
,
src
.
size
().
area
(),
CV_32SC1
,
buf
.
centers
);
int
centersCount
=
hough
::
buildCentersList_gpu
(
buf
.
accum
,
buf
.
centers
,
votesThreshold
);
int
centersCount
=
buildCentersList_gpu
(
buf
.
accum
,
buf
.
centers
,
votesThreshold
);
if
(
centersCount
==
0
)
{
circles
.
release
();
...
...
@@ -384,7 +372,7 @@ void cv::ocl::HoughCircles(const oclMat& src, oclMat& circles, HoughCirclesBuf&
ensureSizeIsEnough
(
1
,
maxCircles
,
CV_32FC3
,
circles
);
const
int
circlesCount
=
hough
::
circlesAccumRadius_gpu
(
buf
.
centers
,
centersCount
,
const
int
circlesCount
=
circlesAccumRadius_gpu
(
buf
.
centers
,
centersCount
,
buf
.
srcPoints
,
pointsCount
,
circles
,
maxCircles
,
dp
,
minRadius
,
maxRadius
,
votesThreshold
);
...
...
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