<jupyter_start><jupyter_text>@Copyright (C): 2010-2019, Shenzhen Yahboom Tech  @Author: Malloy.Yuan  @Date: 2019-07-17 10:10:02  @LastEditors: Malloy.Yuan  @LastEditTime: 2019-09-17 17:54:19    Initialization of cameraImport camera object from jetbot robot car to open and initialize camera interface<jupyter_code>from jetbot import Camera

camera = Camera.instance(width=224, height=224)<jupyter_output><empty_output><jupyter_text>Initialize the display container We import the component package from the ipywidgets library and initialize the display component properties for display.<jupyter_code>import ipywidgets.widgets as widgets
image = widgets.Image(format='jpeg', width=224, height=224)
display(image)<jupyter_output><empty_output><jupyter_text>Update camera screen to component display in real timeWe use traitlets to bind two data objects for real-time refresh of the data. Since the image format displayed by our component is JPEG format,And the data we get from the camera is bgr8, so we need to use the bgr8_to_jpeg method in jetbot to get us right from the camera.The captured data is displayed in real time.<jupyter_code>from jetbot import bgr8_to_jpeg
import traitlets
camera_link = traitlets.dlink((camera, 'value'), (image, 'value'), transform=bgr8_to_jpeg)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07274119448698316, 'fraction_numerical': 0.039816232771822356, 'mean_word_length': 6.779761904761905, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '200547', 'license': 'MIT', 'n_tokens_mistral': 429, 'n_tokens_neox': 384, 'n_words': 141, 'path': 'notebooks/1.Using of camera/Using of camera.ipynb', 'repo_name': 'Hoehlenbaer/jetbot', 'size': '1306'}