Read/Write images using OpenCV.

Backend Library: OpenCV

This plugin wraps OpenCV (also known as cv2), a popular image processing library. Currently, it exposes OpenCVs image reading capability (no video or GIF support yet); however, this may be added in future releases.



Check the respective function for a list of supported kwargs and their documentation.*[, index, colorspace, flags])

Read an image from the ImageResource.

OpenCVPlugin.iter([colorspace, flags])

Yield images from the ImageResource.

OpenCVPlugin.write(ndimage[, is_batch, params])

Save an ndimage in the ImageResource.[index, colorspace, ...])

Standardized image metadata.

OpenCVPlugin.metadata([index, exclude_applied])

Format-specific metadata.

Pixel Formats (Colorspaces)#

OpenCV is known to process images in BGR; however, most of the python ecosystem (in particular matplotlib and other pydata libraries) use the RGB. As such, images are converted to RGB, RGBA, or grayscale (where applicable) by default.