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

조회 수: 10 (최근 30일)
Panos Tzovaras
Panos Tzovaras 2020년 4월 3일
댓글: Panos Tzovaras 2020년 4월 3일
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