Created
September 27, 2014 03:16
-
-
Save keithshep/2018f3b56dbfdd00edb1 to your computer and use it in GitHub Desktop.
c++ cheats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// creating a priority queue with a lambda less operator | |
auto pt_less = [&mat](const cv::Point& pt1, const cv::Point& pt2) -> bool { | |
return mat.at<uint8_t>(pt1) < mat.at<uint8_t>(pt2); | |
}; | |
priority_queue<cv::Point, vector<cv::Point>, decltype(pt_less)> erosion_candidates(pt_less); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment