Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you're OK with region co-ordinates being multiples of 8, the JPEG library from <a href="http://www.ijg.org/" rel="nofollow noreferrer">ijg</a> may be able to help you load partial JPEG images.</p> <p>You'd want to:</p> <ol> <li>Get all DCT coefficients for the entire image. Here's an <a href="https://stackoverflow.com/questions/4470107/extracting-dct-coefficients-from-encoded-images-and-video">example of how to do this</a>. Yes, this will involve entropy decoding of the entire image, but this is the less expensive step of JPEG decoding (IDCT is the most expensive one, and we're avoiding it).</li> <li>Throw away the blocks that you don't need (each block consists of 8x8) coefficients. You'll have to do this by hand, but since the layout is quite simple (the blocks are in scanline order) it shouldn't be that hard.</li> <li>Apply block inverse DCT to each of the frames. You can probably get IJG to do that for you. If you can't, then you'll have to do your own IDCT and color transform back to [0, 255] because intensities are in [-127, 128] in the world of JPEG.</li> <li>If all goes well, you'll get your decoded JPEG image. Because of <a href="http://en.wikipedia.org/wiki/Chroma_subsampling" rel="nofollow noreferrer">chroma subsampling</a>, the luma and chroma channels may be of different dimensions, and you will have to compensate for this yourself by scaling.</li> </ol> <p>The first two steps are pretty much covered by the links. The fourth one is quite trivial (you can get the type of chroma subsampling using the IJG interface, and scaling -- essentially upsampling -- is easily achieved by using something like <a href="http://opencv.willowgarage.com/wiki/" rel="nofollow noreferrer">OpenCV</a> or rolling your own code). The <strong>third</strong> one is something I haven't tried yet, but it sounds like it would be possible.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload