Created
May 22, 2015 13:24
-
-
Save codeOfRobin/b2ee523fda6f97abed98 to your computer and use it in GitHub Desktop.
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
int threshold_value = 0; | |
int const max_BINARY_value = 2147483647; | |
cv::Mat src_gray=[self cvMatFromUIImage:img.image]; | |
cv::Mat dst; | |
dst=src_gray; | |
cv::cvtColor(src_gray, dst, cv::COLOR_RGB2GRAY); | |
cv::Mat canny_output; | |
std::vector<std::vector<cv::Point> > contours; | |
std::vector<cv::Vec4i> hierarchy; | |
cv::RNG rng(12345); | |
cv::threshold( dst, dst, threshold_value, max_BINARY_value,cv::THRESH_OTSU ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment