2020-10-15 00:58:06 +08:00
|
|
|
//
|
|
|
|
// Mat+Converters.h
|
|
|
|
//
|
|
|
|
// Created by Masaya Tsuruta on 2020/10/08.
|
|
|
|
//
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2020-11-15 06:04:57 +08:00
|
|
|
#import "opencv2/core.hpp"
|
2020-10-15 00:58:06 +08:00
|
|
|
#else
|
|
|
|
#define CV_EXPORTS
|
|
|
|
#endif
|
|
|
|
|
2020-11-15 06:04:57 +08:00
|
|
|
#import "Mat.h"
|
2020-10-15 00:58:06 +08:00
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import <AppKit/AppKit.h>
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
CV_EXPORTS @interface Mat (Converters)
|
|
|
|
|
2020-11-20 05:20:32 +08:00
|
|
|
-(CGImageRef)toCGImage CF_RETURNS_RETAINED;
|
2020-10-15 00:58:06 +08:00
|
|
|
-(instancetype)initWithCGImage:(CGImageRef)image;
|
|
|
|
-(instancetype)initWithCGImage:(CGImageRef)image alphaExist:(BOOL)alphaExist;
|
|
|
|
-(NSImage*)toNSImage;
|
|
|
|
-(instancetype)initWithNSImage:(NSImage*)image;
|
|
|
|
-(instancetype)initWithNSImage:(NSImage*)image alphaExist:(BOOL)alphaExist;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|