23#include <opencv2/imgproc/imgproc.hpp>
27 itsCamera(cam), itsTurbo(turbo)
34 if (itsCamera.get() ==
nullptr)
return;
37 if (itsDidGet ==
false)
try {
get(); }
catch (...) { }
40 if (itsDidGet && itsDidDone ==
false)
try { itsCamera->done(itsImage); }
catch (...) { }
43 if (itsCamera->hasScaledImage() && itsDidGet2 ==
false)
try {
get2(); }
catch (...) { }
46 if (itsDidGet2 && itsDidDone2 ==
false)
try { itsCamera->done2(itsImage2); }
catch (...) { }
52 if (itsDidGet ==
false)
54 itsCamera->get(itsImage);
56 if (casync && itsTurbo) itsImage.
buf->sync();
63 return itsCamera->hasScaledImage();
69 if (itsDidGet2 ==
false)
71 itsCamera->get2(itsImage2);
73 if (casync && itsTurbo) itsImage2.
buf->sync();
81 if (hasScaledImage())
return get2(casync);
89 itsDmaFd = itsImage.buf->dmaFd();
97 itsDmaFd2 = itsImage2.buf->dmaFd();
104 itsCamera->done(itsImage);
111 itsCamera->done2(itsImage2);
A raw image as coming from a V4L2 Camera and/or being sent out to a USB Gadget.
std::shared_ptr< VideoBuf > buf
The pixel data buffer.
cv::Mat convertToCvRGBA(RawImage const &src)
Convert RawImage to OpenCV doing color conversion from any RawImage source pixel to OpenCV RGB-A byte...
cv::Mat convertToCvGray(RawImage const &src)
Convert RawImage to OpenCV doing color conversion from any RawImage source pixel to OpenCV gray byte.
cv::Mat convertToCvRGB(RawImage const &src)
Convert RawImage to OpenCV doing color conversion from any RawImage source pixel to OpenCV RGB byte.
cv::Mat convertToCvBGR(RawImage const &src)
Convert RawImage to OpenCV doing color conversion from any RawImage source pixel to OpenCV BGR byte.