Reputation:
I have an image and want to transfer it into discrete cosine transform space and then regenerate the image by using the lowest 25 percent and 56.25 percent and 6.25 percent parts,I know that I can use dct2 in matlab, but I do not know what is the lowest 25 percent of part means and how can I regenerate image by them??
Upvotes: 0
Views: 651
Reputation: 21627
The DCT is usually performed on an 8x8 block of pixels (64). It sounds like you want to use only 16.
What you would do for each 8x8 block is: 1. Perform the DCT 2. Set 48 pixels to zero
The trick is that you need to keep the transform values in the upper left corner. In JPEG, you work through the DCT values in a zigzag, starting in the upper left corner.
The issue would be which values to keep as you got further away from the corner. I would start by using the values the form a square in the upper left corner so that you are keeping the values close to the diagonal.
Upvotes: 1