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
751264f8
Commit
751264f8
authored
Apr 11, 2014
by
Alexander Karsakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ippiHoughLine_Region to cv::HoughLines
parent
e42057c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
hough.cpp
modules/imgproc/src/hough.cpp
+19
-0
No files found.
modules/imgproc/src/hough.cpp
View file @
751264f8
...
@@ -97,6 +97,25 @@ HoughLinesStandard( const Mat& img, float rho, float theta,
...
@@ -97,6 +97,25 @@ HoughLinesStandard( const Mat& img, float rho, float theta,
int
numangle
=
cvRound
((
max_theta
-
min_theta
)
/
theta
);
int
numangle
=
cvRound
((
max_theta
-
min_theta
)
/
theta
);
int
numrho
=
cvRound
(((
width
+
height
)
*
2
+
1
)
/
rho
);
int
numrho
=
cvRound
(((
width
+
height
)
*
2
+
1
)
/
rho
);
#if (defined(HAVE_IPP) && IPP_VERSION_MAJOR >= 8)
IppiSize
srcSize
=
{
width
,
height
};
IppPointPolar
delta
=
{
rho
,
theta
};
IppPointPolar
dstRoi
[
2
]
=
{{(
Ipp32f
)
-
(
width
+
height
),
(
Ipp32f
)
min_theta
},{(
Ipp32f
)
(
width
+
height
),
(
Ipp32f
)
max_theta
}};
int
bufferSize
;
int
ipp_linesMax
=
std
::
min
(
linesMax
,
numangle
*
numrho
);
int
linesCount
=
0
;
lines
.
resize
(
ipp_linesMax
);
IppStatus
ok
=
ippiHoughLineGetSize_8u_C1R
(
srcSize
,
delta
,
ipp_linesMax
,
&
bufferSize
);
Ipp8u
*
buffer
=
ippsMalloc_8u
(
bufferSize
);
if
(
ok
>=
0
)
ok
=
ippiHoughLine_Region_8u32f_C1R
(
image
,
step
,
srcSize
,
(
IppPointPolar
*
)
&
lines
[
0
],
dstRoi
,
ipp_linesMax
,
&
linesCount
,
delta
,
threshold
,
buffer
);
ippsFree
(
buffer
);
if
(
ok
>=
0
)
{
lines
.
resize
(
linesCount
);
return
;
}
#endif
AutoBuffer
<
int
>
_accum
((
numangle
+
2
)
*
(
numrho
+
2
));
AutoBuffer
<
int
>
_accum
((
numangle
+
2
)
*
(
numrho
+
2
));
std
::
vector
<
int
>
_sort_buf
;
std
::
vector
<
int
>
_sort_buf
;
AutoBuffer
<
float
>
_tabSin
(
numangle
);
AutoBuffer
<
float
>
_tabSin
(
numangle
);
...
...
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