Return the Coordinates of the differences

조회 수: 2 (최근 30일)
Mark Petty
Mark Petty 2019년 6월 30일
댓글: Mark Petty 2019년 6월 30일
I have two images, where the only difference is a relocated book, from the table to the floor. Using the 'diff' method of the imfuse and imshowpair I have been able to highlight the 'original' and 'relocated' position of the books in one image; one image registered on the other. Is there a way to automatically place a bounding box around both books in the fused image so that I could obtain the coordinates?
I have had some success in converting the fused image to binary, using bwareafilt to filter out the highlighted 'difference' regions and then using regionprops 'boundingbox' method. However, it is cumbersome and I feel that there is a better solution.

답변 (2개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 6월 30일
편집: KALYAN ACHARJYA 2019년 6월 30일
Return the Coordinates of the differences?
Suppose you have two images (Considering both images are capture in identical illumination enviroment)
a> Original image
b>book reallocation image
Converting two images in gray
diff_im=a-b;
Although both images are capture in identical illumination, but still it not exactly same, therefore, force the some pixel lower data(threshold), which may not equal to zero to Zero.
diff_im=modified a-b %do operation
idx=find(diff_im(:,:) !=0) %fives indexing wheich are not same in bot images
Is this sense to your question?
  댓글 수: 1
Mark Petty
Mark Petty 2019년 6월 30일
That is essentially what I have done, take the imfuse image from a Grayscale to a binary image so that the two instances of the book stand out. However, is there another more relable way to identify the differences, surround them with bounding boxes and get the x,y coords.

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


Guillaume
Guillaume 2019년 6월 30일
Sounds like you're doing image registration. Have you considered looking at the functions that matlab already provides? There's also some registration functions in the computer vision toolbox.
  댓글 수: 1
Mark Petty
Mark Petty 2019년 6월 30일
Yes I am performing image registration, the two images that I am using have been registed using ASIFT feature matching, then estimateGeometric Transform, then imwarp.

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

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by