CvType
Objective-C
@interface CvType : NSObject
Swift
class CvType : NSObject
Utility functions for handling CvType values
-
Create CvType value from depth and channel values
Declaration
Objective-C
+ (int)makeType:(int)depth channels:(int)channels;
Swift
class func make(_ depth: Int32, channels: Int32) -> Int32
Parameters
depth
Depth value. One of CV_8U, CV_8S, CV_16U, CV_16S, CV_32S, CV_32F or CV_64F
channels
Number of channels (from 1 to (CV_CN_MAX - 1))
-
Get number of channels for type
Declaration
Objective-C
+ (int)channels:(int)type;
Swift
class func channels(_ type: Int32) -> Int32
Parameters
type
Type value
-
Get depth for type
Declaration
Objective-C
+ (int)depth:(int)type;
Swift
class func depth(_ type: Int32) -> Int32
Parameters
type
Type value
-
Get raw type size in bytes for type
Declaration
Objective-C
+ (int)rawTypeSize:(int)type;
Swift
class func rawTypeSize(_ type: Int32) -> Int32
Parameters
type
Type value
-
Returns true if the raw type is an integer type (if depth is CV_8U, CV_8S, CV_16U, CV_16S or CV_32S)
Declaration
Objective-C
+ (BOOL)isInteger:(int)type;
Swift
class func isInteger(_ type: Int32) -> Bool
Parameters
type
Type value
-
Get element size in bytes for type
Declaration
Objective-C
+ (int)ELEM_SIZE:(int)type;
Swift
class func elemSize(_ type: Int32) -> Int32
Parameters
type
Type value
-
Get the string name for type
Declaration
Objective-C
+ (nonnull NSString *)typeToString:(int)type;
Swift
class func type(toString type: Int32) -> String
Parameters
type
Type value
-
Declaration
Swift
static let CV_8U: Int32
-
Declaration
Swift
static let CV_8S: Int32
-
Declaration
Swift
static let CV_16U: Int32
-
Declaration
Swift
static let CV_16S: Int32
-
Declaration
Swift
static let CV_32S: Int32
-
Declaration
Swift
static let CV_32F: Int32
-
Declaration
Swift
static let CV_64F: Int32
-
Declaration
Swift
static let CV_16F: Int32
-
Declaration
Swift
static let CV_8UC1: Int32
-
Declaration
Swift
static let CV_8UC2: Int32
-
Declaration
Swift
static let CV_8UC3: Int32
-
Declaration
Swift
static let CV_8UC4: Int32
-
Declaration
Swift
static let CV_8SC1: Int32
-
Declaration
Swift
static let CV_8SC2: Int32
-
Declaration
Swift
static let CV_8SC3: Int32
-
Declaration
Swift
static let CV_8SC4: Int32
-
Declaration
Swift
static let CV_16UC1: Int32
-
Declaration
Swift
static let CV_16UC2: Int32
-
Declaration
Swift
static let CV_16UC3: Int32
-
Declaration
Swift
static let CV_16UC4: Int32
-
Declaration
Swift
static let CV_16SC1: Int32
-
Declaration
Swift
static let CV_16SC2: Int32
-
Declaration
Swift
static let CV_16SC3: Int32
-
Declaration
Swift
static let CV_16SC4: Int32
-
Declaration
Swift
static let CV_32SC1: Int32
-
Declaration
Swift
static let CV_32SC2: Int32
-
Declaration
Swift
static let CV_32SC3: Int32
-
Declaration
Swift
static let CV_32SC4: Int32
-
Declaration
Swift
static let CV_32FC1: Int32
-
Declaration
Swift
static let CV_32FC2: Int32
-
Declaration
Swift
static let CV_32FC3: Int32
-
Declaration
Swift
static let CV_32FC4: Int32
-
Declaration
Swift
static let CV_64FC1: Int32
-
Declaration
Swift
static let CV_64FC2: Int32
-
Declaration
Swift
static let CV_64FC3: Int32
-
Declaration
Swift
static let CV_64FC4: Int32
-
Declaration
Swift
static let CV_16FC1: Int32
-
Declaration
Swift
static let CV_16FC2: Int32
-
Declaration
Swift
static let CV_16FC3: Int32
-
Declaration
Swift
static let CV_16FC4: Int32
-
Declaration
Swift
static let CV_CN_MAX: Int
-
Declaration
Swift
static let CV_CN_SHIFT: Int
-
Declaration
Swift
static let CV_DEPTH_MAX: Int
-
Declaration
Swift
static func CV_8UC(_ channels: Int32) -> Int32
-
Declaration
Swift
static func CV_8SC(_ channels: Int32) -> Int32
-
Declaration
Swift
static func CV_16UC(_ channels: Int32) -> Int32
-
Declaration
Swift
static func CV_16SC(_ channels: Int32) -> Int32
-
Declaration
Swift
static func CV_32SC(_ channels: Int32) -> Int32
-
Declaration
Swift
static func CV_32FC(_ channels: Int32) -> Int32
-
Declaration
Swift
static func CV_64FC(_ channels: Int32) -> Int32
-
Declaration
Swift
static func CV_16FC(_ channels: Int32) -> Int32