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

7 visualizzazioni (ultimi 30 giorni)
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 .

Risposta accettata

Image Analyst
Image Analyst il 24 Mag 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 Commenti
satish yadav
satish yadav il 25 Mag 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 il 25 Mag 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.

Accedi per commentare.

Più risposte (1)

Zhangxi Feng
Zhangxi Feng il 24 Mag 2018
Modificato: Zhangxi Feng il 24 Mag 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.

Community Treasure Hunt

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

Start Hunting!

Translated by