SyntheticSequenceGenerator

Objective-C

@interface SyntheticSequenceGenerator : Algorithm

Swift

class SyntheticSequenceGenerator : Algorithm

Synthetic frame sequence generator for testing background subtraction algorithms.

It will generate the moving object on top of the background. It will apply some distortion to the background to make the test more complex.

Member of Bgsegm

Methods

  • Creates an instance of SyntheticSequenceGenerator.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithBackground:(nonnull Mat *)background
                                        object:(nonnull Mat *)object
                                     amplitude:(double)amplitude
                                    wavelength:(double)wavelength
                                     wavespeed:(double)wavespeed
                                      objspeed:(double)objspeed;

    Swift

    init(background: Mat, object: Mat, amplitude: Double, wavelength: Double, wavespeed: Double, objspeed: Double)

    Parameters

    background

    Background image for object.

    object

    Object image which will move slowly over the background.

    amplitude

    Amplitude of wave distortion applied to background.

    wavelength

    Length of waves in distortion applied to background.

    wavespeed

    How fast waves will move.

    objspeed

    How fast object will fly over background.

  • Obtain the next frame in the sequence.

    Declaration

    Objective-C

    - (void)getNextFrame:(nonnull Mat *)frame gtMask:(nonnull Mat *)gtMask;

    Swift

    func getNextFrame(frame: Mat, gtMask: Mat)

    Parameters

    frame

    Output frame.

    gtMask

    Output ground-truth (reference) segmentation mask object/background.