Hey there,
I have some cameras libraries in my project done by me that return a data buffer that afterward is transformed into a cv::Mat object.
Can I use a cv::VideoCapture ptr object to pass the cv::Mat object without having to pass any camera index?
Right now I am testing with cv::imshow that the grabbed image from the buffer works but in the main application my custom frame to show the image.
Below my testing code
while (cv::waitKey(1) != 27) {
cv::Mat image(m_cr_camera->getHeight(),
m_cr_camera->getWidth(), CV_16UC1, m_cr_camera->getBuffer());
cv::namedWindow(camera_name_window, cv::WINDOW_AUTOSIZE);
cv::imshow(camera_name_window, image);
}
What I would like to do is something like:
cv::VideoCapture *capture = new VideoCapture();
(*capture) >> m_camera->getImage();
Then the capture is passed into my custom frame to reproduce the image.
Thank you in advance.