hi how can i make the camera show color video here is my code @zayfod @gimait @solosito @ca2-chambers
import tkinter as tk
from PIL import Image, ImageTk
import pycozmo
root = tk.Tk()
root.title("Cozmo Camera Feed")
image_label = tk.Label(root)
image_label.pack()
last_im = None
def on_camera_image(cli, new_im):
"""Handle new images from the robot."""
COLOR_CAMERA = True
global last_im, image_label
last_im = new_im
if last_im:
im = last_im.resize((1700, 725))
im = im.convert('RGB')
photo = ImageTk.PhotoImage(image=im)
image_label.config(image=photo)
image_label.image = photo # Keep a reference to avoid garbage collection
with pycozmo.connect(enable_procedural_face=True) as cli:
hi how can i make the camera show color video here is my code @zayfod @gimait @solosito @ca2-chambers
import tkinter as tk from PIL import Image, ImageTk import pycozmo
root = tk.Tk()
root.title("Cozmo Camera Feed")
image_label = tk.Label(root) image_label.pack()
last_im = None
def on_camera_image(cli, new_im): """Handle new images from the robot.""" COLOR_CAMERA = True global last_im, image_label last_im = new_im
with pycozmo.connect(enable_procedural_face=True) as cli: