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?