How can I find intersection between edge and lines?

Dear Experts, I'm trying to find intersection between the lines and edge. I generated the lines separately to can find the nearest edge to the center. My final goal is the coordination of the edges which intersect the lines. Any body has a solution for this? This is my code (Xcenter and Ycenter were determined): Iedge = edge(BWc,'canny'); theta=[0:0.1:2*pi]; x=fix(Xcenter+10*cos(theta)); y=fix(Ycenter+10*sin(theta)); line(x,y) but I don't know what I should do to find the intersections.

回答 (2 件)

KSSV
KSSV 2016 年 11 月 24 日

0 投票

4 件のコメント

Afsoon
Afsoon 2016 年 11 月 24 日
How I define the equation for edges? I mean, I should enter the L1 and L2. L1 is the set of lines and L2 is the image with edges.
KSSV
KSSV 2016 年 11 月 24 日
You don't have (x,y) data for edges?
Afsoon
Afsoon 2016 年 11 月 24 日
編集済み: Afsoon 2016 年 11 月 24 日
I can find the edge coordinates by "find" command. but now how to extract the points in lines? I have just the equation of lines (63 lines). Is there any way to find points on the lines? For example I have matrix 2*63 that rows are the start and end points of lines.
KSSV
KSSV 2016 年 11 月 24 日
I though you got the x,y data. If it is a image, then there would be other easy procedure. Wait for other's to answer.

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

質問済み:

2016 年 11 月 24 日

回答済み:

2016 年 11 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by