Dividing image into 8x8 blocks using JAI TiledImage

I am on a project that requires me to retrieve the DCT coefficients array of image. I am using JAI and managed to compute the DCT by using the API. However, the DCT calculated is applied on the whole image, instead of in blocks like what I intended.

  public PlanarImage calculateDCT(RenderedImage loadedImage)
   {
    ParameterBlock pb = (new ParameterBlock()).addSource(loadedImage);
    PlanarImage dct = JAI.create("dct", pb, null);

    return dct;
   }

How can I apply the DCT calculation on block basis, meaning to say how can I divide the image into block of 8x8 by using the TiledImage class and access the DCT per block if it is possible?

链接地址: http://www.djcxy.com/p/62892.html

上一篇: 有损或无损

下一篇: 使用JAI TiledImage将图像分割成8x8块