highgui.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233
  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. #ifndef BOOST_COMPUTE_INTEROP_OPENCV_HIGHGUI_HPP
  11. #define BOOST_COMPUTE_INTEROP_OPENCV_HIGHGUI_HPP
  12. #include <opencv2/highgui/highgui.hpp>
  13. #include <boost/compute/interop/opencv/core.hpp>
  14. namespace boost {
  15. namespace compute {
  16. inline void opencv_imshow(const std::string &winname,
  17. const image2d &image,
  18. command_queue &queue = system::default_queue())
  19. {
  20. const cv::Mat mat = opencv_create_mat_with_image2d(image, queue);
  21. cv::imshow(winname, mat);
  22. }
  23. } // end compute namespace
  24. } // end boost namespace
  25. #endif // BOOST_COMPUTE_INTEROP_OPENCV_HIGHGUI_HPP