[Newbie] OpenCV to evaluate a plot

asked Jul 23 '18

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

Preview: (hide)

Comments

1

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

Eduardo gravatar imageEduardo (Jul 23 '18)edit
1

there is also fitLine()

berak gravatar imageberak (Jul 24 '18)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 (Jul 26 '18)edit