How can I extact the period from a binary image in which I can visually see a sinusoid?
1 次查看(过去 30 天)
显示 更早的评论
After calculating the spectogram of my data [S, F, T, P] = spectrogram(sr,256,250,F,fs) and I consider I = mat2gray(abs(S)); Then,I operate a thresholding on I and I obtain I_bin. If I plot I_bin: imagesc(T,F,I_bin) colormap(gray) axis xy xlabel ('Time [s]') ylabel ('Frequency [Hz]')
My problem is: I would like to find the way to extract the time distance between 2 peaks(ACTUALLY THE FIRST AND THIRD) but I don't know how to do it from a binary matrix like I_bin
Since now I found the frequency value : [row,col] = find(I_bin); fd_max = abs(F(min(row),1)); And I would like to find the two position of the vector T such that F=fd_max
Hope you'll help me!
Many thanks!!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!