-
Notifications
You must be signed in to change notification settings - Fork 853
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
cv2.imread changes behaviour between 62 and 64 release #662
Comments
Can confirm that Presumably, it might be because of the updated Python dependencies in the |
Related changes in OpenCV opencv/opencv#19439 before 4.5.5. |
Sounds very strange. There are no changes between .62 and .64 for png. Also wheels from Pypi contain identical binaries for libpng. So nothing was changed for png between releases. Do you install both versions with pip? Could you run publish |
@asmorkalov That is right, I've installed both mentioned versions of |
@asmorkalov for
and for
Would you mind helping me interpret these outputs? |
Since .64 we switched to building libpng from sources in opencv/3rdparty rather than PNG library usage from manylinux image. Manylinux verison is out-of-date and is not updated any more. So, in fact the new package does not use *.so fine for image decoding, but relies on statically linked instance. I discussed the issue with @asenyaev. The issue looks like regression between libpng versions and we will try to solve the issue for the nextpackage release. |
@asmorkalov, thank you so much for your swift response and great help! 🎉 I'll be looking forward to the upcoming release 🙏 |
@tomaszgrygiel @narolski yes, the issue in the libpng. The opencv-pyton 4.5.5.62 version has libpng 1.5.13, but opencv-python 4.5.5.64 has libpng 1.6.37. The main issue is in the update between these versions:
I'm preparing updates for docker images and build configurations. The next release should fix this issue. It will give an output the same as in opencv-python 4.5.5.64 version, because we will use the latest version of libpng (1.6.37) in case of #658. |
Tried to reproduce the issue building OpenCV from source (not in opencv-python repository) with libpng 1.6.37 version. So, it happens also there. The output:
The output with the same images and
The output with the same images and
The libpng manual said (link):
What means we have to handle it on OpenCV side. As I understand opencv/opencv#19439 should add this support, but maybe there is a bug? @alalek what do you think? |
@asenyaev opencv/opencv#19439 includes tests, so there is no bug expected. Feature from mentioned PR is available with libpng 1.6.31+ only. This feature is disabled in .62 package as it uses old libpng 1.5.x. @tomaszgrygiel @narolski Below is result for local build with:
and the images from comments above:
output is:
|
The next releases of OpenCV Python will be produced with libpng 1.6.31+ and the behavior will be presumed. Closed as nothing to do on our side. |
Expected behaviour
Using
cv2.imread
from 4.5.5.62 on a PNG image with rotation (EXIF orientation) results in correctly loaded image:Actual behaviour
Using
cv2.imread
from 4.5.5.64 on a PNG image with rotation results in image loaded with rotation ignored:Unfortunately I cannot provide image in question as it contains sensitive information.
Steps to reproduce
Red Hat Ubi - Docker
haswell
opencv-python-headless-4.5.5.64
The text was updated successfully, but these errors were encountered: