EasyManua.ls Logo

SunFounder PiCar-X Kit - Page 76

Default Icon
181 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SunFounder PiCar-X Kit
• Vilib.qrcode_detect_switch(False) : Switch ON/OFF QR code detection, Returns the decoded data of
the QR code.
• Vilib.gesture_detect_switch(False) : Switch ON/OFF gesture detection
• Vilib.traffic_sign_detect_switch(False) : Switch ON/OFF traffic sign detection
The information detected by the target will be stored in the detect_obj_parameter = Manager().dict() dictio-
nary.
In the main program, you can use it like this:
Vilib.detect_obj_parameter['color_x']
The keys of the dictionary and their uses are shown in the following list:
• color_x: the x value of the center coordinate of the detected color block, the range is 0~320
• color_y: the y value of the center coordinate of the detected color block, the range is 0~240
• color_w: the width of the detected color block, the range is 0~320
• color_h: the height of the detected color block, the range is 0~240
• color_n: the number of detected color patches
• human_x: the x value of the center coordinate of the detected human face, the range is 0~320
• human_y: the y value of the center coordinate of the detected face, the range is 0~240
• human_w: the width of the detected human face, the range is 0~320
• human_h: the height of the detected face, the range is 0~240
• human_n: the number of detected faces
• traffic_sign_x: the center coordinate x value of the detected traffic sign, the range is 0~320
• traffic_sign_y: the center coordinate y value of the detected traffic sign, the range is 0~240
• traffic_sign_w: the width of the detected traffic sign, the range is 0~320
• traffic_sign_h: the height of the detected traffic sign, the range is 0~240
• traffic_sign_t: the content of the detected traffic sign, the value list is [‘stop’,’right’,’left’,’forward’]
• gesture_x: The center coordinate x value of the detected gesture, the range is 0~320
• gesture_y: The center coordinate y value of the detected gesture, the range is 0~240
• gesture_w: The width of the detected gesture, the range is 0~320
• gesture_h: The height of the detected gesture, the range is 0~240
• gesture_t: The content of the detected gesture, the value list is [“paper”,”scissor”,”rock”]
• qr_date: the content of the QR code being detected
• qr_x: the center coordinate x value of the QR code to be detected, the range is 0~320
• qr_y: the center coordinate y value of the QR code to be detected, the range is 0~240
• qr_w: the width of the QR code to be detected, the range is 0~320
• qr_h: the height of the QR code to be detected, the range is 0~320
72 Chapter 4. Play with Python

Table of Contents