# [Newbie] OpenCV to evaluate a plot

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!

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

there is also fitLine()

@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!