Giter VIP home page Giter VIP logo

Comments (7)

aous72 avatar aous72 commented on May 25, 2024

Hi Lucas,

This images has two downsampled components. The only way to save them to ppm is if you interpolate these two components. Then, if you were to interpolate, where do these component sit relative to the first component (the one that is not downsampled); possible answers are: 0,0 or 1,1 or 0.5, 0.5 and many other locations.

We cannot expect a decoder to be able to do all possible imagined tasks. For these tasks, you have to write your own code.

Kind regards,
Aous

from openjph.

Jamaika1 avatar Jamaika1 commented on May 25, 2024

Hi Aous
Maybe I'm doing something wrong. What should be sampling for 4: 2: 2?
I'm just thinking. Since openjpeg allows 4: 2: 2 sampling. Maybe there's no blockage there.

Edit: I used your latest grok codecs. Previously, jp2 exif files had blotches. Now I have a mistake, but I will not upset the grok. regards
https://github.com/GrokImageCompression/grok/issues/253
ojph warning 0x00010001 at ojph_block_decoder.cpp:1020: A malformed codeblock that has more than one coding pass, but zero length for 2nd and potential 3rd pass.

[2021-09-15 09:16:31.156] [error] Error in HT block coder
[2021-09-15 09:16:31.156] [error] Failed to decompress tile 0/1
[2021-09-15 09:16:31.156] [error] Failed to decompress JP2 file

from openjph.

aous72 avatar aous72 commented on May 25, 2024

You setting is correct. -downsamp {1,1},{2,1},{2,1}.
When YUV is used, OpenJPH store image components as images, no color transform is employed. Also, the .j2c file tells the decoder not use color transform.

I do not know what happens in OpenJPEG; when you save to ppm, II think the result would still be in YUV, not in RGB.
Also not sure if the up-sampling is correct.

from openjph.

Jamaika1 avatar Jamaika1 commented on May 25, 2024
When YUV is used, OpenJPH store image components as images, no color transform is employed. Also, the .j2c file tells the decoder not use color transform.

OK. And it generally keeps some subsamling data. For RGB24/yuv444 I have red photos when decoding.

from openjph.

aous72 avatar aous72 commented on May 25, 2024

It keeps the sub-sampling data. Like you discovered, it does not perform color transform.

from openjph.

Jamaika1 avatar Jamaika1 commented on May 25, 2024

OK. Right. There is no info. I should only decode to PPM.

from openjph.

aous72 avatar aous72 commented on May 25, 2024

If you encode ppm, decode to ppm. If you encode yuv, decode to yuv.

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.