Table of Contents

Class CropCenter

Namespace
Bonsai.Vision
Assembly
Bonsai.Vision.dll

Represents an operator that crops rectangular regions with fixed size around the specified center for each image in the sequence.

public class CropCenter : Transform<IplImage, IplImage>
Inheritance
CropCenter
Inherited Members

Properties

FillValue

Gets or sets a Scalar specifying the value to which all pixels that fall outside image boundaries will be set to.

public Scalar FillValue { get; set; }

Property Value

Scalar

Size

Gets or sets a value specifying the size of the region of interest to crop from the image.

public Size Size { get; set; }

Property Value

Size

Methods

Process(IObservable<IplImage>)

Crops a rectangular region with fixed size around the center of each image in an observable sequence.

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

Parameters

source IObservable<IplImage>

The sequence of images to crop.

Returns

IObservable<IplImage>

A sequence of images representing the cropped rectangular regions.

Process(IObservable<Tuple<IplImage, ConnectedComponentCollection>>)

Crops a collection of rectangular regions with fixed size around the center of each connected component for each image in an observable sequence.

public IObservable<IplImage[]> Process(IObservable<Tuple<IplImage, ConnectedComponentCollection>> source)

Parameters

source IObservable<Tuple<IplImage, ConnectedComponentCollection>>

A sequence of pairs representing the image and the ConnectedComponentCollection specifying the centroids used to crop the rectangular regions.

Returns

IObservable<IplImage[]>

A sequence of image arrays representing the rectangular regions cropped around each of the connected components.

Process(IObservable<Tuple<IplImage, ConnectedComponent>>)

Crops a rectangular region with fixed size around the center of the specified connected component for each image in an observable sequence.

public IObservable<IplImage> Process(IObservable<Tuple<IplImage, ConnectedComponent>> source)

Parameters

source IObservable<Tuple<IplImage, ConnectedComponent>>

A sequence of pairs representing the image and the ConnectedComponent around which to crop the rectangular region.

Returns

IObservable<IplImage>

A sequence of images representing the rectangular region cropped around the centroid of the specified connected component.

Process(IObservable<Tuple<IplImage, Point2f>>)

Crops a rectangular region with fixed size around the specified center for each image in an observable sequence.

public IObservable<IplImage> Process(IObservable<Tuple<IplImage, Point2f>> source)

Parameters

source IObservable<Tuple<IplImage, Point2f>>

A sequence of pairs representing the image and a 2D position with single-precision floating-point coordinates around which to crop the rectangular region.

Returns

IObservable<IplImage>

A sequence of images representing the rectangular region cropped around each of the specified positions.

Process(IObservable<Tuple<IplImage, Point>>)

Crops a rectangular region with fixed size around the specified center for each image in an observable sequence.

public IObservable<IplImage> Process(IObservable<Tuple<IplImage, Point>> source)

Parameters

source IObservable<Tuple<IplImage, Point>>

A sequence of pairs representing the image and a 2D position with integer coordinates around which to crop the rectangular region.

Returns

IObservable<IplImage>

A sequence of images representing the rectangular region cropped around each of the specified positions.