def show_images(args): '''show all images''' global image, idx cv.NamedWindow('Bayer') if len(args) > 1: tbar = cv.CreateTrackbar('Image', 'Bayer', 0, len(args)-1, change_image) cv.SetMouseCallback('Bayer', mouse_event, None) idx = 0 pgm = None while True: print(args[idx]) (image, pgm) = change_image(idx) oldidx = idx newidx = cuav_util.key_menu(oldidx, len(args), image, '%s.png' % args[idx][:-4], pgm=pgm) idx += (newidx - oldidx) cv.SetTrackbarPos('Image', 'Bayer', idx) cv.DestroyWindow('Bayer')
def show_images(args): '''show all images''' global image, idx cv.NamedWindow('Bayer') if len(args) > 1: tbar = cv.CreateTrackbar('Image', 'Bayer', 0, len(args) - 1, change_image) cv.SetMouseCallback('Bayer', mouse_event, None) idx = 0 pgm = None while True: print(args[idx]) (image, pgm) = change_image(idx) oldidx = idx newidx = cuav_util.key_menu(oldidx, len(args), image, '%s.png' % args[idx][:-4], pgm=pgm) idx += (newidx - oldidx) cv.SetTrackbarPos('Image', 'Bayer', idx) cv.DestroyWindow('Bayer')