This class is responsible for the encoding of an image into an eVision.ECodedImage2 object. More...
Public Member Functions | |
| None | __init__ (self) |
| Constructs an image encoder. | |
| None | __init__ (self, eVision.EImageEncoder other) |
| Constructs an image encoder. | |
| None | CopyTo (self, eVision.EImageEncoder other) |
| Copies the current eVision.EImageEncoder into another. | |
| None | Serialize (self, eVision.ESerializer|None serializer) |
| Serializes the eVision.EImageEncoder. | |
| None | Load (self, str path) |
| Loads the eVision.EImageEncoder. | |
| None | Load (self, eVision.ESerializer|None serializer) |
| Loads the eVision.EImageEncoder. | |
| None | Save (self, str path) |
| Saves the eVision.EImageEncoder. | |
| None | Save (self, eVision.ESerializer|None serializer) |
| Saves the eVision.EImageEncoder. | |
| None | ResetContinuousMode (self) |
| Resets the continuous mode, emptying the internal memory. | |
| None | FlushContinuousMode (self, eVision.ECodedImage2 codedImage) |
| Resets the continuous mode, emptying the internal memory, after writing the objects that are not yet completed in a coded image. | |
| None | Encode (self, eVision.EROIBW8 sourceImage, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| None | Encode (self, eVision.EROIBW16 sourceImage, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| None | Encode (self, eVision.EROIC24 sourceImage, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| None | Encode (self, eVision.EROIBW8 sourceImage, eVision.EROIBW8 inputMask, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| None | Encode (self, eVision.EROIBW16 sourceImage, eVision.EROIBW8 inputMask, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| None | Encode (self, eVision.EROIC24 sourceImage, eVision.EROIBW8 inputMask, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| None | Encode (self, eVision.EROIBW8 sourceImage, eVision.ERegion region, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| None | Encode (self, eVision.EROIBW16 sourceImage, eVision.ERegion region, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| None | Encode (self, eVision.EROIC24 sourceImage, eVision.ERegion region, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| None | Encode (self, eVision.EROIBW8 sourceImage, eVision.EFrame frame, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| None | Encode (self, eVision.EROIBW16 sourceImage, eVision.EFrame frame, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| None | Encode (self, eVision.EROIC24 sourceImage, eVision.EFrame frame, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| None | Encode (self, eVision.EROIBW8 sourceImage, eVision.ERegion region, eVision.EFrame frame, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| None | Encode (self, eVision.EROIBW16 sourceImage, eVision.ERegion region, eVision.EFrame frame, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| None | Encode (self, eVision.EROIC24 sourceImage, eVision.ERegion region, eVision.EFrame frame, eVision.ECodedImage2 codedImage) |
| Encodes an image or an ROI as a coded image. | |
| eVision.ESegmentationMethod | SegmentationMethod (self) |
| Segmentation method used during the encoding. | |
| SegmentationMethod (self, eVision.ESegmentationMethod value) | |
| Segmentation method used during the encoding. | |
| eVision.Segmenters.EColorRangeThresholdSegmenter | ColorRangeThresholdSegmenter (self) |
| Returns a reference to the internal instance of the segmenter for color-range thresholding, in order to set its parameters. | |
| eVision.Segmenters.EColorSingleThresholdSegmenter | ColorSingleThresholdSegmenter (self) |
| Returns a reference to the internal instance of the segmenter for single color thresholding, in order to set its parameters. | |
| eVision.Segmenters.EGrayscaleDoubleThresholdSegmenter | GrayscaleDoubleThresholdSegmenter (self) |
| Returns a reference to the internal instance of the segmenter for double color thresholding, in order to set its parameters. | |
| eVision.Segmenters.EGrayscaleSingleThresholdSegmenter | GrayscaleSingleThresholdSegmenter (self) |
| Returns a reference to the internal instance of the segmenter for single grayscale thresholding, in order to set its parameters. | |
| eVision.Segmenters.EImageRangeSegmenter | ImageRangeSegmenter (self) |
| 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 (self) |
| 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 (self) |
| 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 (self) |
| Connexity mode. | |
| EncodingConnexity (self, eVision.EEncodingConnexity value) | |
| Connexity mode. | |
| bool | ContinuousModeEnabled (self) |
| Continuous mode enabling status. | |
| ContinuousModeEnabled (self, bool value) | |
| Continuous mode enabling status. | |
| int | ContinuousModeMaxHeight (self) |
| Maximum number of rows that are kept in memory in the continuous mode. | |
| ContinuousModeMaxHeight (self, int value) | |
| Maximum number of rows that are kept in memory in the continuous mode. | |
This class is responsible for the encoding of an image into an eVision.ECodedImage2 object.
Remarks:
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
| None eVision.EImageEncoder.__init__ | ( | self | ) |
Constructs an image encoder.
| None eVision.EImageEncoder.__init__ | ( | self, | |
| eVision.EImageEncoder | other ) |
Constructs an image encoder.
| other | The other eVision.EImageEncoder that we will copy into this one. |
| eVision.Segmenters.EColorRangeThresholdSegmenter eVision.EImageEncoder.ColorRangeThresholdSegmenter | ( | self | ) |
Returns a reference to the internal instance of the segmenter for color-range thresholding, in order to set its parameters.
| eVision.Segmenters.EColorSingleThresholdSegmenter eVision.EImageEncoder.ColorSingleThresholdSegmenter | ( | self | ) |
Returns a reference to the internal instance of the segmenter for single color thresholding, in order to set its parameters.
| bool eVision.EImageEncoder.ContinuousModeEnabled | ( | self | ) |
Continuous mode enabling status.
Remarks:
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.
| eVision.EImageEncoder.ContinuousModeEnabled | ( | self, | |
| bool | value ) |
Continuous mode enabling status.
Remarks:
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.
| int eVision.EImageEncoder.ContinuousModeMaxHeight | ( | self | ) |
Maximum number of rows that are kept in memory in the continuous mode.
Remarks:
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).
| eVision.EImageEncoder.ContinuousModeMaxHeight | ( | self, | |
| int | value ) |
Maximum number of rows that are kept in memory in the continuous mode.
Remarks:
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).
| None eVision.EImageEncoder.CopyTo | ( | self, | |
| eVision.EImageEncoder | other ) |
Copies the current eVision.EImageEncoder into another.
| other | The other eVision.EImageEncoder that we will copy this one into. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIBW16 | sourceImage, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| codedImage | The coded image that will hold the result of the encoding process. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIBW16 | sourceImage, | ||
| eVision.EFrame | frame, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| frame | Frame of reference. It is used to compute some features of the coded elements. The region must also be defined in this frame of reference. |
| codedImage | The coded image that will hold the result of the encoding process. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIBW16 | sourceImage, | ||
| eVision.ERegion | region, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| region | Region of the input image that is to be encoded. |
| codedImage | The coded image that will hold the result of the encoding process. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIBW16 | sourceImage, | ||
| eVision.ERegion | region, | ||
| eVision.EFrame | frame, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| region | Region of the input image that is to be encoded. |
| frame | Frame of reference. It is used to compute some features of the coded elements. The region must also be defined in this frame of reference. |
| codedImage | The coded image that will hold the result of the encoding process. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIBW16 | sourceImage, | ||
| eVision.EROIBW8 | inputMask, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| inputMask | The 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. |
| codedImage | The coded image that will hold the result of the encoding process. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIBW8 | sourceImage, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| codedImage | The coded image that will hold the result of the encoding process. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIBW8 | sourceImage, | ||
| eVision.EFrame | frame, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| frame | Frame of reference. It is used to compute some features of the coded elements. The region must also be defined in this frame of reference. |
| codedImage | The coded image that will hold the result of the encoding process. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIBW8 | sourceImage, | ||
| eVision.ERegion | region, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| region | Region of the input image that is to be encoded. |
| codedImage | The coded image that will hold the result of the encoding process. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIBW8 | sourceImage, | ||
| eVision.ERegion | region, | ||
| eVision.EFrame | frame, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| region | Region of the input image that is to be encoded. |
| frame | Frame of reference. It is used to compute some features of the coded elements. The region must also be defined in this frame of reference. |
| codedImage | The coded image that will hold the result of the encoding process. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIBW8 | sourceImage, | ||
| eVision.EROIBW8 | inputMask, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| inputMask | The 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. |
| codedImage | The coded image that will hold the result of the encoding process. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIC24 | sourceImage, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| codedImage | The coded image that will hold the result of the encoding process. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIC24 | sourceImage, | ||
| eVision.EFrame | frame, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| frame | Frame of reference. It is used to compute some features of the coded elements. The region must also be defined in this frame of reference. |
| codedImage | The coded image that will hold the result of the encoding process. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIC24 | sourceImage, | ||
| eVision.ERegion | region, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| region | Region of the input image that is to be encoded. |
| codedImage | The coded image that will hold the result of the encoding process. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIC24 | sourceImage, | ||
| eVision.ERegion | region, | ||
| eVision.EFrame | frame, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| region | Region of the input image that is to be encoded. |
| frame | Frame of reference. It is used to compute some features of the coded elements. The region must also be defined in this frame of reference. |
| codedImage | The coded image that will hold the result of the encoding process. |
| None eVision.EImageEncoder.Encode | ( | self, | |
| eVision.EROIC24 | sourceImage, | ||
| eVision.EROIBW8 | inputMask, | ||
| eVision.ECodedImage2 | codedImage ) |
Encodes an image or an ROI as a coded image.
Remarks:
The previous content of the result coded image is discarded.
| sourceImage | The input image that is to be encoded. |
| inputMask | The 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. |
| codedImage | The coded image that will hold the result of the encoding process. |
| eVision.EEncodingConnexity eVision.EImageEncoder.EncodingConnexity | ( | self | ) |
Connexity mode.
Remarks:
The connexity mode specifies the conditions that must hold for neighboring pixels to belong to the same object.
| eVision.EImageEncoder.EncodingConnexity | ( | self, | |
| eVision.EEncodingConnexity | value ) |
Connexity mode.
Remarks:
The connexity mode specifies the conditions that must hold for neighboring pixels to belong to the same object.
| None eVision.EImageEncoder.FlushContinuousMode | ( | self, | |
| eVision.ECodedImage2 | codedImage ) |
Resets the continuous mode, emptying the internal memory, after writing the objects that are not yet completed in a coded image.
| codedImage | The coded image in which the not-yet-completed objects are written. |
| eVision.Segmenters.EGrayscaleDoubleThresholdSegmenter eVision.EImageEncoder.GrayscaleDoubleThresholdSegmenter | ( | self | ) |
Returns a reference to the internal instance of the segmenter for double color thresholding, in order to set its parameters.
| eVision.Segmenters.EGrayscaleSingleThresholdSegmenter eVision.EImageEncoder.GrayscaleSingleThresholdSegmenter | ( | self | ) |
Returns a reference to the internal instance of the segmenter for single grayscale thresholding, in order to set its parameters.
| eVision.Segmenters.EImageRangeSegmenter eVision.EImageEncoder.ImageRangeSegmenter | ( | self | ) |
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 eVision.EImageEncoder.LabeledImageSegmenter | ( | self | ) |
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.
| None eVision.EImageEncoder.Load | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Loads the eVision.EImageEncoder.
The given eVision.ESerializer must have been created for reading.
| serializer | The serializer. |
| None eVision.EImageEncoder.Load | ( | self, | |
| str | path ) |
Loads the eVision.EImageEncoder.
The given eVision.ESerializer must have been created for reading.
| path | The file path. |
| eVision.Segmenters.EReferenceImageSegmenter eVision.EImageEncoder.ReferenceImageSegmenter | ( | self | ) |
Returns a reference to the internal instance of the segmenter for single pixel-by-pixel thresholding, in order to set its parameters.
| None eVision.EImageEncoder.ResetContinuousMode | ( | self | ) |
Resets the continuous mode, emptying the internal memory.
| None eVision.EImageEncoder.Save | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Saves the eVision.EImageEncoder.
The given eVision.ESerializer must have been created for writing.
| serializer | The eVision.ESerializer object that is written to. |
| None eVision.EImageEncoder.Save | ( | self, | |
| str | path ) |
Saves the eVision.EImageEncoder.
The given eVision.ESerializer must have been created for writing.
| path | The file path. |
| eVision.ESegmentationMethod eVision.EImageEncoder.SegmentationMethod | ( | self | ) |
Segmentation method used during the encoding.
| eVision.EImageEncoder.SegmentationMethod | ( | self, | |
| eVision.ESegmentationMethod | value ) |
Segmentation method used during the encoding.
| None eVision.EImageEncoder.Serialize | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Serializes the eVision.EImageEncoder.
Use eVision.EImageEncoder.Save or eVision.EImageEncoder.Load instead.
Deprecated in version 24.10. Scheduled to be removed in version 27.6.
| serializer | Serializer |