Points in image disappear when using imtranslate()

조회 수: 1 (최근 30일)
Pierre Cilliers
Pierre Cilliers 2016년 1월 8일
댓글: Pierre Cilliers 2016년 1월 14일
Two black-and-white images are imported, which are matrices of sizes 256 x 256 and 301 x 601 respectively.
Full intensity is 140.0, and black of course is 0.0.
The goal is to be able to shift the smaller image around, over the larger image, and finding similar patterns.
When using:
img1 = imtranslate(img1,[100, -50],'FillValues',255);
imshowpair(img1, img2)
some of the points have disappeared from the smaller image (img1 in this case). This only happens when the image has been shifted. Any help or suggestions would be appreciated.

채택된 답변

Walter Roberson
Walter Roberson 2016년 1월 8일
Is your drawing window at least 601 pixels wide? If not then MATLAB needs to resize the image to fit the window, and when that is done, fine details could disappear.
  댓글 수: 1
Pierre Cilliers
Pierre Cilliers 2016년 1월 14일
I decreased one of my images from 301 x 601, to 300 x 400 (this size is still fine to work with). I again applied imtranslate() and all the points stayed intact. Thank you kindly sir.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by