Reputation: 65
I want to use OpenCV 3.2 and Simd in one c++ project. Is there easy way to convert cv::Mat (image type in OpenCV) to Simd::View (image type used in Simd Library)? Help me please.
Upvotes: 2
Views: 515
Reputation: 213
It is simple. You just have to define macro SIMD_OPENCV_ENABLE before including of Simd headers:
#include <opencv2/core/core.hpp>
#define SIMD_OPENCV_ENABLE
#include "Simd/SimdLib.hpp"
typedef Simd::View<Simd::Allocator> View;
void test()
{
cv::Mat cvImage;
View simdImage;
cvImage = simdImage;
simdImage = cvImage;
}
Upvotes: 1