mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
fix build of dynamic framework for visionos
This commit is contained in:
parent
2eedec7479
commit
fdc7cb6dc1
@ -15,7 +15,7 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
#ifdef AVAILABLE_IMGCODECS
|
#ifdef AVAILABLE_IMGCODECS
|
||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE || TARGET_OS_VISION
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#elif TARGET_OS_MAC
|
#elif TARGET_OS_MAC
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
@ -197,7 +197,7 @@ CV_EXPORTS @interface Mat : NSObject
|
|||||||
- (instancetype)initWithCGImage:(CGImageRef)image;
|
- (instancetype)initWithCGImage:(CGImageRef)image;
|
||||||
- (instancetype)initWithCGImage:(CGImageRef)image alphaExist:(BOOL)alphaExist;
|
- (instancetype)initWithCGImage:(CGImageRef)image alphaExist:(BOOL)alphaExist;
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE || TARGET_OS_VISION
|
||||||
|
|
||||||
- (UIImage*)toUIImage;
|
- (UIImage*)toUIImage;
|
||||||
- (instancetype)initWithUIImage:(UIImage*)image;
|
- (instancetype)initWithUIImage:(UIImage*)image;
|
||||||
|
@ -951,7 +951,7 @@ template<typename T> int putData(NSArray<NSNumber*>* indices, cv::Mat* mat, int
|
|||||||
return [MatConverters convertCGImageRefToMat:image alphaExist:alphaExist];
|
return [MatConverters convertCGImageRefToMat:image alphaExist:alphaExist];
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE || TARGET_OS_VISION
|
||||||
|
|
||||||
-(UIImage*)toUIImage {
|
-(UIImage*)toUIImage {
|
||||||
return [MatConverters converMatToUIImage:self];
|
return [MatConverters converMatToUIImage:self];
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
//
|
//
|
||||||
//M*/
|
//M*/
|
||||||
#include <TargetConditionals.h>
|
#include <TargetConditionals.h>
|
||||||
#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
|
#if (TARGET_OS_IOS || TARGET_OS_VISION) && !TARGET_OS_MACCATALYST
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#include "apple_conversions.h"
|
#include "apple_conversions.h"
|
||||||
|
@ -221,18 +221,18 @@ cv::Ptr<cv::IVideoCapture> cv::create_AVFoundation_capture_file(const std::strin
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !TARGET_OS_VISION
|
|
||||||
|
|
||||||
cv::Ptr<cv::IVideoCapture> cv::create_AVFoundation_capture_cam(int index)
|
cv::Ptr<cv::IVideoCapture> cv::create_AVFoundation_capture_cam(int index)
|
||||||
{
|
{
|
||||||
|
#if !TARGET_OS_VISION
|
||||||
CvCaptureCAM* retval = new CvCaptureCAM(index);
|
CvCaptureCAM* retval = new CvCaptureCAM(index);
|
||||||
if (retval->didStart())
|
if (retval->didStart())
|
||||||
return cv::makePtr<cv::LegacyCapture>(retval);
|
return cv::makePtr<cv::LegacyCapture>(retval);
|
||||||
delete retval;
|
delete retval;
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cv::Ptr<cv::IVideoWriter> cv::create_AVFoundation_writer(const std::string& filename, int fourcc,
|
cv::Ptr<cv::IVideoWriter> cv::create_AVFoundation_writer(const std::string& filename, int fourcc,
|
||||||
double fps, const cv::Size &frameSize,
|
double fps, const cv::Size &frameSize,
|
||||||
|
Loading…
Reference in New Issue
Block a user