How to compare images to find the difference among them at specific locations .

1 view (last 30 days)
Our goal is to find the shift of coastline in the given two images. For this task i have the satellite images of coastline I tried Using edge detection to find the coastline. So what should be the next processes that I can do .

Accepted Answer

Image Analyst
Image Analyst on 24 May 2018
First of all you have to make sure the images are the same resolution (number of pixels) over the area that is in common. Then next, register (align) the two images. Try imregister() or similar functions - see demos in the help. Crop after alignment, if necessary, to remove non-overlapping areas and make sure they're the same overall pixel dimensions (number of rows and columns). Then simply subtract them to find differences (non-zero values).
  2 Comments
satish yadav
satish yadav on 25 May 2018
Sir, As suggested by you i have aligned the two images and found out the difference between two(images are attached below) but how i will know which points i should choose to find the shift of shoreline.
Image Analyst
Image Analyst on 25 May 2018
Each point may move a different amount. After all you're talking about the earth and it's not reasonable to expect a rigid translation over large areas, especially with coastlines which change rapidly in wildly varying ways.
You might want to look into "optical flow" - that's what I'd do.

Sign in to comment.

More Answers (1)

Zhangxi Feng
Zhangxi Feng on 24 May 2018
Edited: Zhangxi Feng on 24 May 2018
I think you can complete the task if you convert the image into something you can ask MATLAB to numerically compare, such as when you convert the image into a matrix when you load it in with https://www.mathworks.com/help/matlab/ref/imread.html
You may also want to process the image a bit to remove as much of the non-coastline as possible to reduce your workload.
That being said, spotting differences for the coastline is a very difficult job itself since the accuracy depends on the resolution. This is known as the infinite coastline paradox. You may have to settle for less.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!