Mat+Converters.h 653 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // Mat+Converters.h
  3. //
  4. // Created by Giles Payne on 2020/03/03.
  5. //
  6. #pragma once
  7. #ifdef __cplusplus
  8. #import "opencv2/core.hpp"
  9. #else
  10. #define CV_EXPORTS
  11. #endif
  12. #import "Mat.h"
  13. #import <Foundation/Foundation.h>
  14. #import <UIKit/UIKit.h>
  15. NS_ASSUME_NONNULL_BEGIN
  16. CV_EXPORTS @interface Mat (Converters)
  17. -(CGImageRef)toCGImage CF_RETURNS_RETAINED;
  18. -(instancetype)initWithCGImage:(CGImageRef)image;
  19. -(instancetype)initWithCGImage:(CGImageRef)image alphaExist:(BOOL)alphaExist;
  20. -(UIImage*)toUIImage;
  21. -(instancetype)initWithUIImage:(UIImage*)image;
  22. -(instancetype)initWithUIImage:(UIImage*)image alphaExist:(BOOL)alphaExist;
  23. @end
  24. NS_ASSUME_NONNULL_END