cycles/pixel to cycels/degree
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi everyone,
I'm a new Matlab user looking for code to change my images from cycles/pixels to cycles/degree. Any suggestions?
Thanks! Rachel
댓글 수: 0
답변 (1개)
Dr. Seis
2012년 6월 19일
See this link:
About half way down:
F = fft2(image);
nx = size(F, 2);
ny = size(F, 1);
cxrange = [0:nx/2, -nx/2+1:-1]; % cycles across the image
cyrange = [0:ny/2, -ny/2+1:-1];
[cx, cy] = meshgrid(cxrange, cyrange);
fxrange = cxrange * 2*pi/nx; % radians per pixel
fyrange = cyrange * 2*pi/ny;
[fx, fy] = meshgrid(fxrange, fyrange);
Is this what you want instead?
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!