determine a point curve

4 visualizaciones (últimos 30 días)
joo
joo el 26 de Sept. de 2012
i have a vector with the x points, and another with the y points.
could anyone help me with the matlab code for the following objective: determine the ‘’first’’ intersection point in order to obtain only (the data points of ) the closed curve(inside red).
this intersection point is not necessarily a x,y point from my data, but belongs to the its line. Also, the intersections can be located at the left of the closed curve (as in this figure) or at the right.
So my objective is just to know the ‘’first’’ intersection point.
Thank you very very much.

Respuesta aceptada

Image Analyst
Image Analyst el 26 de Sept. de 2012
Are you starting with the RGB image of some cartoon someone drew by hand? Or do you have actual numerical data for the lines/curves? I also don't know what this means: " intersection point is not necessarily a x,y point from my data, but belongs to the its line" What is an "its" line? How do you define "first" intersection point when there is substantial overlap of two curves?
  8 comentarios
Image Analyst
Image Analyst el 27 de Sept. de 2012
I don't see any difference between a closed curve and a polygon. Your "closed curve" is made up of an ordered set of (x,y) coordinates isn't it? So why can't those be considered as endpoints of a straight line segment? So you could do the brute force case of seeing if any adjacent pairs of vertices (i.e. a single line segment) crosses any other line segment in the list of coordinates. You'll easily find web sites that explain exactly how to do that like: http://bloggingmath.wordpress.com/2009/05/29/line-segment-intersection/, http://ptspts.blogspot.com/2010/06/how-to-determine-if-two-line-segments.html, http://mathforum.org/kb/thread.jspa?forumID=226&threadID=1312304&messageID=4142617, etc.
joo
joo el 28 de Sept. de 2012
ok. i made it! thank you very much!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Distribution Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by