mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[cscore] Deprecate AxisCamera (#6579)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user