How do I image process a meandering thread?

5 ビュー (過去 30 日間)
Harvey
Harvey 2013 年 12 月 4 日
コメント済み: Image Analyst 2013 年 12 月 4 日
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

回答 (1 件)

Image Analyst
Image Analyst 2013 年 12 月 4 日
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 件のコメント
Harvey
Harvey 2013 年 12 月 4 日
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 2013 年 12 月 4 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by