Get pointer to OpenCV image object
| 892 | |
| 893 | // Get pointer to OpenCV image object |
| 894 | cv::Mat Frame::GetImageCV() |
| 895 | { |
| 896 | // Check for blank image |
| 897 | if (!image) |
| 898 | // Fill with black |
| 899 | AddColor(width, height, color); |
| 900 | |
| 901 | // if (imagecv.empty()) |
| 902 | // Convert Qimage to Mat |
| 903 | imagecv = Qimage2mat(image); |
| 904 | |
| 905 | return imagecv; |
| 906 | } |
| 907 | |
| 908 | std::shared_ptr<QImage> Frame::Mat2Qimage(cv::Mat img){ |
| 909 | cv::cvtColor(img, img, cv::COLOR_BGR2RGB); |
no outgoing calls
no test coverage detected