show fourier transformed image in different scale
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
hey, i have the following code which i apply to my image:
A=imread('C:\Users\Viviko\Desktop\173149_11', 'tif');
A2=fft2(A);
iptsetpref('ImshowAxesVisible','on')
imshow(log(abs(fftshift(A2))+1),[])
i want to change the scale in axes and instead of going from 0 to approximately 2700, i'd like 0 to be shown in the middle of the axes, and so i could have both negative and positive coordinates. can please somebody give me a hint?
3 comentarios
Respuestas (1)
Image Analyst
el 5 de Mayo de 2014
Try this:
imshow(img, 'xData', [-2700,2700], 'ydata', [-2700,2700]);
axis on;
3 comentarios
Image Analyst
el 6 de Mayo de 2014
Right. It gives the row, rowOfMax, and column, columnOfMax. You need to come up with a spatial calibration to convert row 1 to -2700 and the last row to +2700.
[rows, columns, numberOfColorChannels] = size(img);
[rowOfMax, columnOfMax] = find(img == max(img(:)));
xMax = (2700*2) * ((columnOfMax-1)./rows) - 2700;
yMax = (2700*2) * ((rowOfMax-1)./rows) - 2700;
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!