Files
dev/script/test/test24.py
2018-04-17 12:05:48 +02:00

17 lines
461 B
Python
Executable File

plots = None
def plot_hist(data):
global plots
(h,x) = histogram(data) #(h,x) = histogram(data, 0, 255) is more efficient: no neet to calculate min & max
if plots is None:
plots = plot(h, xdata = x, title = "Histo")
else:
plots[0].getSeries(0).setData(x,h)
while(True):
data = img.getData().getRectSelection(0,0,500,250)
plot_hist(data)
if plots[0].displayable == False:
break
time.sleep(0.250)