You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IMRead() with IMReadUnchanged flag ignores EXIF orientation, when it should preserve it #15786
Operating System / Platform => macOS Catalina version: 10.15
Compiler => gocv version: 0.21.0
Detailed description
The documentation seems to indicate that an image's EXIF orientation will be preserved, unless the IMREAD_IGNORE_ORIENTATION flag is set. But when I set the IMREAD_UNCHANGED flag, the EXIF orientation is also not preserved. Strangely, if I use IMREAD_COLOR, it is preserved.
@alalek I proposed a PR to improve the documentation for the IMREAD_UNCHANGED flag. Should the documentation for the imread() function also be changed?
If EXIF information are embedded in the image file, the EXIF orientation will be taken into account and thus the image will be rotated accordingly except if the flag IMREAD_IGNORE_ORIENTATION is passed.
I proposed a PR to image_ignore_orientation can we change the params(parameters) . And can we use image_frame(length,width) and change the orientation accordingly.
Activity
alalek commentedon Oct 26, 2019
Please attach sample image.
BTW, Not all image codecs in OpencV support EXIF.
Alexn117 commentedon Oct 26, 2019
I attached the image to the post.
alalek commentedon Oct 26, 2019
IMREAD_COLOR(1) - apples EXIFIMREAD_IGNORE_ORIENTATION=IMREAD_IGNORE_ORIENTATION | IMREAD_GRAYSCALE(128) - doesn't apply EXIFIMREAD_UNCHANGED(-1) - doesn't apply EXIF tooImage is handled as expected.
IMREAD_UNCHANGEDdocumentation says:If you want to improve documentation, feel free to propose a PR
collinbrake commentedon Feb 6, 2020
@alalek I proposed a PR to improve the documentation for the IMREAD_UNCHANGED flag. Should the documentation for the
imread()function also be changed?preeti13456 commentedon Feb 7, 2020
I proposed a PR to image_ignore_orientation can we change the params(parameters) . And can we use image_frame(length,width) and change the orientation accordingly.