Getting DCT Coefficients from JPEG File using Java ?

Discussion in 'Java' started by Jackson, Dec 2, 2004.

  1. Jackson

    Jackson Guest

    I'm currently doing some development in Java and I need to be able to
    extract the DCT Coefficients from a JPG file.

    I've done some research and found that Java does include a JPEG Decoder
    (com.sun.image.codec.jpeg.*), but I'm not sure how I could leverage
    this to grab the DCT Coefficients.

    It is my understanding that I would have to first, for each 8x8 block,
    decode the huffman values, decode the RLE values, decode the DPCM
    values, and undo zig-zag coding. I'm just not sure how I could get
    this concept into my Java program.

    Thanks!
    -Jackson
     
    Jackson, Dec 2, 2004
    #1
    1. Advertisements

  2. Jackson

    markos

    Joined:
    Feb 12, 2016
    Messages:
    1
    Likes Received:
    0
    It seems that 11 years later, there is still no simple answer to this. The only solution I found was to use JNA to draw the coefficients using the native JPEG library. My code is very crude but can be easily extended. Here: https://github.com/markzampoglou/dct-extraction
     
    markos, Feb 12, 2016
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.