findf0_1.m
资源名称:ibrmasac.rar [点击查看]
上传用户:jiangyu148
上传日期:2014-10-19
资源大小:2124k
文件大小:1k
源码类别:
图形图象
开发平台:
Matlab
- %%%%%%%%%%%%%%%%%% 第一步:求初始偏移量,估算焦距f0 %%%%%%%%%%%%%%%%%%%
- im1=imread('1.jpg');
- im2=imread('2.jpg');
- L=rgb2gray(im1);
- R=rgb2gray(im2);
- [r1,c1]=phasec(L,R);
- %%
- im3=imread('3.jpg');
- L=R;
- R=rgb2gray(im3);
- [r2,c2]=phasec(L,R);
- %%
- im4=imread('4.jpg');
- L=R;
- R =rgb2gray(im4);
- [r3,c3]=phasec(L,R);
- %%
- im5=imread('5.jpg');
- L=R;
- R=rgb2gray(im5);
- [r4,c4]=phasec(L,R);
- %%
- im6=imread('6.jpg');
- L=R;
- R=rgb2gray(im6);
- [r5,c5]=phasec(L,R);
- %%
- im7=imread('7.jpg');
- L=R;
- R=rgb2gray(im7);
- [r6,c6] =phasec(L,R);
- %%
- im8 =imread('8.jpg');
- L=R;
- R=rgb2gray(im8);
- [r7,c7] =phasec(L,R);
- %%
- im9=imread('9.jpg');
- L=R;
- R=rgb2gray(im9);
- [r8,c8] =phasec(L,R);
- %%
- im10=imread('10.jpg');
- L=R;
- R =rgb2gray(im10);
- [r9,c9]=phasec(L,R);
- %%
- im11=imread('11.jpg');
- L=R;
- R=rgb2gray(im11);
- [r10,c10]=phasec(L,R);
- %%
- im12=imread('12.jpg');
- L=R;
- R=rgb2gray(im12);
- [r11,c11]=phasec(L,R);
- %%
- L=R;
- R=rgb2gray(im1);
- [r12,c12]=phasec(L,R);
- %%
- f0=(c1+c2+c3+c4+c5+c6+c7+c8+c9+c10+c11+c12)/(2*pi);
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%