Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Curve analysis from .CSV

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 67.739532470703125; 1.1911787109375001; 26.298254013061523; 19.737958908081055 67.759529113769531; 1.1693894042968751; 26.310070037841797; 19.751998901367188 67.779533386230469; ..... for about 4000 lines eventually rounded as: 67.71953;1.21567;26.28648.... 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, Mario

Curve analysis from .CSV

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 19.723798751831055\n 67.739532470703125; 1.1911787109375001; 26.298254013061523; 19.737958908081055 19.737958908081055\n 67.759529113769531; 1.1693894042968751; 26.310070037841797; 19.751998901367188 19.751998901367188\n 67.779533386230469; ..... for about 4000 lines eventually rounded as: 67.71953;1.21567;26.28648.... 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, Mario

Curve analysis from .CSV

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 lines, eventually rounded as: 67.71953;1.21567;26.28648.... as:

67.71953;1.21567;26.28648....

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, Mario

Curve analysis from .CSV

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:

67.71953;1.21567;26.28648....

I have to create a matrix for (time , a_data) but time is not equally spaced. 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... OpenCV...

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

Thanks and Best Regards, Regards,

Mario