I'm trying to sort vector of contours point in decending order but whenever I used:
sort(contours.begin(), contours.end() , greater<>()),
It is poping out an error.
How to sort vector that contains contour points in decending order?
Mat img;
im.copyTo(img);
vector<vector<Point>>contours;
vector<Vec4i>hierachy;
findContours(Canny_img , contours , hierachy , RETR_EXTERNAL , CHAIN_APPROX_SIMPLE);
sort(contours.begin(), contours.end() , greater<Point>()); //This line getting error
for(int i = 0; i < contours.size(); i++)
{
drawContours(img , contours , i , Scalar(0,255,0) , 2);
imshow("Contour Image" , img);
waitKey(0);
}