how to calculate normal to all points of a contour line?
2 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Contour Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!