The eVision.EFourierImage class is used to represent rectangular regions of interest inside eVision.EBW32f gray-level images. More...
Public Member Functions | |
| None | __init__ (self) |
| Constructs a eVision.EFourierImage image. | |
| None | __init__ (self, eVision.EFrequentialDomainFormat domainFormat) |
| Constructs a eVision.EFourierImage image. | |
| None | __init__ (self, eVision.EFrequentialDomainFormat domainFormat, int width, int height) |
| Constructs a eVision.EFourierImage image. | |
| None | __init__ (self, eVision.EFrequentialDomainFormat domainFormat, int width, int height, eVision.EBW32f constant) |
| Constructs a eVision.EFourierImage image. | |
| None | __init__ (self, eVision.EFourierImage other) |
| Constructs a eVision.EFourierImage image. | |
| None | InitializeFromUnalignedBuffer (self, int width, int height, ctypes.c_void_p buffer, int pitch) |
| Initializes image from an unaligned buffer. | |
| None | InitializeFromUnalignedBuffer (self, int width, int height, ctypes.c_void_p buffer) |
| Initializes image from an unaligned buffer. | |
| None | ComputeMagnitude (self, eVision.EImageBW8 dest) |
| Computes and outputs the magnitude of each pixel into a new image. | |
| None | ComputeMagnitude (self, eVision.EImageBW32f dest) |
| Computes and outputs the magnitude of each pixel into a new image. | |
| None | ComputePhase (self, eVision.EImageBW8 dest) |
| Computes and outputs the phase of each pixel into a new image. | |
| None | ComputePhase (self, eVision.EImageBW32f dest) |
| Computes and outputs the phase of each pixel into a new image. | |
| None | Shift (self) |
| Rearranges this Fourier transform by shifting the zero-frequency component to the center of the image. | |
| None | Shift (self, eVision.EFourierImage dest) |
| Rearranges this Fourier transform by shifting the zero-frequency component to the center of the image. | |
| None | Mask (self, eVision.EFourierImage dest, eVision.ERegion mask) |
| Applies a mask, an element wise multiplication between pixel values of the mask (represented as a grayscale image) with the complex number of the fourier image. | |
| None | Mask (self, eVision.EFourierImage dest, eVision.EImageBW8 region) |
| Applies a mask, an element wise multiplication between pixel values of the mask (represented as a grayscale image) with the complex number of the fourier image. | |
| None | InverseShift (self) |
| Inverses rearrangement of eVision.EFourierImage.Shift. | |
| None | InverseShift (self, eVision.EFourierImage dest) |
| Inverses rearrangement of eVision.EFourierImage.Shift. | |
| None | ExtractReal (self, eVision.EImageBW32f dest) |
| Extract the real components. | |
| None | ExtractImaginary (self, eVision.EImageBW32f dest) |
| Extract the imaginary components. | |
| ctypes.c_void_p | GetImagePtr (self) |
| Returns a pointer to the pixel buffer. | |
| None | Save (self, str path) |
| Save the eVision.EFourierImage object to the given file. | |
| None | Save (self, eVision.ESerializer|None serializer) |
| Save the eVision.EFourierImage object to the given file. | |
| None | Load (self, str path) |
| Load the eVision.EFourierImage object from the given file. | |
| None | Load (self, eVision.ESerializer|None serializer) |
| Load the eVision.EFourierImage object from the given file. | |
| None | Load (self, str path, eVision.EFrequentialDomainFormat domainFormat) |
| Restores an image stored in the given file. | |
| None | SaveImage (self, str path) |
| Saves the content of this complex image to a Tiff file. | |
| None | SetImagePtr (self, int width, int height, ctypes.c_void_p imagePointer, eVision.EFrequentialDomainFormat domainFormat, int bitsPerRow) |
| Sets the pointer to an externally allocated image buffer. | |
| None | SetImagePtr (self, int width, int height, ctypes.c_void_p imagePointer, eVision.EFrequentialDomainFormat domainFormat) |
| Sets the pointer to an externally allocated image buffer. | |
| None | UseExternalBuffer (self, int width, int height, ctypes.c_void_p buffer, eVision.EFrequentialDomainFormat domainFormat, int rowPitch) |
| Sets the pointer to an externally allocated image buffer. | |
| None | SetSize (self, int width, int height) |
| Sets the width and height. | |
| bool | IsVoid (self) |
| Tests whether if the topmost parent image of this hierarchy has a zero size. | |
| None | CopyTo (self, eVision.EFourierImage other) |
| Copies all the data of the current eVision.EFourierImage object into another eVision.EFourierImage object. | |
| eVision.EFrequentialDomainFormat | FrequentialDomainFormat (self) |
| Returns the frequential domain format. | |
| int | RowPitch (self) |
| Gets the pitch of a row (the number of bytes between two vertically adjacent pixels). | |
| int | ColPitch (self) |
| Gets the pitch of a column (number of bytes between two horizontally adjacent pixels). | |
| int | Width (self) |
| Gets the width of the underlying image. | |
| int | Height (self) |
| Gets the height of the underlying image. | |
| int | BitsPerPixel (self) |
| Gets the number of storage bits per pixel. | |
| int | PlanesPerPixel (self) |
| Gets the number of color components in each pixel of the image. | |
| eVision.EImageType | Type (self) |
| Gets the image pixel type, as defined by the EImageType enumeration. | |
Static Public Member Functions | |
| None | ShiftMask (eVision.ERegion region, eVision.ERegion shiftedRegion, int regionWidth, int regionHeight) |
| Shifts the mask that can be a region or a grayscale image. | |
| None | ShiftMask (eVision.EImageBW8 mask, eVision.EImageBW8 shiftedMask) |
| Shifts the mask that can be a region or a grayscale image. | |
Protected Member Functions | |
| _IsShifted__setter (self, bool value) | |
| Sets whether the image has been shifted by eVision.EFourierImage.Shift. | |
Properties | |
| IsShifted | |
The eVision.EFourierImage class is used to represent rectangular regions of interest inside eVision.EBW32f gray-level images.
See ROIs.
Remarks:
License(s): BasicTypes
| None eVision.EFourierImage.__init__ | ( | self | ) |
Constructs a eVision.EFourierImage image.
Remarks:
The constructor with no arguments creates a zero-sized image. You can modify the image size by calling eVision.EBaseROI.SetSize method.
The sizing constructor constructs an image of the given size. See eVision.EBaseROI.SetSize for informations about the sizing restrictions.
The copy constructor copies all the supplied image properties (content, attributes, sub-ROIs...) into the current object. Note that if you used eVision.EFourierImage.UseExternalBuffer to assign an external buffer to the image, that buffer will not be copied, the resulting image will just point to the same buffer as the original.
| None eVision.EFourierImage.__init__ | ( | self, | |
| eVision.EFrequentialDomainFormat | domainFormat ) |
Constructs a eVision.EFourierImage image.
Remarks:
The constructor with no arguments creates a zero-sized image. You can modify the image size by calling eVision.EBaseROI.SetSize method.
The sizing constructor constructs an image of the given size. See eVision.EBaseROI.SetSize for informations about the sizing restrictions.
The copy constructor copies all the supplied image properties (content, attributes, sub-ROIs...) into the current object. Note that if you used eVision.EFourierImage.UseExternalBuffer to assign an external buffer to the image, that buffer will not be copied, the resulting image will just point to the same buffer as the original.
| domainFormat | The eVision.EFrequentialDomainFormat of the eVision.EFourierImage. |
| None eVision.EFourierImage.__init__ | ( | self, | |
| eVision.EFrequentialDomainFormat | domainFormat, | ||
| int | width, | ||
| int | height ) |
Constructs a eVision.EFourierImage image.
Remarks:
The constructor with no arguments creates a zero-sized image. You can modify the image size by calling eVision.EBaseROI.SetSize method.
The sizing constructor constructs an image of the given size. See eVision.EBaseROI.SetSize for informations about the sizing restrictions.
The copy constructor copies all the supplied image properties (content, attributes, sub-ROIs...) into the current object. Note that if you used eVision.EFourierImage.UseExternalBuffer to assign an external buffer to the image, that buffer will not be copied, the resulting image will just point to the same buffer as the original.
| domainFormat | The eVision.EFrequentialDomainFormat of the eVision.EFourierImage. |
| width | The width, in pixels. |
| height | The height, in pixels. |
| None eVision.EFourierImage.__init__ | ( | self, | |
| eVision.EFrequentialDomainFormat | domainFormat, | ||
| int | width, | ||
| int | height, | ||
| eVision.EBW32f | constant ) |
Constructs a eVision.EFourierImage image.
Remarks:
The constructor with no arguments creates a zero-sized image. You can modify the image size by calling eVision.EBaseROI.SetSize method.
The sizing constructor constructs an image of the given size. See eVision.EBaseROI.SetSize for informations about the sizing restrictions.
The copy constructor copies all the supplied image properties (content, attributes, sub-ROIs...) into the current object. Note that if you used eVision.EFourierImage.UseExternalBuffer to assign an external buffer to the image, that buffer will not be copied, the resulting image will just point to the same buffer as the original.
| domainFormat | The eVision.EFrequentialDomainFormat of the eVision.EFourierImage. |
| width | The width, in pixels. |
| height | The height, in pixels. |
| constant | Gray-level constant. |
| None eVision.EFourierImage.__init__ | ( | self, | |
| eVision.EFourierImage | other ) |
Constructs a eVision.EFourierImage image.
Remarks:
The constructor with no arguments creates a zero-sized image. You can modify the image size by calling eVision.EBaseROI.SetSize method.
The sizing constructor constructs an image of the given size. See eVision.EBaseROI.SetSize for informations about the sizing restrictions.
The copy constructor copies all the supplied image properties (content, attributes, sub-ROIs...) into the current object. Note that if you used eVision.EFourierImage.UseExternalBuffer to assign an external buffer to the image, that buffer will not be copied, the resulting image will just point to the same buffer as the original.
| other | Another eVision.EFourierImage object. |
|
protected |
Sets whether the image has been shifted by eVision.EFourierImage.Shift.
| int eVision.EFourierImage.BitsPerPixel | ( | self | ) |
Gets the number of storage bits per pixel.
| int eVision.EFourierImage.ColPitch | ( | self | ) |
Gets the pitch of a column (number of bytes between two horizontally adjacent pixels).
| None eVision.EFourierImage.ComputeMagnitude | ( | self, | |
| eVision.EImageBW32f | dest ) |
Computes and outputs the magnitude of each pixel into a new image.
A normalization is applied when outputting a eVision.EImageBW8 image so that every magnitude values lies inside the [0; 255] range. This is useful when visualizing.
| dest | The image that will contain the magnitude. |
| None eVision.EFourierImage.ComputeMagnitude | ( | self, | |
| eVision.EImageBW8 | dest ) |
Computes and outputs the magnitude of each pixel into a new image.
A normalization is applied when outputting a eVision.EImageBW8 image so that every magnitude values lies inside the [0; 255] range. This is useful when visualizing.
| dest | The image that will contain the magnitude. |
| None eVision.EFourierImage.ComputePhase | ( | self, | |
| eVision.EImageBW32f | dest ) |
Computes and outputs the phase of each pixel into a new image.
A normalization is applied when outputting into a eVision.EImageBW8 image so that every magnitude values lie inside the [0; 255] range. This is useful when visualizing.
| dest | The image that will contain the phase. |
| None eVision.EFourierImage.ComputePhase | ( | self, | |
| eVision.EImageBW8 | dest ) |
Computes and outputs the phase of each pixel into a new image.
A normalization is applied when outputting into a eVision.EImageBW8 image so that every magnitude values lie inside the [0; 255] range. This is useful when visualizing.
| dest | The image that will contain the phase. |
| None eVision.EFourierImage.CopyTo | ( | self, | |
| eVision.EFourierImage | other ) |
Copies all the data of the current eVision.EFourierImage object into another eVision.EFourierImage object.
| other | An eVision.EFourierImage object in which the current eVision.EFourierImage object data have to be copied. |
| None eVision.EFourierImage.ExtractImaginary | ( | self, | |
| eVision.EImageBW32f | dest ) |
Extract the imaginary components.
When the frequential domain format is extended, this is equivalent to extract all columns whose indices are odd. If the format is EFrequentialDomainFormat_Packed, an implicit conversion to the extended format is applied before extracting.
| dest | Image contains the real components |
| None eVision.EFourierImage.ExtractReal | ( | self, | |
| eVision.EImageBW32f | dest ) |
Extract the real components.
When the frequential domain format is extended, this is equivalent to extract all columns whose indices are even. If the format is EFrequentialDomainFormat_Packed, an implicit conversion to the extended format is applied before extracting.
| dest | Image contains the real components |
| eVision.EFrequentialDomainFormat eVision.EFourierImage.FrequentialDomainFormat | ( | self | ) |
Returns the frequential domain format.
| ctypes.c_void_p eVision.EFourierImage.GetImagePtr | ( | self | ) |
Returns a pointer to the pixel buffer.
| int eVision.EFourierImage.Height | ( | self | ) |
Gets the height of the underlying image.
| None eVision.EFourierImage.InitializeFromUnalignedBuffer | ( | self, | |
| int | width, | ||
| int | height, | ||
| ctypes.c_void_p | buffer ) |
Initializes image from an unaligned buffer.
Remarks:
The image will be initialized to fit the width and height passed as arguments. The contents of the buffer will then be copied into the image. The buffer contents must be compatible with the pixel type of the image.
| width | Width of the image in the buffer. |
| height | Height of the image in the buffer. |
| buffer | Address of the buffer. |
| None eVision.EFourierImage.InitializeFromUnalignedBuffer | ( | self, | |
| int | width, | ||
| int | height, | ||
| ctypes.c_void_p | buffer, | ||
| int | pitch ) |
Initializes image from an unaligned buffer.
Remarks:
The image will be initialized to fit the width and height passed as arguments. The contents of the buffer will then be copied into the image. The buffer contents must be compatible with the pixel type of the image.
| width | Width of the image in the buffer. |
| height | Height of the image in the buffer. |
| buffer | Address of the buffer. |
| pitch | Pitch of the buffer (in bytes). If omitted, the method assumes there is no padding (the pitch is assumed be equal (width * sizeOfAPixel)) |
| None eVision.EFourierImage.InverseShift | ( | self | ) |
Inverses rearrangement of eVision.EFourierImage.Shift.
Shift and InverseShift can only be applied on an EFourierImage when its format is EFrequentialDomainFormat_ComplexExtended. Will throw an exception if it's not the case. Will throw an exception if the method is applied on an image that hasn't been shifted first with eVision.EFourierImage.Shift.
Remarks:
When not referencing an image, the method is applied in-place.
| None eVision.EFourierImage.InverseShift | ( | self, | |
| eVision.EFourierImage | dest ) |
Inverses rearrangement of eVision.EFourierImage.Shift.
Shift and InverseShift can only be applied on an EFourierImage when its format is EFrequentialDomainFormat_ComplexExtended. Will throw an exception if it's not the case. Will throw an exception if the method is applied on an image that hasn't been shifted first with eVision.EFourierImage.Shift.
Remarks:
When not referencing an image, the method is applied in-place.
| dest | The image that will contain the shifted image. |
| bool eVision.EFourierImage.IsVoid | ( | self | ) |
Tests whether if the topmost parent image of this hierarchy has a zero size.
| None eVision.EFourierImage.Load | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Load the eVision.EFourierImage object from the given file.
Object is loaded assuming the file is in Euresys proprietary format.
| serializer | The eVision.ESerializer file-like object that is read from. |
| None eVision.EFourierImage.Load | ( | self, | |
| str | path ) |
Load the eVision.EFourierImage object from the given file.
Object is loaded assuming the file is in Euresys proprietary format.
| path | The full path of the file to be loaded. |
| None eVision.EFourierImage.Load | ( | self, | |
| str | path, | ||
| eVision.EFrequentialDomainFormat | domainFormat ) |
Restores an image stored in the given file.
| path | Full path of the file. |
| domainFormat | Frequential domain format of the loaded image. |
| None eVision.EFourierImage.Mask | ( | self, | |
| eVision.EFourierImage | dest, | ||
| eVision.EImageBW8 | region ) |
Applies a mask, an element wise multiplication between pixel values of the mask (represented as a grayscale image) with the complex number of the fourier image.
When using a region as a mask, element of this fourier image contained in the region coordinates will be nullified.
Remarks:
The mask is expected to have the same dimension as the spatial image used to compute this fourier transform result. The masking of a packed EFourierImage and the masking of a complex extended EFourierImage computed from the direct fourier transform of the same image yield an equivalent EFourierImage only if:
| dest | Masked frequency image. |
| region | Region to use as a mask. |
| None eVision.EFourierImage.Mask | ( | self, | |
| eVision.EFourierImage | dest, | ||
| eVision.ERegion | mask ) |
Applies a mask, an element wise multiplication between pixel values of the mask (represented as a grayscale image) with the complex number of the fourier image.
When using a region as a mask, element of this fourier image contained in the region coordinates will be nullified.
Remarks:
The mask is expected to have the same dimension as the spatial image used to compute this fourier transform result. The masking of a packed EFourierImage and the masking of a complex extended EFourierImage computed from the direct fourier transform of the same image yield an equivalent EFourierImage only if:
| dest | Masked frequency image. |
| mask | Grayscale image to use as a mask. |
| int eVision.EFourierImage.PlanesPerPixel | ( | self | ) |
Gets the number of color components in each pixel of the image.
| int eVision.EFourierImage.RowPitch | ( | self | ) |
Gets the pitch of a row (the number of bytes between two vertically adjacent pixels).
| None eVision.EFourierImage.Save | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Save the eVision.EFourierImage object to the given file.
Object is saved using the Euresys proprietary file format.
| serializer | The eVision.ESerializer file-like object that is written to. |
| None eVision.EFourierImage.Save | ( | self, | |
| str | path ) |
Save the eVision.EFourierImage object to the given file.
Object is saved using the Euresys proprietary file format.
| path | The full path of the destination file. |
| None eVision.EFourierImage.SaveImage | ( | self, | |
| str | path ) |
Saves the content of this complex image to a Tiff file.
| path | Path to the file to save to. |
| None eVision.EFourierImage.SetImagePtr | ( | self, | |
| int | width, | ||
| int | height, | ||
| ctypes.c_void_p | imagePointer, | ||
| eVision.EFrequentialDomainFormat | domainFormat ) |
Sets the pointer to an externally allocated image buffer.
Use eVision.EFourierImage.UseExternalBuffer instead.
Deprecated in version 26.2. Scheduled to be removed in version 27.6.
| width | The width of the supplied buffer, in pixels. |
| height | The height of the supplied buffer, in pixels. |
| imagePointer | The pointer (aligned on 4 bytes) to the buffer, which must be large enough to hold the image. |
| domainFormat | Frequential domain format of the loaded image. |
| None eVision.EFourierImage.SetImagePtr | ( | self, | |
| int | width, | ||
| int | height, | ||
| ctypes.c_void_p | imagePointer, | ||
| eVision.EFrequentialDomainFormat | domainFormat, | ||
| int | bitsPerRow ) |
Sets the pointer to an externally allocated image buffer.
Use eVision.EFourierImage.UseExternalBuffer instead.
Deprecated in version 26.2. Scheduled to be removed in version 27.6.
| width | The width of the supplied buffer, in pixels. |
| height | The height of the supplied buffer, in pixels. |
| imagePointer | The pointer (aligned on 4 bytes) to the buffer, which must be large enough to hold the image. |
| domainFormat | Frequential domain format of the loaded image. |
| bitsPerRow | The total number of bits contained in a row, padding included. Using the value 0 (default) means that this size is computed from the buffer width and the pixel size plus a padding with the smallest possible value that leads to a multiple of 4 bytes (32 bits), which is the minimum padding accepted by eVision.EFourierImage.UseExternalBuffer. |
| None eVision.EFourierImage.SetSize | ( | self, | |
| int | width, | ||
| int | height ) |
Sets the width and height.
| width | The new requested image width. |
| height | The new requested image height. |
| None eVision.EFourierImage.Shift | ( | self | ) |
Rearranges this Fourier transform by shifting the zero-frequency component to the center of the image.
Shift and InverseShift can only be applied on an EFourierImage when its format is EFrequentialDomainFormat_ComplexExtended. This method will throw an exception if it's not the case. Will throw an exception if the method is applied on an image that has already been shifted first with eVision.EFourierImage.Shift.
Remarks:
When using the no-argument overload, the method is applied in-place.
| None eVision.EFourierImage.Shift | ( | self, | |
| eVision.EFourierImage | dest ) |
Rearranges this Fourier transform by shifting the zero-frequency component to the center of the image.
Shift and InverseShift can only be applied on an EFourierImage when its format is EFrequentialDomainFormat_ComplexExtended. This method will throw an exception if it's not the case. Will throw an exception if the method is applied on an image that has already been shifted first with eVision.EFourierImage.Shift.
Remarks:
When using the no-argument overload, the method is applied in-place.
| dest | The image that will contain the shifted image. |
|
static |
Shifts the mask that can be a region or a grayscale image.
This method can be used in case eVision.EFourierImage.Mask is applied on a previously shifted frequency image, and if the mask isn't centered properly.
| mask | Grayscale image to use as a mask. |
| shiftedMask | Shifted grayscale mask. |
|
static |
Shifts the mask that can be a region or a grayscale image.
This method can be used in case eVision.EFourierImage.Mask is applied on a previously shifted frequency image, and if the mask isn't centered properly.
| region | Region to use as a mask. |
| shiftedRegion | Shifted region. |
| regionWidth | Width of the region. |
| regionHeight | Height of the region. |
| eVision.EImageType eVision.EFourierImage.Type | ( | self | ) |
Gets the image pixel type, as defined by the EImageType enumeration.
| None eVision.EFourierImage.UseExternalBuffer | ( | self, | |
| int | width, | ||
| int | height, | ||
| ctypes.c_void_p | buffer, | ||
| eVision.EFrequentialDomainFormat | domainFormat, | ||
| int | rowPitch ) |
Sets the pointer to an externally allocated image buffer.
| width | The width of the supplied buffer, in pixels. |
| height | The height of the supplied buffer, in pixels. |
| buffer | The pointer (aligned on 4 bytes) to the buffer, which must be large enough to hold the image. |
| domainFormat | Frequential domain format of the loaded image. |
| rowPitch | The total number of bytes contained in a row, padding included. |
| int eVision.EFourierImage.Width | ( | self | ) |
Gets the width of the underlying image.
|
static |