i was given a an image with black lines on white background . what i need to do is, to find the coordinates of the edges at the intersection of black lines..can u plz suggest a way to start with....plzz

 採用された回答

Image Analyst
Image Analyst 2013 年 9 月 22 日
Threshold. If you want to find centroids of the crossing points, skeletonize with bwmorph(), then find crossing points with bwmorph().
If you have thick lines and want to find the "edges" of the intersection you need to define that. Do you mean just the 4 coordinates at the corners? Or do you mean the quadrilateral of all 4 straight edges where the two thick lines cross? How thick are these lines? Why do you want the edges instead of the center coordinate of where they cross?
You forgot to attach your image. Please do so.

2 件のコメント

srinivas sri
srinivas sri 2013 年 9 月 22 日
what i mean is the coordinates of points at which horizontal and vertical lines meet ...
The attached file will get you 95% of the way there. I didn't do the last 5% because I think this may be a homework assignment and you need to do something on it.

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

その他の回答 (1 件)

Matt J
Matt J 2013 年 9 月 22 日
編集済み: Matt J 2013 年 9 月 22 日
As a start, the following will separate the image into a binary image H of horizontal lines and V of vertical lines.
A=double(rgb2gray(imread('sid.png'))<10);
e=ones(1,7);
H=conv2(A,e,'same')>3;
V=conv2(A,e.','same')>3;

3 件のコメント

srinivas sri
srinivas sri 2013 年 9 月 22 日
that is fine thank u ..but i need function to find the coordinate values...
Matt J
Matt J 2013 年 9 月 22 日
編集済み: Matt J 2013 年 9 月 22 日
Yes. I gave you the first step. Neither I, nor Image Analyst, nor anyone else here, I believe, will give you the whole thing. But... consider the FIND command.
srinivas sri
srinivas sri 2013 年 9 月 22 日
thank u very much..

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

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by