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
7ae94c57
Commit
7ae94c57
authored
Aug 14, 2012
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed build without cuda
parent
34b9bd61
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
17 deletions
+12
-17
hough.cpp
modules/gpu/src/hough.cpp
+12
-17
No files found.
modules/gpu/src/hough.cpp
View file @
7ae94c57
...
...
@@ -42,6 +42,16 @@
#include "precomp.hpp"
#if !defined (HAVE_CUDA)
void
cv
::
gpu
::
HoughLinesTransform
(
const
GpuMat
&
,
GpuMat
&
,
GpuMat
&
,
float
,
float
)
{
throw_nogpu
();
}
void
cv
::
gpu
::
HoughLinesGet
(
const
GpuMat
&
,
GpuMat
&
,
float
,
float
,
int
,
bool
,
int
)
{
throw_nogpu
();
}
void
cv
::
gpu
::
HoughLines
(
const
GpuMat
&
,
GpuMat
&
,
float
,
float
,
int
,
bool
,
int
)
{
throw_nogpu
();
}
void
cv
::
gpu
::
HoughLines
(
const
GpuMat
&
,
GpuMat
&
,
GpuMat
&
,
GpuMat
&
,
float
,
float
,
int
,
bool
,
int
)
{
throw_nogpu
();
}
void
cv
::
gpu
::
HoughLinesDownload
(
const
GpuMat
&
,
OutputArray
,
OutputArray
)
{
throw_nogpu
();
}
#else
/* !defined (HAVE_CUDA) */
namespace
cv
{
namespace
gpu
{
namespace
device
{
namespace
hough
...
...
@@ -62,23 +72,6 @@ void cv::gpu::HoughLinesTransform(const GpuMat& src, GpuMat& accum, GpuMat& buf,
ensureSizeIsEnough
(
1
,
src
.
size
().
area
(),
CV_32SC1
,
buf
);
unsigned
int
count
=
buildPointList_gpu
(
src
,
buf
.
ptr
<
unsigned
int
>
());
// unsigned int count = 0;
// {
// cv::Mat h_src(src);
// cv::Mat h_buf(1, src.size().area(), CV_32SC1);
// for (int y = 0; y < h_src.rows; ++y)
// {
// for (int x = 0; x < h_src.cols; ++x)
// {
// if (h_src.at<uchar>(y, x))
// {
// const unsigned int val = (y << 16) | x;
// h_buf.ptr<unsigned int>()[count++] = val;
// }
// }
// }
// buf.upload(h_buf);
// }
const
int
numangle
=
cvRound
(
CV_PI
/
theta
);
const
int
numrho
=
cvRound
(((
src
.
cols
+
src
.
rows
)
*
2
+
1
)
/
rho
);
...
...
@@ -141,3 +134,5 @@ void cv::gpu::HoughLinesDownload(const GpuMat& d_lines, OutputArray h_lines_, Ou
d_voices
.
download
(
h_voices
);
}
}
#endif
/* !defined (HAVE_CUDA) */
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