Plotting real time data in opencv using python
This repo can be used to plot single as well as multiple values in OpenCV python.
Plot single integer values in realtime using this file.
p = Plotter(400, 200) #(plot_width, plot_height)
for v in range(500):
# call 'plot' method for realtime plot
p.plot(v/5)
Plot multiple values in reallime using this file.
p = Plotter(400, 200, 3) #(plot_width, plot_height)
for v in range(500):
# call 'plot' method for realtime plot
v1 = random.randint(0,200) - 100
v2 = int(math.sin(v*3.14/180)*100)
v3 = int(math.cos(v*3.14/180)*100)
p.multiplot([v1, v2, v3]) #List of all values to be plotted
Plot multiple values in reallime in multiwindows with a simple
p = Plotter(400, 200, 100) #(plot_width, plot_height, sample_count)
p = Plotter(400, 200,sample_buffer=200)
for v in range(1,3000):
p.plot(int(math.sin(v*3.14/180)*100),label='sin') ## Add label 'sin' to show in a seperate window
p.plot(int(math.cos(v*3.14/180)*50),label='cos')