How do I image process a meandering thread?

5 visualizaciones (últimos 30 días)
Harvey
Harvey el 4 de Dic. de 2013
Comentada: Image Analyst el 4 de Dic. de 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

Respuestas (1)

Image Analyst
Image Analyst el 4 de Dic. de 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 comentarios
Harvey
Harvey el 4 de Dic. de 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 el 4 de Dic. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Spectral Measurements en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by