How to perform 2D curve fitting on an image

116 Ansichten (letzte 30 Tage)
EUAN FOSTER
EUAN FOSTER am 18 Jul. 2019
Kommentiert: Addy am 26 Mär. 2021
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..
untitled.png
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 Kommentar
Addy
Addy am 26 Mär. 2021
I am working with ultrasonic guided waves. Looks like you are trying to achieve mode filterning based on wavenumber plot.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Vinoth Venkatesan
Vinoth Venkatesan am 1 Aug. 2019
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:

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by