vector中按照Point类型某一个变量进行排序

code

//
sort(a.begin(), a.end(), cmpy);

//subfunction
bool cmpy(cv::Point const& a, cv::Point const& b)
{
    return a.y < b.y;
}

猜你喜欢

转载自www.cnblogs.com/happyamyhope/p/9269457.html
今日推荐