How do I image process a meandering thread?
2 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Image Analyst
on 4 Dec 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 Comments
Image Analyst
on 4 Dec 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.
See Also
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!