Polynomial line fitting to dense data
古いコメントを表示

Is it possible to perform polynomial regression to data that looks like this?
回答 (2 件)
Image Analyst
2020 年 3 月 15 日
編集済み: Image Analyst
2020 年 3 月 15 日
0 投票
Yes, just try it. Attached is a demo. Attach your data if you have trouble.
John D'Errico
2020 年 3 月 15 日
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 件のコメント
Kyuhee Jo
2020 年 3 月 15 日
Kyuhee Jo
2020 年 3 月 15 日
Kyuhee Jo
2020 年 3 月 15 日
Kyuhee Jo
2020 年 3 月 15 日
Kyuhee Jo
2020 年 3 月 15 日
Image Analyst
2020 年 3 月 15 日
編集済み: Image Analyst
2020 年 3 月 15 日
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
2020 年 3 月 15 日
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
2020 年 3 月 15 日
編集済み: Image Analyst
2020 年 3 月 15 日
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
2020 年 3 月 15 日
Image Analyst
2020 年 3 月 15 日
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
2020 年 3 月 15 日
Image Analyst
2020 年 3 月 16 日
Did you try the LDA or PCA classification?
カテゴリ
ヘルプ センター および File Exchange で Linear Predictive Coding についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



