Hello there! We are up to the point where we can grab image data from the camera and process it using OpenCV. However, we can't figure out how to get that jpeg data on the smartdashboard via CameraServer.
Here is what we have:
Code:
std::string videoStreamAddress = "http://169.254.149.22/mjpg/video.mjpg";
Mat frame;
VideoCapture vidcap;
vidcap.open(videoStreamAddress);
vidcap >> frame;
vector<int> param = vector<int>(2);
param[0] = CV_IMWRITE_JPEG_QUALITY;
param[1] = 80;
vector<uchar> img_data;
imencode(".jpg", frame, img_data, param);
// This is where we're stuck :)
RobotMap::cam_server->SetImage();
SetImage seems to take a Image object. We cannot find any real documentation on how to use this object. Any help would be most appreciated.
Thanks,
Team 2053