Skip to content
New issue

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

[Bugfix] Move file reading error checking closer to actual file read command #1093

Merged
merged 1 commit into from
Sep 16, 2014
Merged

[Bugfix] Move file reading error checking closer to actual file read command #1093

merged 1 commit into from
Sep 16, 2014

Conversation

dgolden1
Copy link
Contributor

Previously, if (height > 0 && width > 0) was true, the
cv::resize() function would be called before cv_img_origin was
confirmed valid; if the image file/filename was not valid, this
caused an opencv assert error like this:

terminate called after throwing an instance of 'cv::Exception'
what(): /tmp/A3p0_4200_32550/batserve/A3p0/glnxa64/OpenCV/modules/imgproc/src/imgwarp.cpp:1725: error: (-215)
ssize.area() > 0 in function resize

Previously, if (height > 0 && width > 0) was true, the
cv::resize() function would be called before cv_img_origin was
confirmed valid; if the image file/filename was not valid, this
caused an opencv assert error like this:

terminate called after throwing an instance of 'cv::Exception'
  what():  /tmp/A3p0_4200_32550/batserve/A3p0/glnxa64/OpenCV/modules/imgproc/src/imgwarp.cpp:1725: error: (-215)
  ssize.area() > 0 in function resize
@shelhamer
Copy link
Member

Thanks for the more humane error logic!

shelhamer added a commit that referenced this pull request Sep 16, 2014
[fix] Move file reading error checking closer to actual file read command
@shelhamer shelhamer merged commit a77ca76 into BVLC:dev Sep 16, 2014
@dgolden1 dgolden1 deleted the io-cant-load-error-msg branch September 17, 2014 00:01
mitmul pushed a commit to mitmul/caffe that referenced this pull request Sep 30, 2014
[fix] Move file reading error checking closer to actual file read command
RazvanRanca pushed a commit to RazvanRanca/caffe that referenced this pull request Nov 4, 2014
[fix] Move file reading error checking closer to actual file read command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants