How to perform 2D curve fitting on an image
79 次查看(过去 30 天)
显示 更早的评论
Hello all,
I am very new to image processing and am struggling with post processing some data I have gathered. I have an image of some experimental data with frequency accross the x axis and wavenumber accrosss the y axis. Image attached for you to view..
It clearly can be seen that there are various curves (about 5 of them) that vary accross this 3D space, due to their large amplitude.
I would like to be able to curve fit data in terms of y = f(x) (wavenumber = f(frequency)) at the pixels of max amplitude. Does anyone have an idea of how to do this?
I thought I could loop through each column and find the peaks in order to determine the function I desire but I don't feel that this is too elegant.
Keen to hear if anyone has any other smart ideas
Regards,
Euan
1 个评论
Addy
2021-3-26
I am working with ultrasonic guided waves. Looks like you are trying to achieve mode filterning based on wavenumber plot.
回答(1 个)
Vinoth Venkatesan
2019-8-1
Assuming you want to process the plot as an image, this is a possible workflow:
- Binarize the grayscale image ("rgb2gray" and "imbinarize")
- Find the connected components in the binarized image ("bwconncomp")
- Use the 'PixelIdxList' that you get for these components to fit a curve (Interactively using "cftool" or programmatically using functions in the Curve Fitting Toolbox)
You might have to do some post-processing to convert the 'PixelIdxList' to [x,y] data (the "ind2sub" function might be of use here). Refer to these doc links for more info on these functions:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!