12-26-2022 restore Return-to-Top function. Header-only link is no longer recognized, now requires full URL.
@ -31,7 +31,7 @@ You will see Vuforia mentioned here, and in the [sample OpModes](#sample-opmodes
|
||||
|
||||
These CameraControl interfaces allow some control of the webcam, within requirements or settings of Vuforia for its own performance. Such settings include resolution and frame rate, not covered here.
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## Exposure Control
|
||||
|
||||
@ -53,7 +53,7 @@ There are no `set()` methods for min and max exposure; these are hard-coded in t
|
||||
|
||||
These and other exposure methods are called on an ExposureControl object; sample code is shown below, after Exposure Control Mode.
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## Exposure Control Mode
|
||||
|
||||
@ -77,7 +77,7 @@ The Logitech C920 and C270 models offer two exposure modes: AperturePriority and
|
||||
|
||||
Full details, and a few other methods, are described in the [ExposureControl Javadoc](https://javadoc.io/doc/org.firstinspires.ftc/RobotCore/latest/org/firstinspires/ftc/robotcore/external/hardware/camera/controls/ExposureControl.html).
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## Exposure Control code samples
|
||||
|
||||
@ -98,7 +98,7 @@ Full details, and a few other methods, are described in the [ExposureControl Jav
|
||||
|
||||
See far below for these and other exposure controls illustrated in [Sample OpModes](#sample-opmodes).
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## Gain Control
|
||||
|
||||
@ -120,7 +120,7 @@ These and other gain methods are called on a GainControl object, as described ab
|
||||
|
||||
Full details are described in the [GainControl Javadoc](https://javadoc.io/doc/org.firstinspires.ftc/RobotCore/latest/org/firstinspires/ftc/robotcore/external/hardware/camera/controls/GainControl.html).
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## Example 1: Exposure's effect on TFOD
|
||||
|
||||
@ -154,7 +154,7 @@ So, there does seem to be a range of exposure values that gives better results.
|
||||
|
||||
This data is the result of a very particular combination of: webcam model (Logitech C270), distance (12 inches), lookdown angle (30 degrees), TFOD model (FTC SDK 7.0 default), ambient lighting, background, etc. **Your results will vary, perhaps significantly.**
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## Example 2: Gain's effect on TFOD
|
||||
|
||||
@ -176,7 +176,7 @@ Higher gain does improve recognition, then performance declines. Then at higher
|
||||
|
||||
These two charts suggest that TFOD results are affected by, and can perhaps be optimized by, setting specific values for exposure and gain. A team should compare this with the default or automatic performance of their robot and webcam, in the full range of expected match conditions.
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## Example 3: An odd preview
|
||||
|
||||
@ -187,7 +187,7 @@ How can this be? Answer: this image was not an 'instant' result. Exposure was
|
||||
|
||||
The FTC implementations of TensorFlow Lite (and Vuforia) are good at **tracking** a currently-identified object (or image) through translation, rotation, partial blockage, and even extreme changes in exposure.
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## White Balance Control
|
||||
|
||||
@ -213,7 +213,7 @@ There are no `set()` methods for min and max temperature values; these are hard-
|
||||
|
||||
The Logitech C920 webcam has a min value of 2000 and a max value of 6500.
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## White Balance Control Mode
|
||||
|
||||
@ -232,7 +232,7 @@ The Logitech C920 defaults to Auto mode for white balance control, and even reve
|
||||
|
||||
Full details are described in the [WhiteBalanceControl Javadoc](https://javadoc.io/doc/org.firstinspires.ftc/RobotCore/latest/org/firstinspires/ftc/robotcore/external/hardware/camera/controls/WhiteBalanceControl.html).
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## Focus Control
|
||||
|
||||
@ -252,7 +252,7 @@ There are no `set()` methods for min and max focus length; these are hard-coded
|
||||
|
||||
These and other focus methods are called on a FocusControl object, as described above for exposure.
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## Focus Control Mode
|
||||
|
||||
@ -274,7 +274,7 @@ The Logitech C920 webcam offers two modes: ContinuousAuto and Fixed, which does
|
||||
|
||||
Full details are described in the [FocusControl Javadoc](https://javadoc.io/doc/org.firstinspires.ftc/RobotCore/latest/org/firstinspires/ftc/robotcore/external/hardware/camera/controls/FocusControl.html).
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## Pan-Tilt-Zoom Control
|
||||
|
||||
@ -317,7 +317,7 @@ These pan and tilt methods are called on a PtzControl object, as described above
|
||||
|
||||
Full details are described in the [PtzControl Javadoc](https://javadoc.io/doc/org.firstinspires.ftc/RobotCore/latest/org/firstinspires/ftc/robotcore/external/hardware/camera/controls/PtzControl.html).
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
### Zoom
|
||||
|
||||
@ -333,7 +333,7 @@ These zoom methods are called on a PtzControl object, as described above for exp
|
||||
|
||||
Full details are described in the [PtzControl Javadoc](https://javadoc.io/doc/org.firstinspires.ftc/RobotCore/latest/org/firstinspires/ftc/robotcore/external/hardware/camera/controls/PtzControl.html).
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## AE Priority
|
||||
|
||||
@ -360,13 +360,13 @@ The Exposure=0 recognition here was made before reducing exposure and gain. Whe
|
||||
|
||||
Again, this effect is triggered only in very low lighting, not expected in FTC. If the building loses all power, Duck recognition becomes... less essential.
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## Evaluating Your Webcam
|
||||
|
||||
The firmware of a specific webcam may or may not support certain features described here. The FTC SDK provides some methods to query the webcam and/or return values that indicate whether a valid response was available.
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
### Exposure Support
|
||||
|
||||
@ -388,14 +388,14 @@ The methods that set the exposure and mode can also return a Boolean, presumably
|
||||
Likewise the AE Priority feature can return a Boolean. For example:
|
||||
- `wasAEPrioritySet = setAePriority(true);`
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
### Gain Support
|
||||
|
||||
The method that sets the gain can also return a Boolean indicating whether the operation was successful or not. As an optional example:
|
||||
- `wasGainSet = setGain(25);`
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
### White Balance Support
|
||||
|
||||
@ -404,7 +404,7 @@ The methods that set temperature and mode can also return a Boolean, indicating
|
||||
- `wasTemperatureSet = setWhiteBalanceTemperature(3000);`
|
||||
- `wasWhiteBalanceModeSet = setMode(WhiteBalanceControl.Mode.MANUAL);`
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
### Focus Support
|
||||
|
||||
@ -421,7 +421,7 @@ The methods that set the focus length and mode can also return a Boolean, presum
|
||||
- `wasFocusSet = setFocusLength(25);`
|
||||
- `wasFocusModeSet = setMode(FocusControl.Mode.Fixed)`
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
### PTZ Support
|
||||
|
||||
@ -431,7 +431,7 @@ The methods that set the pan/tilt pair and zoom value can also return a Boolean,
|
||||
|
||||
For PTZ get() methods, some webcams simply **return zero** for unsupported values.
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## Some Caveats
|
||||
|
||||
@ -451,7 +451,7 @@ For PTZ get() methods, some webcams simply **return zero** for unsupported value
|
||||
|
||||
Lastly, some features here may be implemented or enhanced with the help of an external library such as [OpenCV](https://opencv.org/) or [EasyOpenCV](https://github.com/OpenFTC/EasyOpenCV). That potential is not covered in this basic tutorial. A separate tutorial covers the general use of [External Libraries](https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/External-Libraries-in-OnBot-Java-and-Blocks) in FTC Blocks and OnBot Java.
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## Sample OpModes
|
||||
|
||||
@ -469,7 +469,7 @@ The following sample OpModes are linked here for reference only. These rudiment
|
||||
|
||||
- Adjust virtual pan, tilt and zoom, if supported: [W_WebcamControls_PTZ.java](https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/SampleOpModes/FTC-Webcam-Controls/W_WebcamControls_PTZ.java)
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
## Summary
|
||||
|
||||
@ -477,7 +477,7 @@ Some webcam controls in the FTC SDK could potentially improve TFOD recognitions.
|
||||
|
||||
You are encouraged to submit other webcam reports and examples that worked for you.
|
||||
|
||||
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
||||
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/FTC Webcam Controls]]</i><p>
|
||||
|
||||
=============
|
||||
|
||||
|
Reference in New Issue
Block a user