Ask Your Question

leafjungle's profile - activity

2020-10-05 01:27:32 -0600 received badge  Student (source)
2013-10-18 21:05:54 -0600 asked a question grabCut bad_alloc problem

The input image size is: 4080*3072.

The problem is: First-chance exception at 0x76424b32 in qt2.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x003db614.

The grabCut method can not process an image with this size?

2013-10-09 03:39:17 -0600 commented answer bounding ellipse needed

I know you point. hope opencv will have a bounding ellipse api in the future.

2013-10-01 08:43:35 -0600 commented answer bounding ellipse needed

Thank you very much~~I have a problem that need to describe the degree of ellipse of a contour. and I want to extract the bounding ellipse, then compare the contour's area and its bounding ellipse area. minAreaRect is not suitable. And I think I can judge by each pixel inside the contour, But I can not get all the points inside the contour.

2013-09-30 23:16:18 -0600 asked a question bounding ellipse needed

Is there a method to get the bounding ellipse of a contour. I mean all the points should be inside the ellipse. fitEllipse get the best fitting ellipse,not the bounding ellipse.

2013-09-27 22:22:16 -0600 asked a question approximate ellipse detection

I have an image with some approximate ellipses inside, and I want to segment them out.

fitEllipse function can only detect accurate ellilps and does not have any error tolerance.

So is there any API or suggestive methods?

Thanks in advance~~

2013-09-24 07:08:01 -0600 commented answer findContours and Mat(contours[i]) problems

I changed the code as yours, but the problems remains.

area=24752, W2=68, H2=1.

2013-09-24 04:14:24 -0600 asked a question findContours and Mat(contours[i]) problems
std::vector<std::vector<cv:Point> > contours;
cv::findContours(gray_img->clone(), contours, CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE);
int contour_num=contours.size();
for (int i = 0; i < contour_num; i++){
   double area = cv::contourArea(contours[i]); //"area" is correct, such as 5000.               
   cv::Mat pointsf;
   cv::Mat(contours[i]).convertTo(pointsf, CV_32F);
   int W2=pointsf.rows;
   int H2=pointsf.cols;  //H2 is always 1, but why?
   cout<<"W2="<<W2<<", H2="<<H2<<endl;
}

The value of H2 is always 1, what's the problem?

2013-09-24 04:09:15 -0600 asked a question findContours and Mat(contours[i]) problem

std::vector<std::vector<cv:oint> > contours; cv::findContours(gray_img->clone(), contours, CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE); int contour_num=contours.size(); for (int i = 0; i < contour_num; i++){ double area = cv::contourArea(contours[i]); //value of "area" is correct, such as 6000
cv::Mat pointsf; cv::Mat(contours[i]).convertTo(pointsf, CV_32F); int W2=pointsf.rows; int H2=pointsf.cols; //value of "H2" is always 1, why? cout<<"W2="<<w2&lt;&lt;", h2="&lt;&lt;H2&lt;&lt;endl; }&lt;/p&gt; &lt;p&gt;The value of " h2"="" is="" always="" 1,="" but="" why?<="" p="">