filtering a texture image in frequency domain
Mostrar comentarios más antiguos

Given a texture image (Broadatz texture-d57), how can we filter this image within a frequency domain using the following filter,
Ln(theta) = 1 if [2 * pi* n]/N < theta <= [2 * pi* (n+1)]/N
0 otherwise
where theta is the orientation of the polar indices within the FFT domain, N=8 (no. of orientations), and n = 0, 1,... N-1.
please note that, Ln(theta) is not log(theta). it is just a notation with 'n' as a subscript.
Kindly help me with any ideas, explanation or codes.
Respuestas (1)
Udit06
el 17 de Nov. de 2023
0 votos
Hi Manali,
I understand that you want to filter an image in the frequency domain using the defined filter
where n and theta represent number of orientations and the orientation of the polar indices in the fourier domain. You can follow the following steps to achieve the same:
where n and theta represent number of orientations and the orientation of the polar indices in the fourier domain. You can follow the following steps to achieve the same:1) Convert the image from the spatial domain to the frequency domain and shift the zero-frequency component to center of spectrum using the "fft2" and "fftshift" functions respectively.
2) Calculate the orientation of each frequency component
3) Create a filter for each orientation ranging from 0 to 7 and apply the filter to the image by doing the element-wise multiplication using ".*" operation.
4) Shift the zero-frequency component back to the corner and perform the inverse fourier transform to obtain the image in the spatial domain using the "ifftshift", "ifft2" functions respectively.
You can refer to the following MathWorks documentations to understand more about the "fft2", "fftshift", "ifftshift" and "ifft2" functions respectively.
- https://www.mathworks.com/help/matlab/ref/fft2.html
- https://www.mathworks.com/help/matlab/ref/fftshift.html
- https://www.mathworks.com/help/matlab/ref/ifftshift.html
- https://www.mathworks.com/help/matlab/ref/ifft2.html
I hope this helps.
Categorías
Más información sobre Image Filtering en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!