How to detect only horizontal line exact parallel to one reference horizontal line in the same image?

조회 수: 20 (최근 30일)
matlab code for detecting only horizontal lines exact parallel to one reference horizontal line in the same image?
  댓글 수: 2
Preethi
Preethi 2016년 10월 14일
hi,
If you have the co-ordinates of the reference line then 1. you can calculate the distance between the points.
2. keep y co-ordinate constant increase x xo-ordinate(which will be the next pixel) and again calculate distance. this distance should be same the distance calculated at starting point. make sure that the value is non-zero before calculating.
3. keep continuing for all rows

댓글을 달려면 로그인하십시오.

답변 (2개)

Swarooph
Swarooph 2016년 10월 14일
You can use hough transform to detect lines. Once lines are detected, you can use properties such as theta on the houghlines structure to filter your lines compared to a reference line.
Take a look at this example to see how to use hough transform to detect lines in MATLAB.

Deshbhushan Patil
Deshbhushan Patil 2016년 11월 22일
How to determine initial cluster centers for color image segmentation using k-means clustering. What is the matlab code for adaptive k-means clustering to choose initial cluster centers?

카테고리

Help CenterFile Exchange에서 Point Cloud Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by