フィルターのクリア

How to follow only the black line of an image

2 ビュー (過去 30 日間)
Mech Stud
Mech Stud 2018 年 3 月 21 日
コメント済み: Mech Stud 2018 年 3 月 22 日
I want to follow the black line on this image and get the x,y coordinates of it. However if the black line is not completing an edge of an image (as an extra line extruded as shown) I want to neglect those pixels. I want it to work similar to the concept of line following robot where it checks the next two pixel around it in each direction and maybe decide which pixel's [x,y] values it needs to consider

採用された回答

KSSV
KSSV 2018 年 3 月 22 日
I = imread('1.png') ;
I1 = rgb2gray(I) ;
[y,x] = find(I1==0) ;
(x,y) are the locations of the black line. Now you have the points in hand. You can do what you want.
  1 件のコメント
Mech Stud
Mech Stud 2018 年 3 月 22 日
Thanks much. It was really really helpful.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by