import traitlets
import ipywidgets.widgets as widgets
from IPython.display import display
from jnmouse import Camera, bgr8_to_jpeg
camera = Camera.instance(width=224, height=224)
image = widgets.Image(format='jpeg', width=224, height=224) # this width and height doesn't necessarily have to match the camera
camera_link = traitlets.dlink((camera, 'value'), (image, 'value'), transform=bgr8_to_jpeg)
camera2 = Camera.instance(sensor_id=1, width=224, height=224)
image2 = widgets.Image(format='jpeg', width=224, height=224) # this width and height doesn't necessarily have to match the camera
camera_link2 = traitlets.dlink((camera2, 'value'), (image2, 'value'), transform=bgr8_to_jpeg)
display(image)
display(image2)
Any other comments?
Checklists
[x] I have read the CONTRIBUTING guidelines.
[x] I have checked to ensure there aren't other open Pull Requests for the same change.
What does this implement/fix?
マルチカメラをサポートします。
Does this close any currently open issues?
しません。
How has this been tested?
Any other comments?
Checklists