CameraObject

Objective-C


@interface CameraObject : NSObject

Swift

class CameraObject : NSObject

This class encapsulates camera information.

  • New camera object.

    Declaration

    Objective-C

    + (nullable CameraObject *)createCamera:(NSInteger)timestamp
                              configuration:(CameraConfig)configuration
                                     buffer:(nonnull void *)buffer
                                 bufferType:(DirectBufferType)bufferType
                                 bufferSize:(NSInteger)bufferSize
                         allowReleaseBuffer:(BOOL)allowRelease;

    Swift

    class func createCamera(_ timestamp: Int, configuration: CameraConfig, buffer: UnsafeMutableRawPointer, bufferType: DirectBufferType, bufferSize: Int, allowReleaseBuffer allowRelease: Bool) -> CameraObject?

    Parameters

    timestamp

    The acquisition timestamp.

    configuration

    The camera configuration structure.

    buffer

    The camera buffer data.

    bufferType

    The camera buffer data type.

  • Creates a CameraConfig instance with the specified parameters.

    Declaration

    Objective-C

    + (CameraConfig)createCameraConfiguration:(double)horizontalFOV
                                  verticalFOV:(double)verticalFOV
                                   frameWidth:(int)frameWidth
                                  frameHeight:(int)frameHeight
                                  pixelFormat:(ImagePixelFormat)pixelFormat
                                    frameRate:(double)frameRate
                                  orientation:(OrientationType)orientation
                        focalLengthHorizontal:(float)focalLengthHorizontal
                          focalLengthVertical:(float)focalLengthVertical
                           focalLengthMinimum:(float)focalLengthMinimum
                          physicalSensorWidth:(float)physicalSensorWidth
                         physicalSensorHeight:(float)physicalSensorHeight
                                     exposure:(double)exposure
                                  minExposure:(double)minExposure
                                  maxExposure:(double)maxExposure
                         exposureTargetOffset:(double)exposureTargetOffset
                                     isoValue:(double)isoValue
                                       minIso:(double)minIso
                                       maxIso:(double)maxIso;

    Swift

    class func createCameraConfiguration(_ horizontalFOV: Double, verticalFOV: Double, frameWidth: Int32, frameHeight: Int32, pixelFormat: ImagePixelFormat, frameRate: Double, orientation: OrientationType, focalLengthHorizontal: Float, focalLengthVertical: Float, focalLengthMinimum: Float, physicalSensorWidth: Float, physicalSensorHeight: Float, exposure: Double, minExposure: Double, maxExposure: Double, exposureTargetOffset: Double, isoValue: Double, minIso: Double, maxIso: Double) -> CameraConfig

    Parameters

    horizontalFOV

    Horizontal Field Of View in radians.

    verticalFOV

    Vertical Field Of View in radians.

    frameWidth

    Frame width in pixels.

    frameHeight

    Frame height in pixels.

    pixelFormat

    The pixel format (encoding type).

    frameRate

    The frame rate value.

    orientation

    The frame orientation.

    focalLengthHorizontal

    The horizontal focal length in pixels.

    focalLengthVertical

    The vertical focal length in pixels.

    focalLengthMinimum

    The minimum possible focal length in millimeters.

    physicalSensorWidth

    The physical sensor width in millimeters.

    physicalSensorHeight

    The physical sensor height in millimeters.

    exposure

    Exposure in nanoseconds.

    minExposure

    The minimum possible exposure in nanoseconds.

    maxExposure

    The maximum possible exposure in nanoseconds.

    exposureTargetOffset

    The exposure target offset in EV units.

    isoValue

    The actual ISO value in ISO arithmetic units.

    minIso

    The minimum possible ISO value in ISO arithmetic units.

    maxIso

    The maximum possible ISO value in ISO arithmetic units.

    Return Value

    A CameraConfig instance initialized with the provided parameters.

  • Initializes and returns a newly allocated object using the model data.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithModelData:(nonnull void *)data;
  • Returns the model data.

    Declaration

    Objective-C

    - (nonnull void *)getModelData;
  • Initializes and returns a newly allocated object using the data object.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDataObject:(nonnull DataObject *)data;

    Swift

    init(dataObject data: DataObject)
  • Returns the model data object.

    Declaration

    Objective-C

    - (nullable DataObject *)getDataObject;

    Swift

    func getDataObject() -> DataObject?
  • Get the camera configuration.

    Declaration

    Objective-C

    - (CameraConfig)getCameraConfiguration;

    Swift

    func getCameraConfiguration() -> CameraConfig
  • Get the direct buffer as uint8*, independent of platform.

    Declaration

    Objective-C

    - (nullable void *)getBuffer;

    Swift

    func getBuffer() -> UnsafeMutableRawPointer?
  • Get the buffer size.

    Declaration

    Objective-C

    - (NSUInteger)getBufferSize;

    Swift

    func getBufferSize() -> UInt
  • Get the raw buffer.

    Declaration

    Objective-C

    - (nullable void *)getDirectBuffer;

    Swift

    func getDirectBuffer() -> UnsafeMutableRawPointer?
  • Get direct buffer type.

    Declaration

    Objective-C

    - (DirectBufferType)getDirectBufferType;

    Swift

    func getDirectBufferType() -> DirectBufferType