7#ifndef SCANBOTSDK_OPENCV_HPP
8#define SCANBOTSDK_OPENCV_HPP
12#include <opencv2/core/mat.hpp>
22 assert(image.depth() == CV_8U);
25 result.
buffer = image.data;
26 result.
height = image.rows;
27 result.
width = image.cols;
29 result.
stride = image.step;
scanbotsdk_image_t toImage(const cv::Mat &image)
Wraps the data of the given cv::Mat in a scanbotsdk_image_t struct.
Definition ScanbotSDKOpenCV.hpp:21
Wrapper for image data.
Definition ScanbotSDK.h:185
int stride
Row stride in bytes, if 0 the stride will be calculated automatically.
Definition ScanbotSDK.h:199
int channels
The number of channels in the image.
Definition ScanbotSDK.h:196
int width
Image width.
Definition ScanbotSDK.h:190
void * buffer
The image buffer. The buffer data type must be an 8-bit integer.
Definition ScanbotSDK.h:187
int height
Image height.
Definition ScanbotSDK.h:193