0

I'm a newbie here please correct or guide me if i'm wrong. I just want to find a solution for my problem

Here's the picture. Curve to be split

I have the (x,y) coordinates of the curve. I want to split the curve where the red line passes through in the image.

Would appreciate any guidance

Don't mean to be rude but, to the person who down voted me. Let me know where I can post this question if you have any idea of what I have here, or at least have courtesy to ask what my question exactly is if you couldn't understand the question I posted. Down voting certainly is not helpful

Santhosh
  • 131
  • 3
  • Welcome to stackexchange. You are more likely to get answers rather than downvotes if you edit your question to provide more information, and show us what you have tried and where you are stuck. Perhaps show us the table of values. Describe what it means to "split the curve". Perhaps tell us why you want to know. Without that kind of information the question is likely to be closed. – Ethan Bolker Oct 31 '17 at 12:12
  • @EthanBolker Thank You. I'm doing image processing, which I know clearly is not related to this blog. I have the (x,y) coordinates for the white colour curve you can see on the image link. I would like to split the curve where the red line is passing through because they are edges of two entirely different objects. I though Mathematics would help me in this than the image processing group. – Santhosh Oct 31 '17 at 12:18

2 Answers2

1

If you loop along the curve looking at adjacent pairs of points and compute the slope of the line joining each pair there will be a sudden jump when the curve changes direction sharply.

If the points are close together you might have to worry about numerical instability. Maybe pick points on the curve further apart. You might also have to worry about (nearly) vertical tangents. I think that's a solvable problem too.

Perhaps calculate the angle between successive secants rather than successive slopes. That means no division, so no division by (close to) $0$.

You could take pairs of points a little farther apart in a first pass. When you identify the region with the cusp calculate more accurately there to find the actual point.

Edit in response to comment.

Using the bearing is possible - but calculating it when the direction is close to vertical might be a problem. You are probably better off watching directly for a change in angle between successive secants. To do that use the dot product.

At this point it probably makes sense to code up some possible algorithms and try them out on a variety of examples. That will give you a sense of what might work.

Ethan Bolker
  • 103,433
  • I can't skip any points on the curve. If I pick points further apart I might loss the actual point where I get a huge change in the direction of the curve. – Santhosh Oct 31 '17 at 12:54
  • See my edits. All I've provided is a strategy. You'll have to experiment with implementations to find one that works. – Ethan Bolker Oct 31 '17 at 13:56
  • Thank You @Ethan Bolker. How about select discrete points on the curve. Then find the bearing angle of the next point with respect to the present point. A sudden decrease or increase in the bearing might give me point where I need to split the curve. What do you think? – Santhosh Nov 01 '17 at 05:43
  • See my edit. I've retagged your question. If you want to do serious image processing I think you will have to know when linear algebra can help you. – Ethan Bolker Nov 01 '17 at 12:51
0

This figure seems to be part of two egg shaped curves.

See How to place random points on an egg? for further reference.

Work with a coordinate system such that you can fix the points you have.

The red line seems to be a symmetry axis.

Where does this curve come from?

  • These do seem symmetric, but I guess I got lucky that I got such an edge while selecting a random edge that was detected after filtering of the image. There's no symmetry here, the red line is not a symmetry line. Got this from a random picture of a heap of potatoes I found online. – Santhosh Nov 01 '17 at 05:54