axis ptz ros节点

https://github.com/RobotnikAutomation/axis_camera
http://wiki.ros.org/axis_camera

opencv 打开axis摄像头

#include <stdio.h>
#include <opencv2/opencv.hpp>
#include <iostream>

int main(int, char**) {
	cv::VideoCapture vcap;
	cv::Mat image;

	// This works on a D-Link CDS-932L
	//const std::string videoStreamAddress = "http://192.168.1.13/axis-cgi/jpg/image.cgi?resolution=qcif&text=0&date=0&clock=0&rotation=0&.jpg";
	 const std::string videoStreamAddress = "http://192.168.1.13/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=30&.mjpg";

	//open the video stream and make sure it's opened
	if (!vcap.open(videoStreamAddress) )
	{
		std::cout << "Error opening video stream or file" << std::endl;
		return -1;
	}

	for (;;) {
		if (!vcap.read(image)) {
			std::cout << "No frame" << std::endl;
			cv::waitKey();
		}
		cv::imshow("Output Window", image);
		if (cv::waitKey(1) >= 0) break;
	}
}

这里写图片描述

猜你喜欢

转载自blog.csdn.net/qq_35508344/article/details/78765226
PTZ
今日推荐