Polynomial line fitting to dense data
Ältere Kommentare anzeigen

Is it possible to perform polynomial regression to data that looks like this?
Antworten (2)
Image Analyst
am 15 Mär. 2020
Bearbeitet: Image Analyst
am 15 Mär. 2020
0 Stimmen
Yes, just try it. Attached is a demo. Attach your data if you have trouble.
John D'Errico
am 15 Mär. 2020
Of course it is.
help polyfit
Do NOT fit anything of higher order than a straight line to that crap though. You will be kidding yourself if you do.
13 Kommentare
Kyuhee Jo
am 15 Mär. 2020
Kyuhee Jo
am 15 Mär. 2020
Kyuhee Jo
am 15 Mär. 2020
Kyuhee Jo
am 15 Mär. 2020
Kyuhee Jo
am 15 Mär. 2020
Image Analyst
am 15 Mär. 2020
Bearbeitet: Image Analyst
am 15 Mär. 2020
What are you trying to do? What do the two axes represent? Exactly what is "binomial matrix converted from a color histogram"? A color histogram (histogram of the 3 color channels) would be either 1-D histograms of each color channel of an RGB image one channel at a time, or a 3-D array of counts. You have neither, so exactly what is that?
Anyway is the "bright region" the yellow part of the image? So the shape of it would have to be a 2-D outline/perimeter/boundary of that yellow region, not a line through it, right?
John D'Errico
am 15 Mär. 2020
As i said, if you are fitting that data using a cubic polynomial, you are lying to yourself. There is no way you can rationally justify that high order of a fit.
Instead, I would probably recommend that you not even use a tool like polyfit, because this looks like a total least squares problem (often called errors in variables). Even polyfit will give you an estimate for the slope that is probably biased towards zero here.
Without your data, I cannot show you the difference between polyfit and a total least squares estimate on that data, however it would not be insignificant.
Image Analyst
am 15 Mär. 2020
Bearbeitet: Image Analyst
am 15 Mär. 2020
Again, what do the two axes represent? What two angles? If you plot a point (R, G, B) in a 3-D space, there are not (just) two angles. OK, let's say you were going to use xlabel() and ylabel() to label the axes of your histogram. What would you put?
xlabel('Fill in the label here');
ylabel('Fill in the label here');
If you read our profiles, you can see that John and I both have multi-decade experience in color science and color imaging so don't feel like you have to hold back on the details. We have very extensive knowledge in the subject.
Kyuhee Jo
am 15 Mär. 2020
Image Analyst
am 15 Mär. 2020
I still don't know what you want. An (R, G, B) point will have three angles from the axes. Anyway, from your description of what you want to do I don't think you want to do what you asked. I think you want to do either PCA or LDA on the image. I'm attaching demos for both.
Kyuhee Jo
am 15 Mär. 2020
Image Analyst
am 16 Mär. 2020
Did you try the LDA or PCA classification?
Kategorien
Mehr zu Linear Predictive Coding finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



