SigProc - i(1)= N/2 1-find(lam>=200,1 i(2)= N/2...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Bioengineering Signal Processing Lab 8 function [fs, freq, pix_num]= imFreq(pixels,len,filename) fs =pixels/(len+len/2); %length/pixel freq=0;pix_num=0; %% 2 data = imread(filename,'jpg'); data = rgb2gray(data); N= length(data); DATA = fft2(data); DATAs = fftshift(DATA); m = -N/2:N/2-1; %center frequency at 0 DATAs =abs(DATAs); figure; freq = m.*fs./N; f=freq; max(f) imagesc(f,f,log10(DATAs)), axis xy title('Magnitude Plot for Cornea Electron Micrograph') xlabel('Frequency (pixels per nm)') ylabel('Frequency (pixels per nm)') %% 3 wavlen= [200 400 700]; % nm 200*1 lam = abs(1./f);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: i(1)= N/2+1-find(lam>=200,1); i(2)= N/2+1-find(lam>=400,1); i(3)= N/2+1-find(lam>=700,1); pix_num =i; % freq = 1./wavlen; % area = pi*freq.^2; % pix_num = pi*freq.^2; % pix_num = %% %%4 integCirc function en = integCirc(r1,r2) sum=0; for i=-N/2:N/2+1 for j=-N/2:N/2+1 if (i^2+j^2)^0.5>r1 && (i^2+j^2)^0.5>=r2 sum=sum+DATAs(i+N/2+1,j+N/2+1); end end end %volume total totalVol=0; for i=-N/2:N/2-1 % for bound frequencies for j=-N/2+i(2):N/2-i(1) totalVol=totalVol+DATAs(i+N/2+1,j+N/2+1); end end en = sum./totalVol; end end...
View Full Document

This note was uploaded on 04/01/2010 for the course BIOEN 303 taught by Professor Staff during the Spring '08 term at University of Washington.

Page1 / 2

SigProc - i(1)= N/2 1-find(lam>=200,1 i(2)= N/2...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online