imread and tiled tiff images (Bugfix #3472)


Added by Matti Picus about 11 years ago. Updated about 11 years ago.


Status:Done Start date:2014-01-02
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:highgui-images
Target version:2.4.9
Affected version:2.4.8 (latest release) Operating System:Any
Difficulty:Easy HW Platform:Any
Pull request:https://github.com/Itseez/opencv/pull/2180

Description

imread() does not load tiled tiff images properly if the image with and height are not exact tile multiples.
In order to reproduce the bug, save the attached image and use ImagMagick's convert program to create a tiled copy, then try to load and save the converted image with OpenCV.
Or just run the script bug.sh (you will need to adjust the path to your local OpenCV build) and view the resulting images.
A diff against the latest git which fixes the probelm is attached, I did not check the float and double cases.


out.tif - non-tiled image, 240x320 pixels (300.2 kB) Matti Picus, 2014-01-02 08:44 pm

bug.sh - script to create tiled 8- and 16-bit images, then to read/write with OpenCV (cv2 from python) (718 Bytes) Matti Picus, 2014-01-02 08:44 pm

diff.txt - patch to fix the bug (6.3 kB) Matti Picus, 2014-01-02 08:44 pm


Associated revisions

Revision ef347f4b
Added by Vadim Pisarevsky over 10 years ago

Merge pull request #3472 from Dmitry-Me:preventDivByZero

History

Updated by Daniil Osokin about 11 years ago

  • Target version set to 2.4.9
  • Tracker changed from Bug to Patch

Updated by Daniil Osokin about 11 years ago

Matti, thanks for the patch! Could you please send a pull request: http://code.opencv.org/projects/opencv/wiki/How_to_contribute? It will really help!

  • Assignee set to Matti Picus

Updated by Matti Picus about 11 years ago

Added pull request from branch issue3472

Updated by Andrew Senin about 11 years ago

Matti,

thanks a lot for the pull request! Unfortunately at the moment the automatic build is failed due to the merge conflict:
http://build.opencv.org/builders/precommit_windows/builds/8658
http://pullrequest.opencv.org/?page=0

Could you please fix and update? Thanks again

  • Pull request set to https://github.com/Itseez/opencv/pull/2180
  • Status changed from New to Open

Updated by Matti Picus about 11 years ago

Added pull requests against both 2.4 and master branches

Updated by Matti Picus about 11 years ago

is there any news? Should I be doing something to get this closed?

Updated by Dmitry Retinskiy about 11 years ago

Thanks Matti.
Issue is closed.

  • Status changed from Open to Done

Updated by Kirill Kornyakov about 11 years ago

  • Tracker changed from Patch to Bugfix
  • Assignee deleted (Matti Picus)

Also available in: Atom PDF