-
Notifications
You must be signed in to change notification settings - Fork 599
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
decode images in mode IMREAD_UNCHANGED #228
Conversation
@vrabaud Can you comment on this? |
Is this repo still maintained? |
a3320fd
to
82a7477
Compare
@mjcarroll Can you please have a look at this? It's a very annoying issue and the fix is quite simple and should not have an effect on other image decoding parts. |
This looks reasonable, would you have any objection targeting to |
No. But I would like to additionally target Edit: I don't see a |
82a7477
to
3bc4b4a
Compare
@mjcarroll Would you consider merging this into |
ping @mjcarroll Can you merge this? |
@mjcarroll What is missing to get this merged? |
@mjcarroll @vrabaud Can you please comment on this? This is a very annoying issue and seems easy to fix. |
@mjcarroll @vrabaud Seriously, is there any reason why this fix does not get merged? It's unbelievable that reading compressed depth images in 16bit png format is still not possible! If you do not have the capacity to maintain |
3bc4b4a
to
14ff0cc
Compare
I don't believe that @vrabaud has been around for some time. I would be happy to share maintainership with interested parties. I would like to see this be well maintained, but it is currently far down my priority list. Feel free to follow up with me via email. |
This PR changes the decoding mode from
IMREAD_ANYCOLOR
toIMREAD_UNCHANGED
.With
IMREAD_ANYCOLOR
decompressing a 16bit png image results in an 8bit image.Solves issues: #206
This is a simple example of the conversion problem:
This example simply creates a 16bit depth image with the constant value of 2500mm and then convert this to a
sensor_msgs/CompressedImage
and back to a numpy array.Currently, this conversion is broken:
This PR fixes this so that the content in
im0
andim1
is identical: