eVision .NET API
Loading...
Searching...
No Matches
eVision.EImageEncoder Class Reference

This class is responsible for the encoding of an image into an ECodedImage2 object. More...

Inheritance diagram for eVision.EImageEncoder:
Collaboration diagram for eVision.EImageEncoder:

Public Member Functions

 EImageEncoder ()
 Constructs an image encoder.
 EImageEncoder (eVision.EImageEncoder other)
 Constructs an image encoder.
void CopyTo (eVision.EImageEncoder other)
 Copies the current EImageEncoder into another.
virtual void Serialize (eVision.ESerializer serializer)
 Serializes the EImageEncoder.
virtual void Load (string path)
 Loads the EImageEncoder. The given ESerializer must have been created for reading.
virtual void Load (eVision.ESerializer serializer)
 Loads the EImageEncoder. The given ESerializer must have been created for reading.
virtual void Save (string path)
 Saves the EImageEncoder. The given ESerializer must have been created for writing.
virtual void Save (eVision.ESerializer serializer)
 Saves the EImageEncoder. The given ESerializer must have been created for writing.
void ResetContinuousMode ()
 Resets the continuous mode, emptying the internal memory.
void FlushContinuousMode (eVision.ECodedImage2 codedImage)
 Resets the continuous mode, emptying the internal memory, after writing the objects that are not yet completed in a coded image.
void Encode (eVision.EROIBW8 sourceImage, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.
void Encode (eVision.EROIBW16 sourceImage, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.
void Encode (eVision.EROIC24 sourceImage, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.
void Encode (eVision.EROIBW8 sourceImage, eVision.EROIBW8 inputMask, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.
void Encode (eVision.EROIBW16 sourceImage, eVision.EROIBW8 inputMask, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.
void Encode (eVision.EROIC24 sourceImage, eVision.EROIBW8 inputMask, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.
void Encode (eVision.EROIBW8 sourceImage, eVision.ERegion region, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.
void Encode (eVision.EROIBW16 sourceImage, eVision.ERegion region, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.
void Encode (eVision.EROIC24 sourceImage, eVision.ERegion region, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.
void Encode (eVision.EROIBW8 sourceImage, eVision.EFrame frame, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.
void Encode (eVision.EROIBW16 sourceImage, eVision.EFrame frame, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.
void Encode (eVision.EROIC24 sourceImage, eVision.EFrame frame, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.
void Encode (eVision.EROIBW8 sourceImage, eVision.ERegion region, eVision.EFrame frame, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.
void Encode (eVision.EROIBW16 sourceImage, eVision.ERegion region, eVision.EFrame frame, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.
void Encode (eVision.EROIC24 sourceImage, eVision.ERegion region, eVision.EFrame frame, eVision.ECodedImage2 codedImage)
 Encodes an image or an ROI as a coded image.

Properties

eVision.ESegmentationMethod SegmentationMethod [get, set]
 Segmentation method used during the encoding.
eVision.Segmenters.EColorRangeThresholdSegmenter ColorRangeThresholdSegmenter [get]
 Returns a reference to the internal instance of the segmenter for color-range thresholding, in order to set its parameters.
eVision.Segmenters.EColorSingleThresholdSegmenter ColorSingleThresholdSegmenter [get]
 Returns a reference to the internal instance of the segmenter for single color thresholding, in order to set its parameters.
eVision.Segmenters.EGrayscaleDoubleThresholdSegmenter GrayscaleDoubleThresholdSegmenter [get]
 Returns a reference to the internal instance of the segmenter for double color thresholding, in order to set its parameters.
eVision.Segmenters.EGrayscaleSingleThresholdSegmenter GrayscaleSingleThresholdSegmenter [get]
 Returns a reference to the internal instance of the segmenter for single grayscale thresholding, in order to set its parameters.
eVision.Segmenters.EImageRangeSegmenter ImageRangeSegmenter [get]
 Returns a reference to the internal instance of the segmenter for pixel-by-pixel, range-based thresholding, in order to set its parameters.
eVision.Segmenters.ELabeledImageSegmenter LabeledImageSegmenter [get]
 Returns a reference to the internal instance of the segmenter that maps the value of the pixels directly to a layer index, in order to set its parameters.
eVision.Segmenters.EReferenceImageSegmenter ReferenceImageSegmenter [get]
 Returns a reference to the internal instance of the segmenter for single pixel-by-pixel thresholding, in order to set its parameters.
eVision.EEncodingConnexity EncodingConnexity [get, set]
 Connexity mode.
bool ContinuousModeEnabled [get, set]
 Continuous mode enabling status.
uint ContinuousModeMaxHeight [get, set]
 Maximum number of rows that are kept in memory in the continuous mode.

Detailed Description

This class is responsible for the encoding of an image into an ECodedImage2 object.

This class is responsible for the extraction of the runs in a source image, the aggregation of the runs into objects, as well as the proper handling of the continuous mode. It also provides methods to configure the image segmentation process.

The segmentation process classifies the pixels of the source image according to their value to create a set of layers. In each layer taken separately, the encoding process then assembles the connected pixels to build the coded elements (blobs).

By default, the segmentation method consists of grayscale single thresholding, with automatic threshold selection (as determined by the minimum residue rule).

License(s): EasyObject

Constructor & Destructor Documentation

◆ EImageEncoder() [1/2]

eVision.EImageEncoder.EImageEncoder ( )

Constructs an image encoder.

◆ EImageEncoder() [2/2]

eVision.EImageEncoder.EImageEncoder ( eVision.EImageEncoder other)

Constructs an image encoder.

Parameters
otherThe other EImageEncoder that we will copy into this one.

Member Function Documentation

◆ CopyTo()

void eVision.EImageEncoder.CopyTo ( eVision.EImageEncoder other)

Copies the current EImageEncoder into another.

Parameters
otherThe other EImageEncoder that we will copy this one into.

◆ Encode() [1/15]

void eVision.EImageEncoder.Encode ( eVision.EROIBW16 sourceImage,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ Encode() [2/15]

void eVision.EImageEncoder.Encode ( eVision.EROIBW16 sourceImage,
eVision.EFrame frame,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
frameFrame of reference. It is used to compute some features of the coded elements. The region must also be defined in this frame of reference.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ Encode() [3/15]

void eVision.EImageEncoder.Encode ( eVision.EROIBW16 sourceImage,
eVision.ERegion region,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
regionRegion of the input image that is to be encoded.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ Encode() [4/15]

void eVision.EImageEncoder.Encode ( eVision.EROIBW16 sourceImage,
eVision.ERegion region,
eVision.EFrame frame,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
regionRegion of the input image that is to be encoded.
frameFrame of reference. It is used to compute some features of the coded elements. The region must also be defined in this frame of reference.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ Encode() [5/15]

void eVision.EImageEncoder.Encode ( eVision.EROIBW16 sourceImage,
eVision.EROIBW8 inputMask,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
inputMaskThe possible input Flexible Mask that restricts the encoding. The input mask is a grayscale image having the same height and the same width as the source image. Any pixel in the source image that is covered by a value of 0 in the input mask will not get encoded in any layer. Any other pixel value in the input mask causes the pixel to be a candidate for the encoding.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ Encode() [6/15]

void eVision.EImageEncoder.Encode ( eVision.EROIBW8 sourceImage,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ Encode() [7/15]

void eVision.EImageEncoder.Encode ( eVision.EROIBW8 sourceImage,
eVision.EFrame frame,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
frameFrame of reference. It is used to compute some features of the coded elements. The region must also be defined in this frame of reference.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ Encode() [8/15]

void eVision.EImageEncoder.Encode ( eVision.EROIBW8 sourceImage,
eVision.ERegion region,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
regionRegion of the input image that is to be encoded.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ Encode() [9/15]

void eVision.EImageEncoder.Encode ( eVision.EROIBW8 sourceImage,
eVision.ERegion region,
eVision.EFrame frame,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
regionRegion of the input image that is to be encoded.
frameFrame of reference. It is used to compute some features of the coded elements. The region must also be defined in this frame of reference.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ Encode() [10/15]

void eVision.EImageEncoder.Encode ( eVision.EROIBW8 sourceImage,
eVision.EROIBW8 inputMask,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
inputMaskThe possible input Flexible Mask that restricts the encoding. The input mask is a grayscale image having the same height and the same width as the source image. Any pixel in the source image that is covered by a value of 0 in the input mask will not get encoded in any layer. Any other pixel value in the input mask causes the pixel to be a candidate for the encoding.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ Encode() [11/15]

void eVision.EImageEncoder.Encode ( eVision.EROIC24 sourceImage,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ Encode() [12/15]

void eVision.EImageEncoder.Encode ( eVision.EROIC24 sourceImage,
eVision.EFrame frame,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
frameFrame of reference. It is used to compute some features of the coded elements. The region must also be defined in this frame of reference.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ Encode() [13/15]

void eVision.EImageEncoder.Encode ( eVision.EROIC24 sourceImage,
eVision.ERegion region,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
regionRegion of the input image that is to be encoded.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ Encode() [14/15]

void eVision.EImageEncoder.Encode ( eVision.EROIC24 sourceImage,
eVision.ERegion region,
eVision.EFrame frame,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
regionRegion of the input image that is to be encoded.
frameFrame of reference. It is used to compute some features of the coded elements. The region must also be defined in this frame of reference.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ Encode() [15/15]

void eVision.EImageEncoder.Encode ( eVision.EROIC24 sourceImage,
eVision.EROIBW8 inputMask,
eVision.ECodedImage2 codedImage )

Encodes an image or an ROI as a coded image.

Parameters
sourceImageThe input image that is to be encoded.
inputMaskThe possible input Flexible Mask that restricts the encoding. The input mask is a grayscale image having the same height and the same width as the source image. Any pixel in the source image that is covered by a value of 0 in the input mask will not get encoded in any layer. Any other pixel value in the input mask causes the pixel to be a candidate for the encoding.
codedImageThe coded image that will hold the result of the encoding process.

The previous content of the result coded image is discarded.

◆ FlushContinuousMode()

void eVision.EImageEncoder.FlushContinuousMode ( eVision.ECodedImage2 codedImage)

Resets the continuous mode, emptying the internal memory, after writing the objects that are not yet completed in a coded image.

Parameters
codedImageThe coded image in which the not-yet-completed objects are written.

◆ Load() [1/2]

virtual void eVision.EImageEncoder.Load ( eVision.ESerializer serializer)
virtual

Loads the EImageEncoder. The given ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ Load() [2/2]

virtual void eVision.EImageEncoder.Load ( string path)
virtual

Loads the EImageEncoder. The given ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ ResetContinuousMode()

void eVision.EImageEncoder.ResetContinuousMode ( )

Resets the continuous mode, emptying the internal memory.

◆ Save() [1/2]

virtual void eVision.EImageEncoder.Save ( eVision.ESerializer serializer)
virtual

Saves the EImageEncoder. The given ESerializer must have been created for writing.

Parameters
serializerThe ESerializer object that is written to.

◆ Save() [2/2]

virtual void eVision.EImageEncoder.Save ( string path)
virtual

Saves the EImageEncoder. The given ESerializer must have been created for writing.

Parameters
pathThe file path.

◆ Serialize()

virtual void eVision.EImageEncoder.Serialize ( eVision.ESerializer serializer)
virtual

Serializes the EImageEncoder.

Parameters
serializerSerializer
Deprecated

Use EImageEncoder.Save or EImageEncoder.Load instead.

Deprecated in version 24.10. Scheduled to be removed in version 27.6.

Property Documentation

◆ ColorRangeThresholdSegmenter

eVision.Segmenters.EColorRangeThresholdSegmenter eVision.EImageEncoder.ColorRangeThresholdSegmenter
get

Returns a reference to the internal instance of the segmenter for color-range thresholding, in order to set its parameters.

◆ ColorSingleThresholdSegmenter

eVision.Segmenters.EColorSingleThresholdSegmenter eVision.EImageEncoder.ColorSingleThresholdSegmenter
get

Returns a reference to the internal instance of the segmenter for single color thresholding, in order to set its parameters.

◆ ContinuousModeEnabled

bool eVision.EImageEncoder.ContinuousModeEnabled
getset

Continuous mode enabling status.

In the continuous mode, objects are constructed over a sequence of images: The image encoder encodes only the objects that contain no run touching the last row of the source image. The objects touching the inferior border of the image are not written in the coded image: These objects are indeed expected to continue in the subsequent image chunks. Such objects are kept in memory, and are consumed when analyzing the subsequent images.

◆ ContinuousModeMaxHeight

uint eVision.EImageEncoder.ContinuousModeMaxHeight
getset

Maximum number of rows that are kept in memory in the continuous mode.

This property can be used to put a bound on the size of the internal memory of the image encoder in the continuous mode. If this property is set to zero, then memory can grow arbitrarily (there is no maximum number of rows).

◆ EncodingConnexity

eVision.EEncodingConnexity eVision.EImageEncoder.EncodingConnexity
getset

Connexity mode.

The connexity mode specifies the conditions that must hold for neighboring pixels to belong to the same object.

◆ GrayscaleDoubleThresholdSegmenter

eVision.Segmenters.EGrayscaleDoubleThresholdSegmenter eVision.EImageEncoder.GrayscaleDoubleThresholdSegmenter
get

Returns a reference to the internal instance of the segmenter for double color thresholding, in order to set its parameters.

◆ GrayscaleSingleThresholdSegmenter

eVision.Segmenters.EGrayscaleSingleThresholdSegmenter eVision.EImageEncoder.GrayscaleSingleThresholdSegmenter
get

Returns a reference to the internal instance of the segmenter for single grayscale thresholding, in order to set its parameters.

◆ ImageRangeSegmenter

eVision.Segmenters.EImageRangeSegmenter eVision.EImageEncoder.ImageRangeSegmenter
get

Returns a reference to the internal instance of the segmenter for pixel-by-pixel, range-based thresholding, in order to set its parameters.

◆ LabeledImageSegmenter

eVision.Segmenters.ELabeledImageSegmenter eVision.EImageEncoder.LabeledImageSegmenter
get

Returns a reference to the internal instance of the segmenter that maps the value of the pixels directly to a layer index, in order to set its parameters.

◆ ReferenceImageSegmenter

eVision.Segmenters.EReferenceImageSegmenter eVision.EImageEncoder.ReferenceImageSegmenter
get

Returns a reference to the internal instance of the segmenter for single pixel-by-pixel thresholding, in order to set its parameters.

◆ SegmentationMethod

eVision.ESegmentationMethod eVision.EImageEncoder.SegmentationMethod
getset

Segmentation method used during the encoding.