Frame Data#

Defined in framework ScanditCaptureCore

SDCChannel#

Added in version 6.0.0

Enumeration of possible channel types.

SDCChannelY#

Added in version 6.0.0

Luminance (Y) or gray-scale channel

SDCChannelU#

Added in version 6.0.0

SDCChannelV#

Added in version 6.0.0

SDCChannelR#

Added in version 6.0.0

Red channel

SDCChannelG#

Added in version 6.0.0

Green channel

SDCChannelB#

Added in version 6.0.0

Blue channel

SDCChannelA#

Added in version 6.0.0

Alpha channel

SDCFrameData#
@protocol SDCFrameData <NSObject>

Added in version 6.0.0

Interface for holding frame data from one or more sources (cameras). The concrete type is tied to the frame source that produces the frames.

The frame data contains one or more image buffers, each of which may have different sizes. Each frame data is guaranteed to have at least one image buffer. Only frame sources that combine the input of multiple frame sources will have more than one image buffer. The images buffers can have different sizes.

A frame contains the pixel data as well as layout of one particular frame. Frames are immutable and reference counted, so they can be shared by multiple consumers. The frame is returned to the pool (recycled) when all consumers release the frame.

imageBuffers#
@property (nonatomic, nonnull, readonly) NSArray<SDCImageBuffer *> *imageBuffers

Added in version 6.0.0

The image buffers contained in this frame data.

SDCImagePlane#
@interface SDCImagePlane : NSObject

Added in version 6.0.0

An individual image plane as part of an image buffer. The image plane data may or may not be interleaved with other image planes.

channel#
@property (nonatomic, readonly) SDCChannel channel

Added in version 6.0.0

data#
@property (nonatomic, nonnull, readonly) uint8_t *data

Added in version 6.0.0

The bytes used by this image plane. For interleaved image planes, parts of the bytes exposed this property may not be part of this plane and belong to other planes. For example, for an SDCImageBuffer with red, green and blue planes using an interleaved layout, only every third byte belongs to the red image plane.

The life-time of the data is tied to the life-time of the SDCImageBuffer, which for image buffers belonging to frame data is bound to the life-time of the SDCFrameData instance.

subsamplingX#
@property (nonatomic, readonly) NSUInteger subsamplingX

Added in version 6.0.0

The amount of subsampling (in pixels in X-direction). For image plane with the exception of U and V planes, the subsampling in both x and y will be 1 (meaning no subsampling). A subsampling of 2 indicates that two horizontally adjacent pixels share the same pixel data.

subsamplingY#
@property (nonatomic, readonly) NSUInteger subsamplingY

Added in version 6.0.0

The amount of subsampling (in pixels in Y-direction). For image plane with the exception of U and V planes, the subsampling in both x and y will be 1 (meaning no subsampling). A subsampling of 2 indicates that two vertically adjacent pixels share the same pixel data.

rowStride#
@property (nonatomic, readonly) NSUInteger rowStride

Added in version 6.0.0

The number of bytes of a row of pixels. For example, an RGB image will typically have a row stride of 3 * width, with potential padding at the end to match mulitples of 4.

pixelStride#
@property (nonatomic, readonly) NSUInteger pixelStride

Added in version 6.0.0

Number of bytes between two adjacent pixels part of the same image plane. In case of subsampling, this value is the number of bytes per pixel as if there were no subsampling. For example, for a non-interleaved U plane subsampled at 2, the element stride is 1.

SDCImageBuffer#
@interface SDCImageBuffer : NSObject

Added in version 6.0.0

An image buffer consists of one or more images planes that describe how the memory is laid out. Instances of this class don’t own the data, rather the data is owned by another class (typically a SDCFrameData instance).

width#
@property (nonatomic, readonly) NSUInteger width

Added in version 6.0.0

Width of the image buffer in pixels (non-subsampled).

height#
@property (nonatomic, readonly) NSUInteger height

Added in version 6.0.0

Height of the image buffer in pixels (non-subsampled).

planes#
@property (nonatomic, nonnull, readonly) NSArray<SDCImagePlane *> *planes

Added in version 6.0.0

List of planes that this image buffer holds. The data used by these image planes may or may not be part of the same block of memory.

image#
@property (nonatomic, nullable, readonly) UIImage *image

Added in version 6.7.0

Converts the video frame to a UIImage that can be visualized in the UI, or stored on disk. The returned image has the same dimensions as the video frame.

- toUIImage#
- (nullable UIImage *)toUIImage

Added in version 6.1.0

Converts the video frame to a UIImage that can be visualized in the UI, or stored on disk.

The returned image has the same dimensions as the video frame.