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.
Asked
Active
Viewed 441 times
1 Answers
1
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;
}

Akira
- 213
- 2
- 11
-
Thank you. It is simpler than I thought. – John Apr 17 '17 at 12:32