fixed 2 bugs in python samples (crash in camshift and running samples from within the demo)

pull/13383/head
Vadim Pisarevsky 14 years ago
parent fd69c8b34a
commit 8dacbeb157
  1. 2
      samples/python2/camshift.py
  2. 2
      samples/python2/demo.py

@ -58,7 +58,7 @@ class App(object):
ret, self.frame = self.cam.read()
vis = self.frame.copy()
hsv = cv2.cvtColor(self.frame, cv2.COLOR_BGR2HSV)
mask = cv2.inRange(hsv, np.array((0, 60, 32)), np.array((180, 255, 255)))
mask = cv2.inRange(hsv, np.array((0., 60., 32.)), np.array((180., 255., 255.)))
if self.selection:
x0, y0, x1, y1 = self.selection

@ -141,7 +141,7 @@ class App:
def on_run(self, *args):
cmd = self.cmd_entry.get()
print 'running:', cmd
Popen(cmd, shell=True)
Popen("python " + cmd, shell=True)
def run(self):
tk.mainloop()

Loading…
Cancel
Save