[Newbie] OpenCV to evaluate a plot

asked 2018-07-23 10:57:52 -0600

scaramacai gravatar image

Sometimes you want to know where your data (i.e. temperature from the oven) are growing by a linear law, so you can obtain the interval within your system is -approximately- a linear one. It is possible using a lot of systems (from grouping point and verifying how good a straight line approximates those by a regression coefficient, to a neural network that identifies straight/curves).

To improve my OpenCV knowledge, my idea is grouping some points (stored in a .csv file) and testing by contour if they are aligned. Is it a reasonable way? Is there a more focused function that automatically create two groups, i.e "linear region" and "not linear region"?

Thanks a lot!

image description

edit retag flag offensive close merge delete

Comments

1

I would compute the derivative of the signal since you have the raw data.

Eduardo gravatar imageEduardo ( 2018-07-23 11:47:52 -0600 )edit
1

there is also fitLine()

berak gravatar imageberak ( 2018-07-24 01:23:33 -0600 )edit

@Eduardo. Well, at first I used the derivative and it was OK, but I was going to apply OpenCV library to take confidence with it. This kind of problem seems me an interesting case for working on signal analysis possibilities... @berek . Interesting. I'll test it but it seems useful. Thanks!

scaramacai gravatar imagescaramacai ( 2018-07-26 12:38:48 -0600 )edit