12-26-2022 restore Return-to-Top function. Header-only link is no longer recognized, now requires full URL.

Westside Robotics
2022-12-26 11:18:32 -08:00
parent 6fb507fd3c
commit e3d504c0ae

@ -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. 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 ## 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. 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 ## 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). 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 ## 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). 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 ## 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). 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 ## 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.** 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 ## 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. 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 ## 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. 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 ## 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. 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 ## 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). 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 ## 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. 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 ## 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). 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 ## 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). 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 ### 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). 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 ## 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. 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 ## 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. 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 ### 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: Likewise the AE Priority feature can return a Boolean. For example:
- `wasAEPrioritySet = setAePriority(true);` - `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 ### 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: 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);` - `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 ### White Balance Support
@ -404,7 +404,7 @@ The methods that set temperature and mode can also return a Boolean, indicating
- `wasTemperatureSet = setWhiteBalanceTemperature(3000);` - `wasTemperatureSet = setWhiteBalanceTemperature(3000);`
- `wasWhiteBalanceModeSet = setMode(WhiteBalanceControl.Mode.MANUAL);` - `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 ### Focus Support
@ -421,7 +421,7 @@ The methods that set the focus length and mode can also return a Boolean, presum
- `wasFocusSet = setFocusLength(25);` - `wasFocusSet = setFocusLength(25);`
- `wasFocusModeSet = setMode(FocusControl.Mode.Fixed)` - `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 ### 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. 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 ## 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. 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 ## 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) - 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 ## 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. 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>
============= =============