Fitting curve and split it equally
Show older comments
Hi,
I have the attached image and I want to fit a curve between each two marked point and split each boundary eqaully. I know that one of the method is using angles and segment each boundary based on angles but I have to use curve fitting for this purpose. For instance, for this image, I have to split the two top and bottom boundaries to 10 and left and right to 16. I appreciate it if you could help me with that.
3 Comments
Image Analyst
on 14 May 2020
I have no idea what you want. What does "split the two top and bottom boundaries to 10" mean? Ten what? Ten segments of boundary? You already have the boundary - a list of (x,y) coordinates I presume. So how did you get, or how do you want to get, the red spots?
Bahareh Salafian Esfahani
on 14 May 2020
Image Analyst
on 14 May 2020
Edited: Image Analyst
on 14 May 2020
No, it's not. So do you have a list of all (x,y) or (row, column) coordinates for the red spots already? Are you certain they land on the white line? If so, why can't you just find where (what indexes) in the list of white coordinates do the red ones live, and use interp1() to find 10 points in between to split them? It will get a little tricky for the list at the top and the bottom because you have to "wrap around" but you can handle that by doubling the coordinate list and using mod() or rem().
You might want to check out John D'Errico's interparc: interparc in his File Exchange (a virtual treasure chest of gems)
Answers (0)
Categories
Find more on Gaussian Mixture Models in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!