Gradient calculation from a starting point in image
Afficher commentaires plus anciens
hello everyone,
I'm trying to calculate a gradient from a matrix of double starting from a selected point. I have the coordinates (in terms of x and y) of this point and the values in my matrix represent the measures of the heights of a volcano (a sort of DEM). Form a starting point which corresponds to a specific height, I would find the pattern with the highest gradient in order to identify a sort of path that lava flows may travel.
My mental approach (I have problems also in developing this script) is to start a loop in which I should find, from my starting pixel P1, the pixel with lower height (Lpix) between the 8 around it, select the lowest-height pixel (Lpix) and then from Lpix start a new 'research' of the pixel with lowest height in the area of 8 pixel around it and find the Lpix2 and so on in order to define the already mentioned 'probable lava flow pattern' I need.
Are there any faster solutions or specific functions that can make this procedure easier?
Thank you!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Image Segmentation and Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!