| 5 | 1/1 | 返回列表 |
| 查看: 662 | 回復(fù): 3 | |||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | |||
472381565新蟲 (小有名氣)
|
[求助]
給這段MATLAB程序中沒加注解的地方加上注解。
|
||
|
I1 = double(imread('X6.jpg')); [h1 w1 d1] = size(I1); I2 = double(imread('X7.jpg')); [h2 w2 d2] = size(I2); %顯示圖像并在顯示的圖像上取坐標(biāo) figure; subplot(1,2,1); image(I1/255); axis image; hold on; title('first input image'); [X1 Y1] = ginput2(2); %在第一幅圖像上確定2個(gè)點(diǎn) subplot(1,2,2); image(I2/255); axis image; hold on; title('second input image'); [X2 Y2] = ginput2(2); %在第二幅圖像上取2個(gè)點(diǎn) Z = [ X2' Y2' ; Y2' -X2' ; 1 1 0 0 ; 0 0 1 1 ]'; xp = [ X1 ; Y1 ]; t = Z \ xp; a = t(1); b = t(2); tx = t(3); ty = t(4); T = [a b tx ; -b a ty ; 0 0 1]; cp = T*[ 1 1 w2 w2 ; 1 h2 1 h2 ; 1 1 1 1 ]; Xpr = min( [ cp(1, 0 ] ) : max( [cp(1, w1] );Ypr = min( [ cp(2, 0 ] ) : max( [cp(2, h1] ); [Xp,Yp] = ndgrid(Xpr,Ypr); [wp hp] = size(Xp); X = T \ [ Xp( Yp( ones(wp*hp,1) ]'; clear Ip; xI = reshape( X(1, ,wp,hp)';yI = reshape( X(2, ,wp,hp)';Ip(:,:,1) = interp2(I2(:,:,1), xI, yI, '*bilinear'); Ip(:,:,2) = interp2(I2(:,:,2), xI, yI, '*bilinear'); Ip(:,:,3) = interp2(I2(:,:,3), xI, yI, '*bilinear'); offset = -round( [ min( [ cp(1, 0 ] ) min( [ cp(2, 0 ] ) ] );Ip(1+offset(2):h1+offset(2),1+offset(1):w1+offset(1), = double(I1(1:h1,1:w1, );figure; image(Ip/255); axis image; title('mosaic image'); |
專家顧問 (職業(yè)作家)
![]() |
專家經(jīng)驗(yàn): +3 |
新蟲 (小有名氣)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 320分,材料與化工專業(yè),求調(diào)劑 +10 | 一定上岸aaa 2026-03-27 | 14/700 |
|
|---|---|---|---|---|
|
[考研] 化學(xué)工程085602 305分求調(diào)劑 +26 | RichLi_ 2026-03-25 | 27/1350 |
|
|
[論文投稿]
chinese chemical letters英文版投稿求助
200+3
|
Yishengeryi 2026-03-30 | 3/150 |
|
|
[考研] 085600材料與化工329分求調(diào)劑 +5 | 這是有太陽哇 2026-03-25 | 5/250 |
|
|
[考研] 看看我!301求調(diào)劑 081700 +3 | 一個(gè)小明同學(xué) 2026-03-24 | 3/150 |
|
|
[考研] 0710生物學(xué)求調(diào)劑! +3 | 敘述文 2026-03-31 | 3/150 |
|
|
[考研] 一志愿鄭大材料工程290求調(diào)劑 +12 | Youth_ 2026-03-30 | 12/600 |
|
|
[考研] 本科211總分289,08工學(xué)真心求調(diào)劑 +3 | utopiaE 2026-03-30 | 3/150 |
|
|
[考研] 生物考研337分求調(diào)劑 +3 | cgxin 2026-03-30 | 4/200 |
|
|
[考研] 抱歉 +4 | 田洪有 2026-03-30 | 4/200 |
|
|
[考研] 材料工程專碩求調(diào)劑 +8 | hyl3153942 2026-03-29 | 8/400 |
|
|
[考研] 289求調(diào)劑 +16 | 新時(shí)代材料 2026-03-27 | 16/800 |
|
|
[考研] 322求調(diào)劑 +10 | 宋明欣 2026-03-27 | 10/500 |
|
|
[考研] 303求調(diào)劑 +7 | DLkz1314. 2026-03-30 | 7/350 |
|
|
[基金申請(qǐng)] 面上5B能上會(huì)嗎? +7 | redcom 2026-03-29 | 7/350 |
|
|
[考研] 311求調(diào)劑 +6 | 冬十三 2026-03-24 | 6/300 |
|
|
[考研] 0856材料化工調(diào)劑 總分330 +14 | zhubinhao 2026-03-27 | 14/700 |
|
|
[考研]
|
18419759900 2026-03-25 | 8/400 |
|
|
[論文投稿] Journal of Mechanical Science and Technology +3 | Russ_ss 2026-03-25 | 5/250 |
|
|
[考研] 080500求調(diào)劑 +3 | zzzzfan 2026-03-24 | 3/150 |
|