Polynomial curve fitting and equation of a curve from an image?

13 次查看(过去 30 天)
Hi there,
I was wondering how can I calculate the equation of the curve from an image. Basically, what I am trying to do is to classify some archaeological data (boat representation) based on their morphology. So, I would like to segment each representation to each basic components (i.e. various lines representing the bottom, posts, etc.), quantify and compare them and then classify them (possibly thourgh Multiple Componont Analysis). My main goal is to reduce bias in shape definition as much as possible. So, I was thinking ‘fitting’ a suitable high order polynomial could do the work. Any pointers?
I am attaching a few examples of the data.
Thanks
Panos

回答(2 个)

Luis Isaac
Luis Isaac 2020-4-3
Hi
I not an expert, but probably the better solution is not to use hight order of ordinary polynomials
As the shapes a closed, we can define 0 outside and 1 inside and use a shape repesentation like the moments of zernike polynomials of a shape.
Depending of the implementation shape could be the (x,y) values of the contour or the matix of 0 and 1 (0 outside shape, 1 inside shape)
See for example DOI: 10.1515/ipc-2016-0022

Image Analyst
Image Analyst 2020-4-3
I measure all kinds of shapes all the time. It really depends on what you plan on doing with the information after you have it.
I mean, the image itself is the ultimate description of the shape. Or you could give a list of (x,y) coordinates of the black lines. Or you could try to fit the black lines to some smooth shapes and give the coefficients of that shape and the residuals. What you measure really depends on what you want to do next. Let's say you fit the top of the shape cross section to a parabola. OK, but then what? Will that be useful to you? If so, fine. If not, what would be better? Saying your "main goal is to reduce bias in shape definition" really doesn't answer the question. I don't even know what you would consider bias. When you say you want to "quantify and compare them and then classify them", quantify how? By polynomial coefficients, for example you want to know if there are two classes of boat keels: U-shaped and V-shaped?
Have you tried to classify them into known classes using Deep Learning and transfer learning with AlexNet or some other network? This could be the way to go if you can label images with ground truth about what class each image belongs to, and you have dozens or thousands of images to train the network with.
  3 个评论
Image Analyst
Image Analyst 2020-4-3
For classification, I'd look for a transfer learning using AlexNet in their Deep Learning examples.
For deconstruction, how about this:
binaryImage = grayImage < 128;
[y, x] = find(binaryImage);
There. That will give you the (x,y) locations of every black pixel in your drawings. Is that good enough?
Panos Tzovaras
Panos Tzovaras 2020-4-3
More than enough. Thanks for your time and interest, I really appreciate it.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by