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

color of reconstructed png file much darker #1330

Closed
moha23 opened this issue Feb 3, 2021 · 3 comments
Closed

color of reconstructed png file much darker #1330

moha23 opened this issue Feb 3, 2021 · 3 comments

Comments

@moha23
Copy link

moha23 commented Feb 3, 2021

I tried compressing and decompressing an image from the kodak dataset (kodim01.png) but the reconstruction seems much darker no matter what psnr value i give/dont give at all.
Commands I used:

/home/mo/Documents/openjpeg-v2.4.0-linux-x86_64/bin/opj_compress -i /home/mo/Downloads/kodim01.png -o /home/mo/Downloads/kodim01.jp2
/home/mo/Documents/openjpeg-v2.4.0-linux-x86_64/bin/opj_decompress -i /home/mo/Downloads/kodim01.jp2 -o /home/mo/Downloads/kodim01recons.png

Is this expected behaviour or am i doing something wrong? When I check the psnr manually it's much lower than what I put in the command.


Screenshot from 2021-02-03 21-45-58

@moha23
Copy link
Author

moha23 commented Feb 4, 2021

Oh great! Yeah I tried on a couple other images and it works just fine so figured must be some gamma issue. Thanks a lot for getting back with this detailed info! Just wanted to check out the rate distortion curve for Kodak dataset available online and widely used in research papers. Thanks again.

@moha23 moha23 closed this as completed Feb 4, 2021
@jiuzhuanzhuan
Copy link

jiuzhuanzhuan commented Dec 1, 2021

Oh great! Yeah I tried on a couple other images and it works just fine so figured must be some gamma issue. Thanks a lot for getting back with this detailed info! Just wanted to check out the rate distortion curve for Kodak dataset available online and widely used in research papers. Thanks again.

Hi,
Did you get the correct R-D loss of Kodak compressed with OPENJPEG ? When I try to compress Kodak lossly,command as below

opj_compress -i  kodim01.png  -q  xx  -o kodim01.jp2
opj_decompress -i  kodim01.jp2 -o kodim01recons.png

the parameters of q from set of [20,25,30,35,40,45,50].
But the compression rate of OPENJPEG even bad then jpeg. Did you know how to use OPENJPEG correctly?

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

No branches or pull requests

3 participants
@moha23 @jiuzhuanzhuan and others