Fawkes API  Fawkes Development Version
cvmatadapter.h
1 
2 /***************************************************************************
3  * cvmatadapter.h - Helper to convert FireVision buffers to cv::Mat for OpenCV
4  *
5  * Created: Tue May 11 15:57:58 2021
6  * Copyright 2021 Sebastian Eltester
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef CVMATADAPTER_H
25 #define CVMATADAPTER_H
26 
27 #include <fvutils/base/roi.h>
28 
29 #include <opencv2/opencv.hpp>
30 
31 namespace firevision {
32 
34 {
35 public:
36  static void convert_image_bgr(unsigned char *buffer, cv::Mat &image);
37  static void convert_image_yuv422_planar(cv::Mat &image, unsigned char *buffer);
38 
39  //static IplImage * create_image_from_roi(unsigned char *buffer, ROI *roi);
40 };
41 
42 } // end namespace firevision
43 
44 #endif // CVMATADAPTER_H
Adapter for OpenCV Mat.
Definition: cvmatadapter.h:34
static void convert_image_bgr(unsigned char *buffer, cv::Mat &image)
Convert image from buffer into cv::Mat.
static void convert_image_yuv422_planar(cv::Mat &image, unsigned char *buffer)
Convert image from cv::Mat into buffer.