Commit b6a50e72 authored by xolodilnik's avatar xolodilnik

HoughPoint2Line: fixed unsuccessful build

parent a02af4a1
......@@ -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 );
......
......@@ -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;
}
......
......@@ -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);
}
//-----------------------------------------------------------------------------
......
......@@ -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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment