mirror of
https://github.com/opencv/opencv.git
synced 2024-12-15 18:09:11 +08:00
33 lines
698 B
Objective-C
33 lines
698 B
Objective-C
//
|
|
// Mat+Converters.h
|
|
//
|
|
// Created by Masaya Tsuruta on 2020/10/08.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
#import "opencv2/core.hpp"
|
|
#else
|
|
#define CV_EXPORTS
|
|
#endif
|
|
|
|
#import "Mat.h"
|
|
#import <Foundation/Foundation.h>
|
|
#import <AppKit/AppKit.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
CV_EXPORTS @interface MatConverters : NSObject
|
|
|
|
+(CGImageRef)convertMatToCGImageRef:(Mat*)mat CF_RETURNS_RETAINED;
|
|
+(Mat*)convertCGImageRefToMat:(CGImageRef)image;
|
|
+(Mat*)convertCGImageRefToMat:(CGImageRef)image alphaExist:(BOOL)alphaExist;
|
|
+(NSImage*)converMatToNSImage:(Mat*)mat;
|
|
+(Mat*)convertNSImageToMat:(NSImage*)image;
|
|
+(Mat*)convertNSImageToMat:(NSImage*)image alphaExist:(BOOL)alphaExist;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|