How to get parallel lines in a binary image?
显示 更早的评论
I want to find parallel lines in a binary image and calculate the distance between them....
Can anyone help me with the code?
7 个评论
KSSV
2020-10-3
Attach pictorial example.
Rakshith Nayak
2020-10-3
Matt J
2020-10-3
I see no lines in this example image, just some weird shaped curve.
Rakshith Nayak
2020-10-4
Image Analyst
2020-10-4
Assuming you have the coordinates of the red and yellow x's, I'd use sqrt(), though some might use norm().
KALYAN ACHARJYA
2020-10-4
There are no lines in the attched binary image??
Rakshith Nayak
2020-10-4
回答(1 个)
Priysha LNU
2020-10-6
You may simply calculate the distance between two lists of points as :
Let data1 and data2 be two set of points.
data = data1 - data2;
dist = sqrt(data(:,1).^2+data(:,2).^2);
DISCLAIMER: These are my own views and in no way depict those of MathWorks.
类别
在 帮助中心 和 File Exchange 中查找有关 Image Arithmetic 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

