Find the changed area between two images

조회 수: 6 (최근 30일)
Tala Hed
Tala Hed 2019년 1월 31일
댓글: Tala Hed 2019년 1월 31일
I have 3 photos taken from a sample. The first one is prior to a test and the second and third ones are taken after the test. I am intersted in finding the changed area in the painting after each test. IN other words between image number1and 2 and image number 1and3.
Image number 2 has slighty changed but image number 3 has considerably changed.
here are the photos.
Thank you
1.jpg
2.jpg
3.jpg

답변 (1개)

Balakrishnan Rajan
Balakrishnan Rajan 2019년 1월 31일
Depends on your definition of area of the painting. Is every point with colour anything but absolute white considered as a part of the painting? Assuming that anything brighter than the mid level of gray to be an unpainted region, the following code must be able to get the area of a painting:
Im = imread('File location');
ImBW = Im(:,:,2);
imshow(ImBW);
threshold = 127;
area = 0;
for i = 1 : length(ImBW(:,1))
for j = 1 : length(ImBW(1,:))
if(ImBW(i,j)>threshold)
area = area+1;
end
end
end
Use this to compute the areas of the different images and take difference accordingly.
Hope it helps.
  댓글 수: 1
Tala Hed
Tala Hed 2019년 1월 31일
I appreciate your help, but its not what I am looking for! maybe I was not clear :)
There should be comparision between the original image and the other two to detect the change between them!
Thanks

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

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by