How can I locate typical points in a image?
1 次查看(过去 30 天)
显示 更早的评论
how can I locate those two red points that their tangent line is normal to the x_axis in the image?
0 个评论
采纳的回答
Image Analyst
2017-8-16
Use find to scan the image line by line getting the first and last place in the line that's not 255. Then with those right and left coordinates, call diff() to find out when the column doesn't change. Then label it and call regionprops() to find the longest such stretch. Let me know if you can't write code for that. A start is
for row = 1 : rows
thisLine = yourImage(row, :);
leftEdge(row) = find(thisLine < 255, 1, 'first');
rightEdge(row) = find(thisLine < 255, 1, 'last');
end
dLeft = diff(leftEdge);
dRight = diff(rightEdge);
and so on. Call bwareafilt() to extract the longest stretch, etc.
3 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!