Gradient calculation from a starting point in image
이전 댓글 표시
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!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Medical Physics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!