Hey guys I need help ,it's about image processing together with michelson interferometer
4 views (last 30 days)
Show older comments
well lets just make a long story short.i need to find the beta value out of an image like the one I uploaded ,the red color in the image follows the formula: 0.5*(1-cos((2*pi/lamdaR)*beta*(nR-nG)+x.*tan(deg2rad(1))));when:lamdaR=0.65;nG=1.5184;nR=1.5146;and x it's a known vector in length of the mean averages of the red color from the uploaded image.
well it isn't that short after all...thanks..!
10 Comments
Star Strider
on 26 Aug 2014
It’s just easier to work from the original information rather than derived code, in the event there is an error in the code.
While I’m here though, why tan(deg2rad(1)) rather than simply tand(1)? If you’re calculating in degrees rather than radians, use the trigonometric degree functions (they all have a ‘d’ appended to their names, as tand here). They’re more accurate (and precise) than converting to radians and using the trigonometric radian functions.
Answers (1)
Image Analyst
on 26 Aug 2014
I assume you will take just one of those color channels and take a profile and then try to fit it to that complicated equation. Maybe the Curve Fitting Toolbox can do it. I'd maybe do it just numerically. Get the profile and loop over a bunch of beta's until the residual (sum of absolute values of differences between fit and actual) is minimum. Kind of a unclever, dumb, brute force numerical approach, but it should work. Maybe someone else will have a more clever curve fitting method that is more elegant and direct.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!