Detecting shapes in an image

same code with 3rd order sobel is better:

cv::Mat dstX, dstY;
cv::Sobel(channels[i], dstX, CV_32FC1, 3, 0, 5, 1.0, 0.0, cv::BORDER_REFLECT);
cv::Sobel(channels[i], dstY, CV_32FC1, 0, 3, 5, 1.0, 0.0, cv::BORDER_REFLECT);

With threshold 80:

2 Likes