Curve analysis from .CSV

asked 2019-04-18 09:23:51 -0500

scaramacai gravatar image

updated 2019-04-18 09:27:41 -0500

Sometimes we have stored points (x,y) representing a curve (ECG, tensile diagrams, a waveform and so on) where we are able to recognize patterns /zones as a straight line (LINEAR ZONE), a sinusoidal part (WAVE ZONE) a peak (PEAK ZONE), zigzag movements... Well, I have some .CSV files with recorded acceleration values and I'm going to detect the different patterns (constant movement, accel, vibrations, etc). The first problem is to create a matrix for using OpenCV functions. My .CSV store points as (time,a_data,b_data,c_data):

0; 0; 0; 0 ... 67.719528198242188; 1.2156707763671875; 26.286479949951172; 19.723798751831055\n 67.739532470703125; 1.1911787109375001; 26.298254013061523; 19.737958908081055\n 67.759529113769531; 1.1693894042968751; 26.310070037841797; 19.751998901367188\n 67.779533386230469; .....

for about 4000 lines, eventually rounded as:


I have to create a matrix for (time , a_data) but time is not equally spaced.

If I use plot function by qCustomPlot (QT) or matplot I can have a good image for my eyes, but I think that it's not OK for OpenCV...

What is the best method to create that matrix for OpenCV ?

Thanks and Best Regards,


edit retag flag offensive close merge delete