| 250 | } |
| 251 | |
| 252 | static void markObjects(QImage &image, std::vector<cv::Rect> &objects) |
| 253 | { |
| 254 | auto frame = QImageToMat(image); |
| 255 | for (size_t i = 0; i < objects.size(); i++) { |
| 256 | rectangle(frame, cv::Point(objects[i].x, objects[i].y), |
| 257 | cv::Point(objects[i].x + objects[i].width, |
| 258 | objects[i].y + objects[i].height), |
| 259 | cv::Scalar(255, 0, 0, 255), 2, 8, 0); |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | PreviewImage::PreviewImage(std::mutex &mtx) : _mtx(mtx) {} |
| 264 |
no test coverage detected