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]); //"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="<