Scanbot SDK
Loading...
Searching...
No Matches
ScanbotSDKOpenCV.hpp
1//
2//
3//#pragma once
4//#ifndef SCANBOTSDK_OPENCV_HPP
5//#define SCANBOTSDK_OPENCV_HPP
6//
7//#include <ScanbotSDK.h>
8//#include <cassert>
9//#include <opencv2/core/mat.hpp>
10//
11//namespace scanbotsdk {
12// /**
13// * @brief Wraps the data of the given cv::Mat in a scanbotsdk_image_t struct.
14// * @details The resulting struct does not own the data, so the cv::Mat must remain valid while the scanbotsdk_image_t is used.
15// * @param image The cv::Mat to wrap.
16// * @return The scanbotsdk_image_t.
17// */
18// inline scanbotsdk_image_t toImage(const cv::Mat& image) {
19// assert(image.depth() == CV_8U);
20//
21// scanbotsdk_image_t result;
22// result.buffer = image.data;
23// result.height = image.rows;
24// result.width = image.cols;
25// result.channels = image.channels();
26// result.stride = static_cast<int>(image.step);
27// return result;
28// }
29//}
30//
31//#endif //SCANBOTSDK_OPENCV_HPP