Search code examples
matlabimage-processingperiodicity

Extract a periodic pattern from an image in Matlab


I have a sinuous signal in my image that you watch in below image. (in other words more than one signal with it's shadow)

My image in Matlab

I want to extract this sinuous signal (such a 1d signal) and find it's duty cycle, frequency and etc. As you can see there is a lot of noisy pattern also in my image and finding threshold or finding edges did not help me to solve the problem.

Also, I want to have a automatic algorithm that have generalize for my other images such this. Therefore,I think the finding of ROI couldn't be done, because in general sinuous signal begin from different row.


Solution

  • What you said, is quite a project, not a question. I'd rather to study more about the similar projects and ask about some details in here. Although I could give you some hints:

    1-Do a suitable thresholding on your image, like Otsu method (with a little change in the threshold value if it's needed).

    2-On the binary image do an erode and a dilate successively to get rid of the small objects.

    3-Do a horizontal dilation to get all parts of a curve stuck together. This gives you two firm curves.

    4-Find connected components of each curve and with their prositions, find the lowest pixels (local minimum of signals)

    5-Horizontal position of these local minimums, gives you the frequency.