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!



