Skip to content

Commit

Permalink
Update hough.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
sturkmen72 committed Sep 5, 2022
1 parent 5bb098b commit 22eb91a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/imgproc/src/hough.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2293,6 +2293,9 @@ static void HoughCircles( InputArray _image, OutputArray _circles,
break;
case HOUGH_GRADIENT_ALT:
{
if( param2 >= 1 )
CV_Error( Error::StsOutOfRange, "when using HOUGH_GRADIENT_ALT method, param2 parameter must be smaller than 1.0" );

std::vector<EstimatedCircle> circles;
Mat image = _image.getMat();
HoughCirclesAlt(image, circles, dp, minDist, minRadius, maxRadius, param1, param2);
Expand Down Expand Up @@ -2320,7 +2323,7 @@ static void HoughCircles( InputArray _image, OutputArray _circles,
}
break;
default:
CV_Error( Error::StsBadArg, "Unrecognized method id. Actually only CV_HOUGH_GRADIENT is supported." );
CV_Error( Error::StsBadArg, "Unrecognized method id. Actually supported methods are HOUGH_GRADIENT and HOUGH_GRADIENT_ALT" );
}
}

Expand Down

0 comments on commit 22eb91a

Please sign in to comment.