【正文】
計(jì)(論文) 25 if R2(i,j) R2max R2max = R2(i,j)。 end。 if R2(i,j)R2max* R2(i,j)=0。 end end。 end。 t2 = 0。 for i = 2:height21 for j = 2:width21 if R2(i,j) *R2max amp。amp。 R2(i,j) R2(i1,j1) amp。amp。 R2(i,j) R2(i1,j) amp。amp。 R2(i,j) R2(i1,j+1) amp。amp。 R2(i,j) R2(i,j1) amp。amp。 R2(i,j) R2(i,j+1) amp。amp。 R2(i,j) R2(i+1,j1) amp。amp。 R2(i,j) R2(i+1,j) amp。amp。 R2(i,j) R2(i+1,j+1) result2(i,j) = 1。 t2 = t2+1。 end。 end。 end。 [posc2, posr2] = find(result2 == 1)。 t2 subplot(122)。imshow(II2)。axis on。 title(39。corner detection right image39。)。 hold on。 plot(posr2,posc2,39。r.39。)。hold off X1=[]。Y1=[]。X2=[]。Y2=[]。 R1m=0。 d2(1:height2,1:width2,1:t1)=10^10。 for k=t14:t1 for r=1:3 i=posc1(k)。j=posr1(k)。 ii=posc2(r)。jj=posr2(r)。 d2(ii,jj,k)=abs(abs(I1(i1,j1)I1(i+1,j+1))+abs(I1(i+1,j1)I1(i1,j+1))abs(I2(ii1,jj1)I2(ii+1,jj+1))abs(I2(ii+1,jj1)I2(ii1,jj+1)))。 end end dd=10^10。 for k=t14:t1 東北石油大學(xué)本科生畢業(yè)設(shè)計(jì)(論文) 26 for r=1:3 ii=posc2(r)。jj=posr2(r)。 if d2(ii,jj,k)dd dd=d2(ii,jj,k)。 Y2(1,1)=ii。X2(1,1)=jj。 aa1=k。 end end end Y1(1,1)=posc1(aa1)。 X1(1,1)=posr1(aa1)。 dd=10^10。 for k=t14:t1 for r=1:3 ii=posc2(r)。jj=posr2(r)。 if d2(ii,jj,k)ddamp。amp。ii~=Y2(1,1)amp。amp。jj~=X2(1,1)amp。amp。k~=aa1 dd=d2(ii,jj,k)。 Y2(2,1)=ii。X2(2,1)=jj。 aa2=k。 end end end Y1(2,1)=posc1(aa2)。 X1(2,1)=posr1(aa2)。 figure subplot(121),imshow(II1),hold on plot(X1(1,1),Y1(1,1),39。*r39。)。 plot(X1(2,1),Y1(2,1),39。*r39。)。title(39。corner matching left image39。)。 subplot(122),imshow(II2),hold on plot(X2(1,1),Y2(1,1),39。*r39。)。 plot(X2(2,1),Y2(2,1),39。*r39。)。title(39。corner matching right image39。)。 % estimate parameter vector (t) Z = [ X239。 Y239。 。 Y239。 X239。 。 1 1 0 0 。 0 0 1 1 ]39。 xp = [ X1 。 Y1 ]。 t = Z \ xp。 % solve the linear system a = t(1)。 % = s cos(alpha) b = t(2)。 % = s sin(alpha) tx = t(3)。 ty = t(4)。 東北石油大學(xué)本科生畢業(yè)設(shè)計(jì)(論文) 27 % construct transformation matrix (T) T = [a b tx 。 b a ty 。 0 0 1]。 % warp ining corners to determine the size of the output image (in to out) cp = T*[ 1 1 W2 W2 。 1 H2 1 H2 。 1 1 1 1 ]。 Xpr = min( [ cp(1,:) 0 ] ) : max( [cp(1,:) W1] )。 % min x : max x Ypr = min( [ cp(2,:) 0 ] ) : max( [cp(2,:) H1] )。 % min y : max y [Xp,Yp] = ndgrid(Xpr,Ypr)。 [wp hp] = size(Xp)。 % = size(Yp) % do backwards transform (from out to in) X = T \ [ Xp(:) Yp(:) ones(wp*hp,1) ]39。 % warp % resample pixel values with bilinear interpolation II2=double(II2)。 clear Ip。 xI = reshape( X(1,:),wp,hp)39。 yI = reshape( X(2,:),wp,hp)39。 Ip(:,:,1) = interp2(II2(:,:,1), xI, yI, 39。*bilinear39。)。 % red Ip(:,:,2) = interp2(II2(:,:,2), xI, yI, 39。*bilinear39。)。 % green Ip(:,:,3) = interp2(II2(:,:,3), xI, yI, 39。*bilinear39。)。 % blue % offset and copy original image into the warped image offset = round( [ min( [ cp(1,:) 0 ] ) min( [ cp(2,:) 0 ] ) ] )。 Ip(1+offset(2):H1+offset(2),1+offset(1):W1+offset(1),:) = double(II1(1:H1,1:W1,:))。 % show the result figure。 image(Ip/255)。 axis image。 title(39。image registration39。)。 Visafree policy brings Chengdu biz, tourism boost. Making national headlines several times, Chengdu39。s 72hour visafree policy has attracted wide attention from both Chinese and foreign experts and businessmen since it took effect on Sept 1 last year. The program permits citizens from 51 countries and regions including the United States, Australia, Canada and Japan who have valid visas and flight tickets to a third country to spend three days in the city. The capital of Sichuan province is the first city in the western region of China to offer foreign tourists a threeday visa and the fourth nationwide to adopt the policy following Shanghai, Beijing and Guangzhou. Li Zhiyong, deputy dean of the tourism institute at Sichuan University, said the move contributes to a large increase in the number of overseas tourists and raises the city39。s level of internationalization. The policy will also bring direct economic revenue, Li said. Chengdu has many cultural legacies and is also a paradise for panda lovers with the world 39。s largest breeding and research center. Three days are long enough for foreign visitors to visit those iconic tourist spots, he noted. The city is home to the remains of the Jin sha civilization that dates back more than 3,000 years as well as the Qing cheng Mountains and the Du jiang yan irrigation system. Qing cheng has long been recognized as the birthplace of Taoism, China39。s ancient indigenous religion, while Du jiang yan is considered to be the oldest functioning watercontrol project in the world. Chengdu ranked third in tourist facilities, management and services 東北石油大學(xué)本科生畢業(yè)設(shè)計(jì)(論文) 28 among 60 Chinese cities in a customer satisfaction survey released last year. But, Li added that efforts are still needed to develop more touris m products, improve English services and provide accurate translation of traffic signs and scenic bil lboards. Zhao Yun, chairwoman of British Chamber of Commerce Southwest China, told China Daily that his colleagues found the policy very convenient. A British client once flew here and stayed for just one day to check her ordered goods, she said. Zhao wa s born in Shanxi province, but she has li