Invalid arguments Candidates are: void minEnclosingCircle(const cv::_InputArray &, cv::Point_<float> &, float &)
hi ,
i am using this method to detect circles using contours in android jni ,
std::vector<cv::Point2f> center(contours.size() );
std::vector<cv::vector<cv::Point> > contours_poly( contours.size() );
std::vector<float>radius( contours.size() );
for(int i=0;i<contours.size;i++){
minEnclosingCircle(Mat(contours_poly[i]),cv::Point_<float>(center[i]),radius[i]);
}
but getting this error : Invalid arguments ' Candidates are: void minEnclosingCircle(const cv::_InputArray &, cv::Point_<float> &, float &)'
thanks
it wants a reference to the center point, you're giving it a temporary copy. also please change all your cv::vector to std::vector. last: it's contours.size(), not contours.size, so:
nope , its not working...
std::vector<point_<float>&> center(contours.size() ); for( int i = 0; i < contours.size(); i++ ) {
same error :Invalid arguments Candidates are: void minEnclosingCircle(const cv::_InputArray &, cv::Point_<float> &, float &)
std::vector<point_<float>&> center(contours.size() );
is wrong . - remove the&
removed , but getting same error..i have tried:
for
minEnclosingCircle(Mat(contours_poly[i]),center[i],radius[i]); same invalid arguments error
could you update your question with the current code now ? there's obviously still something wrong, but hard to see without proper context
basically converting :http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/bounding_rects_circles/bounding_rects_circles.html to android using jni ,c++,opencv