DCT transforms data form space domain to frequency domain.
I 've appliet JAI dct operator to an image.
Then, i tried to inspect the values of the dct output:
This is my code:
final String filename = "sample\\viola.jpg";
RenderedImage src = (RenderedImage)JAI.create("fileload", filename);
int width = src.getWidth();
int height = src.getHeight();
ParameterBlock pb = (new ParameterBlock()).addSource(src);
PlanarImage dct = JAI.create("dct", pb, null);
int w = dct.getWidth();
int h = dct.getHeight();
// obtain information in frequency domain
int dctData =
dct.getData().getPixels(0, 0, w, h, (int)null);
double pixels = new double[dctData.length];
for (int i = 0; i < w; i++)
System.out.println(dctData[i] + ", ");
Now, i want to say, if there's a way to interpret this result and,
for understand what they means.
For example, first dct data otput are the follow integers: 51518, 52896, 54628...
Then, i want to say what happens if i set to 0 the dct data falling within a certain range, (thus removing some frequencies), and i re-apply dct...