Giter VIP home page Giter VIP logo

Comments (2)

aous72 avatar aous72 commented on May 24, 2024 2

Hi,

Sorry for the late reply; I had to go through some other stuff.

It is useful to address some background of what you are doing.
JPEG2000 is significantly different to JPEG, and therefore it is not possible to losslessly transcode (or convert) JPEG2000 to JPEG, or the other way. The information stored in JPEG2000 (uses wavelet transform) is different to that stored in JPEG (uses the DCT).
Lossless JPEG2000 or HTJ2K provides better quality than JPEG with QFactor of 1. Therefore, you see this increase in size.

I would suggest to use lossless JPEG2000 only on images with very high quality (such as uncompressed original images).
For previously compressed images, such as the one you are providing, I would suggest using irreversible JPEG2000, "cod.reversible(false)" and then set the quantization step size to something like the one you have "codestream.access_qcd().set_irrev_quant(0.1);"
With this image, -qstep 0.03, the JPEG image and HTJ2K image look roughly the same.
Values > 0.03 produces worst quality, and smaller values produces better quality.
Qstep should be 0.5 or smaller, and for 8 bit images, it not useful to be smaller than 1/256 = 0.0039.

Let me know if you need more info.

Cheers,
Aous

from openjph.

ngoclinh93qt avatar ngoclinh93qt commented on May 24, 2024

Thank you very much for the very useful information.

from openjph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.