Borrar filtros
Borrar filtros

how to calculate normal to all points of a contour line?

1 visualización (últimos 30 días)
Gefen Livne
Gefen Livne el 4 de Dic. de 2020
Hi all,
I did several calculation to a figure and got a "heat map" (an examlple is represented below). Now Im trying to calculate how this "heat map" change as function of the distance from its bounderies, so called as function of r.
the right handside plot is made by: pcolor(Xmat,Ymat,T1); all of those are double matrices.
So far I have managed to find the contour to T1 by a code I saw here:
binaryImage = T1 > 0; % Threshold/binarize the image.
binaryImage = imfill(T1, 'holes'); % Fill holes.
boundaries = bwboundaries(binaryImage); % Get list of (x,y) coordinates of outer perimeter.
and smoode it to by applyng 30 times smooth function to get a nice curve:
I will be grateful if someone could help me to calculate the normal vectors to all the point of the contour.
Alternatively, if someone has a better solution to my problem, it will be great.
wourth mention that not all the figures are of circular shapes, some are only half or quater circles.
Thank you very much.

Respuestas (0)

Categorías

Más información sobre Contour Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by