This is the code for the USB camera:
import traitlets
from IPython.display import display
import ipywidgets.widgets as widgets
from jetbot import Camera, bgr8_to_jpeg
camera = Camera.instance(width=224, height=224)
image = widgets.Image(formats=‘jpeg’, width=224, height=224)
blocked_slider = widgets.FloatSlider(description=‘blocked’, min=0.0, max=1.0, orientation=‘vertical’)
camera_link = traitlets.dlink((camera, ‘value’), (image, ‘value’), transform=bgr8_to_jpeg)
display([widgets.Hbox([image, blocked_slider]), speed_slider]))
However, I am using the CSI camera and when trying to make the image a widgets, I’m struggling. Here is what I’ve done so far:
Im not sure how to do this with the CSI camera. Any help would be appreciated. Thanks in advance.