Search code examples
c#algorithmmathgraphpoint-clouds

How to detect how many ups and downs are in a point cloud


From a real time signal adquisition, I'm getting 8400 points and I need to graph them. My problem is that there is a lot of noise in the data, Is there an alghorythm that reduce the noise? I need to know how many "plateaus" are there?

ups/downs

to something like: figures


Solution

  • You can probably isolate the plateaus by means of a sliding window in which you compute the range (maximum value minus minimum value). Observe the resulting signal and see what threshold will discriminate.

    Below is what you obtain by an horizontal morphological erosion, followed by counting the white pixels vertically. The slopes between the plateaus are very distinctive.

    enter image description here

    After segmenting the cloud, fitting the plateaus is easy.