Updated Using an External Webcam (markdown)
@ -45,4 +45,26 @@ The FTC software offers "webcam" versions of its sample Blocks and Java Op Modes
|
||||
Before editing an Op Mode, verify that the intended configuration (with camera) is active. Also verify that the name referenced in the Op Mode matches the name specified in the configuration file.
|
||||
|
||||
|
||||
<p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/uvc/images/uvcdiagram.png" width="400"><br/>
|
||||
## Image Preview
|
||||
|
||||
The FTC apps provide camera preview for ‘stream-enabled’ Op Modes using Vuforia or TensorFlow Object Detection (TFOD).
|
||||
|
||||
On a paired DS phone, with the camera connected and configured, select a stream-enabled Op Mode. Press the INIT button, and wait briefly for streaming initialization; do not press the START button. Instead open the main menu (3 dots) and select Camera Stream. This option appears only at this time, during which the gamepads and START button are disabled for safety.
|
||||
|
||||
<p align="center">[[/images/Using-an-External-Webcam/DS-webcam-preview-CH-1.jpg]]<p>
|
||||
|
||||
The camera image will appear on the DS screen. Manually touch the image to refresh it. To preserve bandwidth, only one frame is sent at a time.
|
||||
|
||||
<p align="center">[[/images/Using-an-External-Webcam/DS-webcam-preview-CH-2.jpg]]<p>
|
||||
|
||||
This option may be used to adjust the camera, with frequent manual image refreshing as needed. When finished, open the main menu and select Camera Stream again to turn off the preview. The preview image will close, gamepads are activated, and the START button may be pressed to continue running the Op Mode.
|
||||
|
||||
<p align="center">[[/images/Using-an-External-Webcam/DS-webcam-preview-CH-3.jpg]]<p>
|
||||
|
||||
Because this image displays during INIT, Vuforia or TensorFlow augmented data appears only if activated before the waitForStart command. This is demonstrated in the Sample Op Modes.
|
||||
|
||||
Alternatively, camera output can be viewed on a display monitor or other device plugged into the HDMI port on the REV Control Hub.
|
||||
|
||||
For custom streams, advanced users of Android Studio may consult the API documentation for CameraStreamServer#setSource and CameraStreamSource.
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user