レジストレーションした画像を重ねて表示

7 visualizaciones (últimos 30 días)
wataru yoshimi
wataru yoshimi el 28 de En. de 2017
Respondida: Tohru Kikawada el 29 de En. de 2017
コントロールポイント選択ツールを使ってレジストレーションをしています。画像1と画像2でサイズが異なります。その画像を位置合わせした後に画像を対応点の部分を重ねて表示する方法を教えてください。 試したコード
cpselect(I1,I2);
mytform = fitgeotrans(movingPoints, fixedPoints, 'affine');
I2_reg = imwarp(I2, mytform);
imshow(I1);
hold on
imshow(I2_reg);
alpha 0.4

Respuesta aceptada

Tohru Kikawada
Tohru Kikawada el 29 de En. de 2017
まず、 imwarp 'OutputView' オプションで出力サイズを入力サイズに合わせる必要があります。
Rortho = imref2d([size(I1,1) size(I1,2)]);
I2_reg = imwarp(I2, mytform'OutputView',Rortho);
次に imshowpair で画像を重ねがきできます。
figure, imshowpair(I2_reg,I1,'blend');
ドキュメントのサンプルコードが役に立つと思います。
困ったときに下記のように検索しても出てきます。
>> doc cpselect

Más respuestas (0)

Categorías

Más información sobre Code Generation en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by