macosx.h 731 B

1234567891011121314151617181920
  1. // This file is part of OpenCV project.
  2. // It is subject to the license terms in the LICENSE file found in the top-level directory
  3. // of this distribution and at http://opencv.org/license.html.
  4. #if !defined(__APPLE__) || !defined(__MACH__)
  5. #error This header should be used in macOS ObjC/Swift projects.
  6. #endif
  7. #import <AppKit/AppKit.h>
  8. #include "opencv2/core.hpp"
  9. //! @addtogroup imgcodecs_macosx
  10. //! @{
  11. CV_EXPORTS CGImageRef MatToCGImage(const cv::Mat& image) CF_RETURNS_RETAINED;
  12. CV_EXPORTS void CGImageToMat(const CGImageRef image, cv::Mat& m, bool alphaExist = false);
  13. CV_EXPORTS NSImage* MatToNSImage(const cv::Mat& image);
  14. CV_EXPORTS void NSImageToMat(const NSImage* image, cv::Mat& m, bool alphaExist = false);
  15. //! @}