how can i make such an image by apllying DC processing?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
DOHYUN JANG
el 22 de Nov. de 2019
Comentada: DOHYUN JANG
el 25 de Nov. de 2019
input image is a 256X256 gray image, and I used dct2 to make a DCT image. then professor said I should set DC 32 X 32 =0 and IDCT back to get the output image,
and i dont know how to set 32X32 to 0....
please tell me the way to set 32x32 part of the dct input image to 0.
0 comentarios
Respuesta aceptada
Image Analyst
el 23 de Nov. de 2019
Regarding your new, edited question, just figure out the rows and columns to set to zero. If you use fft2(), the origin is at the 4 corners. You'd have to erase each corner one at a time. Or else use fftshift() to move the origin to the middle, then erase, and then use ifftshift() to shift the origin back to the corners before caling ifft2. Here's a start
[rows, columns] = size(grayImage);
ft = fft2(grayImage);
ft = fftshift(ft);
row1 = rows/2 - 15;
row2 = row2 + 31;
col1 = ....
col2 = ....
ft(row1:row2, col1:col2) = 0;
ft = ifftshift(ft);
grayImage = real(ifft2(ft));
imshow(grayImage, [])
Más respuestas (1)
Image Analyst
el 22 de Nov. de 2019
Yes, but not if you erase the central 32x32 chunk of it, representing the low spatial frequencies. It will have the effect of a high pass filter since you're setting all the low frequencies to zero. You will see enhanced edges, or even mostly all edges, in the output.
0 comentarios
Ver también
Categorías
Más información sobre Image Filtering and Enhancement en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!