How do I image process a meandering thread?

5 Ansichten (letzte 30 Tage)
Harvey
Harvey am 4 Dez. 2013
Kommentiert: Image Analyst am 4 Dez. 2013
I am trying to write a code which will allow me to analyse a meandering viscous thread photograph. Giving me the Fourier power against Frequency in a graph or anything which tells me frequency between peaks. I have managed to convert the image into binary form and highlight the wave but not analyse it. Any help would be much appreciated as I am not that gifted with MATLAB I have included an image of a sample binary wave.
Thanks

Antworten (1)

Image Analyst
Image Analyst am 4 Dez. 2013
I'd just get a 1D vector by taking each line and doing
for row = 1 : size(binaryImage, 1)
thisRow = binaryImage(row, :);
col(row) = find(thisRow, 1, 'last');
end
Then, if you have the Signal Processing Toolbox, use findpeaks();
[peakValues, peakIndexes] = findpeaks(col);
I haven't tested that but , off the top of my head, it seems right. Once you know the peak locations, you can get the period between peaks, or get the average period (and hence frequency). No need to fool with any Fourier stuff.
  2 Kommentare
Harvey
Harvey am 4 Dez. 2013
Thanks for the advice but I don't have the signal processing toolbox. The waves are also not sinusoidal so wouldn't a Fourier transform be necessary?
Image Analyst
Image Analyst am 4 Dez. 2013
Feel free to experiment with the fft if you want. It just depends on what information you really need or want to extract. Finding the period is possible without doing a whole spectrum on the thing. But if you want the whole spectrum, then yes, do the FFT.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by