Start » Filter Reference » Image » Image IO » LoadImage
Module: | FoundationLite |
---|
Loads a single image from a file.
Name | Type | Description | |
---|---|---|---|
inFile | File | Path to a file | |
inLoadAlphaChannel | Bool | Whether to load the alpha channel (if exists) as an additional image channel | |
outImage | Image | Output image |
Description
The operation loads an image from a file in one of the standard image file formats. Currently the filter supports the following formats:
- BMP (*.bmp),
- JPEG (*.jpg, *jpeg),
- PNG (*.png),
- PNM (*.pbm, *.pgm, *.ppm, *.pnm),
- TIFF (*.tif, *.tiff).
The format of the image file is recognized automatically based on the file header.
The resulting outImage will be three-channel image of UInt8 pixel type, or sometimes of UInt16 pixel type for 16-bit depth images of supported formats (PNG, TIFF).
Hints
- Set inFile to specify a path to the image file you want to load.
- This filter can also be added easily by dragging and dropping an image file from Windows Explorer to the Program Editor in Aurora Vision Studio.
Examples
Description of usage of this filter can be found in examples and tutorial: Bars, Shipment Verification, Bottle Flattening, Plate Measurement (Advanced), Perspective Removal, Photometric Stereo Braille, Hand-Eye Calibration - Editor, Hand-Eye Calibration - On Filters, HMI Handling Events, Counting Saw Teeth, Count Nails, Finding PCB Missing Covering, Count the Mounts, Read the Barcode, Classify the Mounts, Sorting Blobs, Image Stitching, Preparing an OCR model.
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Image is damaged or it is not a BMP, PNG, PNM, TIF or JPG file in LoadImage. File: File name Unable to open an image. Image header format is unrecognized. Image format is unknown or image is damaged.
Load image supports only BMP, PNG, PNM, JPG and TIFF formats. |
Complexity Level
This filter is available on Basic Complexity Level.
See Also
- LoadObject – Loads an object from a file.
- SaveImage – Saves an image to a file.