|
| Image | create_from_pixel_format_and_size (cls, PixelFormat pixel_format, Size size) |
| | Creates an instance of Image using a size.Size and a pixel format.
|
| |
| Image | create_from_ids_peak_ipl_image (cls, ids_peak_ipl.Image ids_peak_ipl_image) |
| | Creates an instance of Image using a ids_peak_ipl image.
|
| |
| Image | create_from_np_array (cls, PixelFormat pixel_format, Size size, np.ndarray data) |
| | Creates an instance of Image using a PixelFormat, size.Size and numpy image buffer.
|
| |
| Image | create_from_file (cls, str image_path, PixelFormat|None forced_pixel_format=None) |
| | Creates an Image from a file path.
|
| |
| Image | create_from_image_view (cls, IImageView image_view) |
| | Creates an instance of Image using an IImageView interface.
|
| |
| None | __init__ (self, *Any args, **Any kwargs) |
| | In order to create an Image, please refer to the classmethods.
|
| |
| None | __del__ (self) |
| | Destructor for Image class.
|
| |
| None | save (self, str output_file_path) |
| | Saves the image to a file.
|
| |
| Size | size (self) |
| | Provides the size.Size of the image.
|
| |
| int | width (self) |
| | Provides the width of the image.
|
| |
| int | height (self) |
| | Provides the height of the image.
|
| |
| np.ndarray | to_numpy_array (self, bool copy=True) |
| | Provides a numpy representation of the image.
|
| |
| Image | convert_pixel_format (self, PixelFormat pixel_format) |
| | Converts the image to a different pixel format.
|
| |
| Image | convert_pixel_format_with_factor (self, PixelFormat pixel_format, float factor) |
| | Converts an image into another pixel format with a factor multiplied to every pixel.
|
| |
| Region | region (self) |
| | Retrieves the region.Region associated with the specified image_handle.
|
| |
| None | region (self, Region region) |
| | Updates the region.Region on the image.
|
| |
| None | reset_region (self) |
| | Resets the region.Region on the image to the complete image.
|
| |
| Metadata | metadata (self) |
| | Retrieves the metadata.Metadata of an image which contains information about the image capture settings.
|
| |
| None | metadata (self, Metadata metadata) |
| | Updates the metadata.Metadata of an image which is used to store and manage capture settings.
|
| |
| Image | subtract (self, Image subtrahend) |
| | Subtracts the specified subtrahend image pixelwise from the current image and returns the resulting image.
|
| |
| List[Image] | deinterleave (self) |
| | Splits an image with an interleaved pixel format into individual images.
|
| |
| Image | copy (self) |
| |
| Image | __sub__ (self, Image subtrahend) |
| | Subtracts the specified subtrahend image pixelwise from the current image and returns the resulting image.
|
| |
| bool | __eq__ (self, object other) |
| |
| PixelFormat | pixel_format (self) |
| |
Image Class for working with algorithms.
- Since
- ids_peak_icv 1.0
Subtracts the specified subtrahend image pixelwise from the current image and returns the resulting image.
This function performs a pixelwise subtraction of the given subtrahend image from the current image. The resulting image is returned as a new Image object. The operation requires that both images have the same pixel format and dimensions.
- Parameters
-
| subtrahend | The image to subtract from the current image. |
Supported pixel formats
-
BayerGR8
-
BayerGR10
-
BayerGR12
-
BayerRG8
-
BayerRG10
-
BayerRG12
-
BayerGB8
-
BayerGB10
-
BayerGB12
-
BayerBG8
|
-
BayerBG10
-
BayerBG12
-
Mono8
-
Mono10
-
Mono12
-
Mono16
-
Confidence8
-
Confidence16
-
Coord3D_C8
-
Coord3D_C16
|
-
Coord3D_C32f
-
Coord3D_ABC32f
-
RGB8
-
RGB10
-
RGB12
-
BGR8
-
BGR10
-
BGR12
-
Mono32fIDS
-
RGB32fIDS
|
|
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
@return The resulting image after pixelwise subtraction.
@since ids_peak_icv 1.0
| Image create_from_file |
( |
| cls, |
|
|
str | image_path, |
|
|
PixelFormat | None | forced_pixel_format = None ) |
Creates an Image from a file path.
This method loads an image from the given file path.
If a PixelFormat is provided via forced_pixel_format, the method attempts to interpret the file using that format. If interpretation fails, an exception is raised. Explicit conversion between image formats must be handled manually by the user.
The following image formats are supported:
- Bitmap (BMP)
- Joint Photographic Experts Group (JPEG)
- Portable Network Graphics (PNG)
- Tag Image File Format (TIFF) (Only if
forced_pixel_format is specified)
- Raw Binary Format (RAW)
- High Dynamic Range (HDR) (Only if
forced_pixel_format is specified)
Supported image and pixel formats
BMP:
-
Mono8
-
Mono10
-
Mono12
-
Mono16
-
RGBa8
-
RGB10p32
-
BGR8
-
BGRa8
-
BGR10p32
-
BayerRG8
|
-
BayerRG10
-
BayerRG12
-
BayerGR8
-
BayerGR10
-
BayerGR12
-
BayerGB8
-
BayerGB10
-
BayerGB12
-
BayerBG8
-
BayerBG10
|
-
BayerBG12
-
Confidence8
-
Confidence16
-
Coord3D_C16
-
Coord3D_C8
|
JPEG:
-
BayerGB8
-
BayerGR8
-
RGBa8
-
RGB8
-
BayerBG8
-
BayerRG8
-
BGRa8
-
BGR8
-
Mono8
|
PNG:
-
Mono8
-
Mono10
-
Mono12
-
RGB8
-
RGBa8
-
RGBa10
-
RGBa12
-
BayerRG8
-
BayerRG10
-
BayerRG12
|
-
BayerGR8
-
BayerGR10
-
BayerGR12
-
BayerGB8
-
BayerGB10
-
BayerGB12
-
BayerBG8
-
BayerBG10
-
BayerBG12
-
Confidence8
|
-
Confidence16
-
Coord3D_C8
-
Coord3D_C16
|
RAW:
If forced_pixel_format is None any raw image can be loaded.
If forced_pixel_format is specified, only the following formats are supported and must match the format used when saving:
-
Mono8
-
Mono10
-
Mono10p
-
Mono12
-
Mono12p
-
Mono16
-
BayerRG8
-
BayerRG10
-
BayerRG10p
-
BayerRG12
|
-
BayerRG12p
-
BayerGR8
-
BayerGR10
-
BayerGR10p
-
BayerGR12
-
BayerGR12p
-
BayerBG8
-
BayerBG10
-
BayerBG10p
-
BayerBG12
|
-
BayerBG12p
-
BayerGB8
-
BayerGB10
-
BayerGB10p
-
BayerGB12
-
BayerGB12p
-
Confidence8
-
Confidence16
-
Coord3D_C8
-
Coord3D_C16
|
HDR:
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
- Parameters
-
| image_path | File path on disk, pointing to an image. |
| forced_pixel_format | Pixel format the loaded image is forced to use. |
- Returns
- The loaded Image as a new instance
- Since
- ids_peak_icv 1.0
| None save |
( |
| self, |
|
|
str | output_file_path ) |