dct

Discrete Cosine Transform DCT implementation C

拜拜、爱过 提交于 2019-12-03 01:32:45
Im trying to implement a forward and inverse Discrete Cosine Transform (DCT) in C. The code is to transorm a single input block of pixels to the transformation matrix via the dct() function and then back to the original pixel values via the idct() function. Please see the attached code. My output form the idct are consecutive values of 244, 116, 244, 116 etc. From the look of the idct values, it doesnt look like my program is working.. Could someone help me out and give me an idea of what results i should be expecting after each function? Obviously after the idct, i should be getting prety

Is there any way to control the concatenation of the blockproc output?

你说的曾经没有我的故事 提交于 2019-12-02 03:51:05
问题 This is a follow up to the question: Overlapping sliding window over an image using blockproc or im2col? So by using the code : B = blockproc(A, [1 1], @block_fun, 'BorderSize', [2 2], 'TrimBorder', false, 'PadPartialBlocks', true) I was able to create an overlapping sliding window over my image and calculate the dct2 for each window. But the problem is that blockproc concatenates the output in a way that I cannot use. The output greatly depends on the block size and the size of the output

Is there any way to control the concatenation of the blockproc output?

假如想象 提交于 2019-12-02 00:51:31
This is a follow up to the question: Overlapping sliding window over an image using blockproc or im2col? So by using the code : B = blockproc(A, [1 1], @block_fun, 'BorderSize', [2 2], 'TrimBorder', false, 'PadPartialBlocks', true) I was able to create an overlapping sliding window over my image and calculate the dct2 for each window. But the problem is that blockproc concatenates the output in a way that I cannot use. The output greatly depends on the block size and the size of the output matrix is different because of it every time. My dct2 function creates a 1 x 200 vector for every block

Why JPEG compression processes image by 8x8 blocks?

房东的猫 提交于 2019-11-29 10:22:06
Why JPEG compression processes image by 8x8 blocks instead of applying Discrete Cosine Transform to the whole image? 8 X 8 was chosen after numerous experiments with other sizes. The conclusions of experiments are: 1. Any matrices of sizes greater than 8 X 8 are harder to do mathematical operations (like transforms etc..) or not supported by hardware or take longer time. 2. Any matrices of sizes less than 8 X 8 dont have enough information to continue along with the pipeline. It results in bad quality of the compressed image. Read, my blog, http://nboddula.blogspot.com/2013/05/image

Why JPEG compression processes image by 8x8 blocks?

对着背影说爱祢 提交于 2019-11-28 03:36:46
问题 Why JPEG compression processes image by 8x8 blocks instead of applying Discrete Cosine Transform to the whole image? 回答1: 8 X 8 was chosen after numerous experiments with other sizes. The conclusions of experiments are: 1. Any matrices of sizes greater than 8 X 8 are harder to do mathematical operations (like transforms etc..) or not supported by hardware or take longer time. 2. Any matrices of sizes less than 8 X 8 dont have enough information to continue along with the pipeline. It results

Overlapping sliding window over an image using blockproc or im2col?

主宰稳场 提交于 2019-11-27 14:52:48
I have to apply dct2 to small windows of my image, preferably by using an overlapping window. I have found out that there are two functions in Matlab that can make this possible blockproc and im2col . I am having trouble understanding either and would appreciate some clarification. blockproc can be used to implement my function on a sliding window using the BorderSize and TrimBorder arguments. B = blockproc(A,[64,64],fun,'BorderSize',[5,5], 'TrimBorder', 'false'); I realize that this creates a block of [64 + 2*5, 64 + 2*5] and applies the function @fun on each block. But since I cannot go into

LSB-DCT based Image steganography

狂风中的少年 提交于 2019-11-27 09:48:36
I'm working on LSB-DCT based Image steganography in which i have to apply LSB to DCT coefficients of the image for data embedding to JPEG.i'm new to all this.so searched and read some research papers they all lack a lot of information regarding the process after DCT.i also read many questions and answers on stackoverflow too and got more confused. here are the questions: 1-reasearch paper and in question on the web they all are using 8x8 block size from image for DCT..what i should do if the resolution of image does not completely divides into 8x8 blocks like 724 x 520. 520 / 8 = 65 but 724 /

Extracting DCT coefficients from encoded images and video

别来无恙 提交于 2019-11-26 17:38:38
Is there a way to easily extract the DCT coefficients (and quantization parameters) from encoded images and video? Any decoder software must be using them to decode block-DCT encoded images and video. So I'm pretty sure the decoder knows what they are. Is there a way to expose them to whomever is using the decoder? I'm implementing some video quality assessment algorithms that work directly in the DCT domain. Currently, the majority of my code uses OpenCV, so it would be great if anyone knows of a solution using that framework. I don't mind using other libraries (perhaps libjpeg, but that

Overlapping sliding window over an image using blockproc or im2col?

让人想犯罪 __ 提交于 2019-11-26 16:56:46
问题 I have to apply dct2 to small windows of my image, preferably by using an overlapping window. I have found out that there are two functions in Matlab that can make this possible blockproc and im2col . I am having trouble understanding either and would appreciate some clarification. blockproc can be used to implement my function on a sliding window using the BorderSize and TrimBorder arguments. B = blockproc(A,[64,64],fun,'BorderSize',[5,5], 'TrimBorder', 'false'); I realize that this creates

LSB-DCT based Image steganography

我是研究僧i 提交于 2019-11-26 14:53:04
问题 I'm working on LSB-DCT based Image steganography in which i have to apply LSB to DCT coefficients of the image for data embedding to JPEG.i'm new to all this.so searched and read some research papers they all lack a lot of information regarding the process after DCT.i also read many questions and answers on stackoverflow too and got more confused. here are the questions: 1-reasearch paper and in question on the web they all are using 8x8 block size from image for DCT..what i should do if the