github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/opencv4/include/opencv2/imgcodecs/macosx.h (about) 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 5 #if !defined(__APPLE__) || !defined(__MACH__) 6 #error This header should be used in macOS ObjC/Swift projects. 7 #endif 8 9 #import <AppKit/AppKit.h> 10 #include "opencv2/core.hpp" 11 12 //! @addtogroup imgcodecs_macosx 13 //! @{ 14 15 CV_EXPORTS CGImageRef MatToCGImage(const cv::Mat& image) CF_RETURNS_RETAINED; 16 CV_EXPORTS void CGImageToMat(const CGImageRef image, cv::Mat& m, bool alphaExist = false); 17 CV_EXPORTS NSImage* MatToNSImage(const cv::Mat& image); 18 CV_EXPORTS void NSImageToMat(const NSImage* image, cv::Mat& m, bool alphaExist = false); 19 20 //! @}