I am trying to get the DCT coefficients of an image using JAI and then quantize them. Apart from the fact that jai.dct changes the size of an image to powers of 2 if it isn't so i can't figure out how it puts the dct coefficients in an array. In the following source i get the dct coefficients in dctData. I know that dct is supposed to work in 8x8 blocks. So it produces 64 coefficients for its block. How are they placed in the dctData ?
<br /> ParameterBlock pbDCT = (new ParameterBlock()).addSource(grayImage);<br /> PlanarImage dct = JAI.create("dct", pbDCT, null);</p> <p>//int dctWidth = dct.getWidth();<br /> //int dctHeight = dct.getHeight();</p> <p>float dctData = dct.getData().getPixels(0, 0, rgbWidth, rgbHeight, (float) null);<br />