Table of Contents

Class Slice

Namespace
Bonsai.Dsp
Assembly
Bonsai.Dsp.dll

Represents an operator that splits each array in the sequence into multiple sub-arrays along the specified dimension.

[Combinator]
public class Slice
Inheritance
Slice
Inherited Members

Properties

Axis

Gets or sets the dimension along which to slice the array.

public int Axis { get; set; }

Property Value

int

Count

Gets or sets the number of elements in each slice.

public int Count { get; set; }

Property Value

int

Skip

Gets or sets the number of elements to skip between the creation of each slice. If it is not specified, it will be set to the number of elements in each slice.

public int? Skip { get; set; }

Property Value

int?

Methods

Process(IObservable<IplImage>)

Splits each image in an observable sequence into multiple sub-images along the specified dimension.

public IObservable<IplImage> Process(IObservable<IplImage> source)

Parameters

source IObservable<IplImage>

A sequence of image values.

Returns

IObservable<IplImage>

A sequence of image values, where each image represents a slice of the original image, along the specified direction, with the specified number of elements.

Remarks

If Count is smaller than the size of the images, this operator will return multiple sub-images for each image in the source sequence.

Process(IObservable<Mat>)

Splits each matrix in an observable sequence into multiple sub-matrices along the specified dimension.

public IObservable<Mat> Process(IObservable<Mat> source)

Parameters

source IObservable<Mat>

A sequence of 2D matrix values.

Returns

IObservable<Mat>

A sequence of 2D matrix values, where each matrix represents a slice of the original matrix, along the specified direction, with the specified number of elements.

Remarks

If Count is smaller than the size of the matrices, this operator will return multiple sub-matrices for each matrix in the source sequence.