[cscore] Deprecate AxisCamera (#6579)

This commit is contained in:
Gold856
2024-05-12 13:28:51 -04:00
committed by GitHub
parent fb3e0e1ecb
commit 305a0657e2
12 changed files with 75 additions and 20 deletions

View File

@@ -10,16 +10,18 @@
/**
* This is a demo program showing the use of OpenCV to do vision processing. The
* image is acquired from the Axis camera, then a rectangle is put on the image
* image is acquired from an HTTP camera, then a rectangle is put on the image
* and sent to the dashboard. OpenCV has many methods for different types of
* processing.
*/
class Robot : public frc::TimedRobot {
private:
static void VisionThread() {
// Get the Axis camera from CameraServer
cs::AxisCamera camera =
frc::CameraServer::AddAxisCamera("axis-camera.local");
// Create an HTTP camera. The address will need to be modified to have the
// correct team number. The exact path will depend on the source.
cs::HttpCamera camera{"My Camera", "http://10.x.y.11/video/stream.mjpg"};
// Start capturing images
frc::CameraServer::StartAutomaticCapture(camera);
// Set the resolution
camera.SetResolution(640, 480);

View File

@@ -310,12 +310,12 @@
"commandversion": 2
},
{
"name": "Axis Camera Sample",
"description": "Acquire images from an Axis network camera and adds some annotation to the image (as you might do for showing operators the result of some image recognition), and sends it to the dashboard for display.",
"name": "HTTP Camera",
"description": "Acquire images from an HTTP network camera and adds some annotation to the image (as you might do for showing operators the result of some image recognition), and sends it to the dashboard for display.",
"tags": [
"Vision"
],
"foldername": "AxisCameraSample",
"foldername": "HttpCamera",
"gradlebase": "cpp",
"commandversion": 2
},