1 //---------------------------------------------------------------------------// 2 // Copyright (c) 2013-2014 Kyle Lutz <kyle.r.lutz@gmail.com> 3 // 4 // Distributed under the Boost Software License, Version 1.0 5 // See accompanying file LICENSE_1_0.txt or copy at 6 // http://www.boost.org/LICENSE_1_0.txt 7 // 8 // See http://boostorg.github.com/compute for more information. 9 //---------------------------------------------------------------------------// 10 11 #ifndef BOOST_COMPUTE_INTEROP_OPENCV_HIGHGUI_HPP 12 #define BOOST_COMPUTE_INTEROP_OPENCV_HIGHGUI_HPP 13 14 #include <opencv2/highgui/highgui.hpp> 15 16 #include <boost/compute/interop/opencv/core.hpp> 17 18 namespace boost { 19 namespace compute { 20 opencv_imshow(const std::string & winname,const image2d & image,command_queue & queue=system::default_queue ())21inline void opencv_imshow(const std::string &winname, 22 const image2d &image, 23 command_queue &queue = system::default_queue()) 24 { 25 const cv::Mat mat = opencv_create_mat_with_image2d(image, queue); 26 27 cv::imshow(winname, mat); 28 } 29 30 } // end compute namespace 31 } // end boost namespace 32 33 #endif // BOOST_COMPUTE_INTEROP_OPENCV_HIGHGUI_HPP 34