mirror of
https://github.com/opencv/opencv.git
synced 2024-12-11 22:59:16 +08:00
02385472b6
Objc binding * Initial work on Objective-C wrapper * Objective-C generator script; update manually generated wrappers * Add Mat tests * Core Tests * Imgproc wrapper generation and tests * Fixes for Imgcodecs wrapper * Miscellaneous fixes. Swift build support * Objective-C wrapper build/install * Add Swift wrappers for videoio/objdetect/feature2d * Framework build;iOS support * Fix toArray functions;Use enum types whenever possible * Use enum types where possible;prepare test build * Update test * Add test runner scripts for iOS and macOS * Add test scripts and samples * Build fixes * Fix build (cmake 3.17.x compatibility) * Fix warnings * Fix enum name conflicting handling * Add support for document generation with Jazzy * Swift/Native fast accessor functions * Add Objective-C wrapper for calib3d, dnn, ml, photo and video modules * Remove IntOut/FloatOut/DoubleOut classes * Fix iOS default test platform value * Fix samples * Revert default framework name to opencv2 * Add converter util functions * Fix failing test * Fix whitespace * Add handling for deprecated methods;fix warnings;define __OPENCV_BUILD * Suppress cmake warnings * Reduce severity of "jazzy not found" log message * Fix incorrect #include of compatibility header in ios.h * Use explicit returns in subscript/get implementation * Reduce minimum required cmake version to 3.15 for Objective-C/Swift binding
67 lines
1.3 KiB
Objective-C
67 lines
1.3 KiB
Objective-C
//
|
|
// Moments.h
|
|
//
|
|
// Created by Giles Payne on 2019/10/06.
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
#import "opencv.hpp"
|
|
#endif
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface Moments : NSObject
|
|
|
|
@property double m00;
|
|
@property double m10;
|
|
@property double m01;
|
|
@property double m20;
|
|
@property double m11;
|
|
@property double m02;
|
|
@property double m30;
|
|
@property double m21;
|
|
@property double m12;
|
|
@property double m03;
|
|
|
|
@property double mu20;
|
|
@property double mu11;
|
|
@property double mu02;
|
|
@property double mu30;
|
|
@property double mu21;
|
|
@property double mu12;
|
|
@property double mu03;
|
|
|
|
@property double nu20;
|
|
@property double nu11;
|
|
@property double nu02;
|
|
@property double nu30;
|
|
@property double nu21;
|
|
@property double nu12;
|
|
@property double nu03;
|
|
|
|
#ifdef __cplusplus
|
|
@property(readonly) cv::Moments& nativeRef;
|
|
#endif
|
|
|
|
-(instancetype)initWithM00:(double)m00 m10:(double)m10 m01:(double)m01 m20:(double)m20 m11:(double)m11 m02:(double)m02 m30:(double)m30 m21:(double)m21 m12:(double)m12 m03:(double)m03;
|
|
|
|
-(instancetype)init;
|
|
|
|
-(instancetype)initWithVals:(NSArray<NSNumber*>*)vals;
|
|
|
|
#ifdef __cplusplus
|
|
+(instancetype)fromNative:(cv::Moments&)moments;
|
|
#endif
|
|
|
|
-(void)set:(NSArray<NSNumber*>*)vals;
|
|
-(void)completeState;
|
|
-(NSString *)description;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|