New ScreenPanel
This commit is contained in:
16
script/test24.py
Executable file
16
script/test24.py
Executable file
@@ -0,0 +1,16 @@
|
||||
|
||||
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)
|
||||
Reference in New Issue
Block a user