Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
b6a50e72
Commit
b6a50e72
authored
Jun 03, 2015
by
xolodilnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HoughPoint2Line: fixed unsuccessful build
parent
a02af4a1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
20 deletions
+13
-20
fast_hough_transform.hpp
...imgproc/include/opencv2/ximgproc/fast_hough_transform.hpp
+2
-3
fast_hough_transform.cpp
modules/ximgproc/samples/fast_hough_transform.cpp
+1
-3
fast_hough_transform.cpp
modules/ximgproc/src/fast_hough_transform.cpp
+8
-11
test_fast_hough_transform.cpp
modules/ximgproc/test/test_fast_hough_transform.cpp
+2
-3
No files found.
modules/ximgproc/include/opencv2/ximgproc/fast_hough_transform.hpp
View file @
b6a50e72
...
...
@@ -141,10 +141,10 @@ CV_EXPORTS_W void FastHoughTransform( InputArray src,
* @brief Calculates coordinates of line segment corresponded by point in Hough space.
* @param houghPoint Point in Hough space.
* @param srcImgInfo The source (input) image of Hough transform.
* @param line Coordinates of line segment corresponded by point in Hough space.
* @param angleRange The part of Hough space where point is situated, see cv::AngleRangeOption
* @param makeSkew Specifies to do or not to do image skewing, see cv::HoughDeskewOption
* @param rules Specifies strictness of line segment calculating, see cv::RulesOption
* @retval [Vec4i] Coordinates of line segment corresponded by point in Hough space.
* @remarks If rules parameter set to RO_STRICT
then returned line cut along the border of source image.
* @remarks If rules parameter set to RO_WEAK then in case of point, which belongs
...
...
@@ -152,9 +152,8 @@ CV_EXPORTS_W void FastHoughTransform( InputArray src,
*
* The function calculates coordinates of line segment corresponded by point in Hough space.
*/
CV_EXPORTS_W
void
HoughPoint2Line
(
const
Point
&
houghPoint
,
CV_EXPORTS_W
Vec4i
HoughPoint2Line
(
const
Point
&
houghPoint
,
InputArray
srcImgInfo
,
Vec4i
&
line
,
int
angleRange
=
ARO_315_135
,
int
makeSkew
=
HDO_DESKEW
,
int
rules
=
RO_IGNORE_BORDERS
);
...
...
modules/ximgproc/samples/fast_hough_transform.cpp
View file @
b6a50e72
...
...
@@ -194,9 +194,7 @@ bool getLocalExtr(vector<Vec4i> &lines,
for
(
size_t
i
=
0
;
i
<
weightedPoints
.
size
();
++
i
)
{
Vec4i
houghLine
(
0
,
0
,
0
,
0
);
HoughPoint2Line
(
weightedPoints
[
i
].
second
,
src
,
houghLine
);
lines
.
push_back
(
houghLine
);
lines
.
push_back
(
HoughPoint2Line
(
weightedPoints
[
i
].
second
,
src
));
}
return
true
;
}
...
...
modules/ximgproc/src/fast_hough_transform.cpp
View file @
b6a50e72
...
...
@@ -835,12 +835,11 @@ static void crossSegments(Point &point,
point
.
y
=
cvRound
(
line1
.
u
.
y
+
mul
*
(
line1
.
v
.
y
-
line1
.
u
.
y
));
}
void
HoughPoint2Line
(
const
Point
&
houghPoint
,
InputArray
srcImgInfo
,
Vec4i
&
line
,
int
angleRange
,
int
makeSkew
,
int
rules
)
Vec4i
HoughPoint2Line
(
const
Point
&
houghPoint
,
InputArray
srcImgInfo
,
int
angleRange
,
int
makeSkew
,
int
rules
)
{
Mat
srcImgInfoMat
=
srcImgInfo
.
getMat
();
...
...
@@ -907,8 +906,7 @@ void HoughPoint2Line(const Point &houghPoint,
if
(
!
ret
)
{
line
=
Vec4i
(
dstLine
.
v
.
x
,
dstLine
.
v
.
y
,
dstLine
.
u
.
x
,
dstLine
.
u
.
y
);
return
;
return
Vec4i
(
dstLine
.
v
.
x
,
dstLine
.
v
.
y
,
dstLine
.
u
.
x
,
dstLine
.
u
.
y
);
}
if
(
rules
&
RO_IGNORE_BORDERS
)
...
...
@@ -933,8 +931,7 @@ void HoughPoint2Line(const Point &houghPoint,
break
;
}
line
=
Vec4i
(
dstLine
.
v
.
x
,
dstLine
.
v
.
y
,
dstLine
.
u
.
x
,
dstLine
.
u
.
y
);
return
;
return
Vec4i
(
dstLine
.
v
.
x
,
dstLine
.
v
.
y
,
dstLine
.
u
.
x
,
dstLine
.
u
.
y
);
}
Point
minIntersectPoint
(
0
,
0
);
...
...
@@ -1020,7 +1017,7 @@ void HoughPoint2Line(const Point &houghPoint,
break
;
}
line
=
Vec4i
(
dstLine
.
v
.
x
,
dstLine
.
v
.
y
,
dstLine
.
u
.
x
,
dstLine
.
u
.
y
);
return
Vec4i
(
dstLine
.
v
.
x
,
dstLine
.
v
.
y
,
dstLine
.
u
.
x
,
dstLine
.
u
.
y
);
}
//-----------------------------------------------------------------------------
...
...
modules/ximgproc/test/test_fast_hough_transform.cpp
View file @
b6a50e72
...
...
@@ -286,9 +286,8 @@ int TestFHT::validate_line(Mat const& fht,
{
Point
fht_max
(
-
1
,
-
1
);
minMaxLoc
(
fht_channels
[
ch
],
0
,
0
,
0
,
&
fht_max
);
Vec4i
src_line
;
HoughPoint2Line
(
fht_max
,
src
,
src_line
,
ARO_315_135
,
HDO_DESKEW
,
RO_STRICT
);
Vec4i
src_line
=
HoughPoint2Line
(
fht_max
,
src
,
ARO_315_135
,
HDO_DESKEW
,
RO_STRICT
);
double
const
a
=
src_line
[
1
]
-
src_line
[
3
];
double
const
b
=
src_line
[
2
]
-
src_line
[
0
];
...
...
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