We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function findContours crashes my program for very large images (e.g. 79925 * 49955), apparently regardless of the image contents.
Code:
cv::Mat largeImage(79925, 49955, CV_8UC1); largeImage.setTo(0); // this is not really even needed to reproduce cv::circle(largeImage, cv::Point(largeImage.cols, largeImage.rows), 1000, 255, CV_FILLED); std::vector<std::vector<cv::Point>> contours; cv::findContours(largeImage, contours, cv::RETR_EXTERNAL, cv::CHAIN_APPROX_SIMPLE);
The last line crashes the program. Works great for smaller images (didn't find the exact limit though).
I don't think I'm running out of memory (have multiple gigabytes left), and even if I was, it'd be better to receive an exception of course.
Can anyone reproduce this?
Haven't tried on version 3 yet.
The text was updated successfully, but these errors were encountered:
Seems to be coming from here:
The calculation step * (size.height - 1) overflows (the type is int).
step * (size.height - 1)
int
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
System information (version)
Detailed description
Function findContours crashes my program for very large images (e.g. 79925 * 49955), apparently regardless of the image contents.
Steps to reproduce
Code:
The last line crashes the program. Works great for smaller images (didn't find the exact limit though).
I don't think I'm running out of memory (have multiple gigabytes left), and even if I was, it'd be better to receive an exception of course.
Can anyone reproduce this?
Haven't tried on version 3 yet.
The text was updated successfully, but these errors were encountered: