Menu

Is there any method for using Opencv Mat type?

Anonymous
2017-04-07
2017-04-07
  • Anonymous

    Anonymous - 2017-04-07

    Hello, I want to use smid library at c++ project with opencv 3.2
    How to convert Mat for simd image buffer?
    Help me plz.

     
  • Yermalayeu Ihar

    Yermalayeu Ihar - 2017-04-07

    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::Point<ptrdiff_t> Point;
    typedef Simd::Rectangle<ptrdiff_t> Rect;
    typedef Simd::View<Simd::Allocator> View;
    
    void test()
    {
        cv::Mat cvImage;
        View simdImage;
    
        cvImage = simdImage;
        simdImage = cvImage;
    
        cv::Size cvSize;
        cv::Point cvPoint;
        Point simdPoint;
    
        simdPoint = cvPoint;
        simdPoint = cvSize;
        cvSize = simdPoint;
        cvPoint = simdPoint;
    
        cv::Rect cvRect;
        Rect simdRect;
    
        simdRect = cvRect;
        cvRect = simdRect;
    }
    
     
  • Anonymous

    Anonymous - 2017-04-17

    Dear Ihar,

    Thank you very much for your support.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.