StructuredLightPattern

Objective-C

@interface StructuredLightPattern : Algorithm

Swift

class StructuredLightPattern : Algorithm

Abstract base class for generating and decoding structured light patterns.

Member of Structured_light

Methods

  • Decodes the structured light pattern, generating a disparity map

    Declaration

    Objective-C

    - (BOOL)decode:(nonnull NSArray<NSArray<Mat *> *> *)patternImages
        disparityMap:(nonnull Mat *)disparityMap
         blackImages:(nonnull NSArray<Mat *> *)blackImages
         whiteImages:(nonnull NSArray<Mat *> *)whiteImages
               flags:(int)flags;

    Swift

    func decode(patternImages: [[Mat]], disparityMap: Mat, blackImages: [Mat], whiteImages: [Mat], flags: Int32) -> Bool

    Parameters

    patternImages

    The acquired pattern images to decode (vector>), loaded as grayscale and previously rectified.

    disparityMap

    The decoding result: a CV_64F Mat at image resolution, storing the computed disparity map.

    blackImages

    The all-black images needed for shadowMasks computation.

    whiteImages

    The all-white images needed for shadowMasks computation.

    flags

    Flags setting decoding algorithms. Default: DECODE_3D_UNDERWORLD.

    Note

    All the images must be at the same resolution.

  • Decodes the structured light pattern, generating a disparity map

    Declaration

    Objective-C

    - (BOOL)decode:(nonnull NSArray<NSArray<Mat *> *> *)patternImages
        disparityMap:(nonnull Mat *)disparityMap
         blackImages:(nonnull NSArray<Mat *> *)blackImages
         whiteImages:(nonnull NSArray<Mat *> *)whiteImages;

    Swift

    func decode(patternImages: [[Mat]], disparityMap: Mat, blackImages: [Mat], whiteImages: [Mat]) -> Bool

    Parameters

    patternImages

    The acquired pattern images to decode (vector>), loaded as grayscale and previously rectified.

    disparityMap

    The decoding result: a CV_64F Mat at image resolution, storing the computed disparity map.

    blackImages

    The all-black images needed for shadowMasks computation.

    whiteImages

    The all-white images needed for shadowMasks computation.

    Note

    All the images must be at the same resolution.

  • Decodes the structured light pattern, generating a disparity map

    Declaration

    Objective-C

    - (BOOL)decode:(nonnull NSArray<NSArray<Mat *> *> *)patternImages
        disparityMap:(nonnull Mat *)disparityMap
         blackImages:(nonnull NSArray<Mat *> *)blackImages;

    Swift

    func decode(patternImages: [[Mat]], disparityMap: Mat, blackImages: [Mat]) -> Bool

    Parameters

    patternImages

    The acquired pattern images to decode (vector>), loaded as grayscale and previously rectified.

    disparityMap

    The decoding result: a CV_64F Mat at image resolution, storing the computed disparity map.

    blackImages

    The all-black images needed for shadowMasks computation.

    Note

    All the images must be at the same resolution.

  • Decodes the structured light pattern, generating a disparity map

    Declaration

    Objective-C

    - (BOOL)decode:(nonnull NSArray<NSArray<Mat *> *> *)patternImages
        disparityMap:(nonnull Mat *)disparityMap;

    Swift

    func decode(patternImages: [[Mat]], disparityMap: Mat) -> Bool

    Parameters

    patternImages

    The acquired pattern images to decode (vector>), loaded as grayscale and previously rectified.

    disparityMap

    The decoding result: a CV_64F Mat at image resolution, storing the computed disparity map.

    Note

    All the images must be at the same resolution.

  • Generates the structured light pattern to project.

    Declaration

    Objective-C

    - (BOOL)generate:(nonnull NSMutableArray<Mat *> *)patternImages;

    Swift

    func generate(patternImages: NSMutableArray) -> Bool

    Parameters

    patternImages

    The generated pattern: a vector, in which each image is a CV_8U Mat at projector’s resolution.