Matlabでの画像翻訳の実装



Implementation Image Translation Matlab



Matlabでは画像変換に直接使用される関数はありません。コードはグレー画像の形態に基づいています。

% image shift A=imread('example.jpg') %translate(SE, [y x]) performs displacements in the y and x directions on the structural element SE. Positive numbers correspond to right and down shifts. se=translate(strel(1),[100 80]) B=imdilate(A,se)% morphological expansion figure subplot(1,2,1),subimage(A) Title('original image') subplot(1,2,2),subimage(B) Title('image pan')

結果は以下のとおりです。
画像