components.io.imagefilecv

pyctools.components.io.imagefilecv.ImageFileReaderCV

Read a still image file using OpenCV library.

pyctools.components.io.imagefilecv.ImageFileWriterCV

Write a still image file using OpenCV library.

class ImageFileReaderCV(config={}, **kwds)[source]

Bases: pyctools.core.base.Component

Read a still image file using OpenCV library.

The file is read with minimum changes to the data, so a 16-bit depth file will result in a floating point image with data in the usual 0..255 range.

If you have a file format that OpenCV doesn’t recognise, try the ImageFileReaderPIL component instead.

Config

path

str

Path name of file to be read.

class ImageFileWriterCV(config={}, **kwds)[source]

Bases: pyctools.core.base.Transformer

Write a still image file using OpenCV library.

See the OpenCV documentation for more detail on the parameters.

If you need to write a file format that OpenCV can’t do, try the ImageFileWriterPIL component instead.

Config

path

str

Path name of file to be written.

16bit

bool

Write a 16-bit depth file, if the format supports it.

EXR_COMPRESSION

int

OpenCV CV_IMWRITE_EXR_COMPRESSION parameter.

EXR_COMPRESSION_B44

int

OpenCV CV_IMWRITE_EXR_COMPRESSION_B44 parameter.

EXR_COMPRESSION_B44A

int

OpenCV CV_IMWRITE_EXR_COMPRESSION_B44A parameter.

EXR_COMPRESSION_DWAA

int

OpenCV CV_IMWRITE_EXR_COMPRESSION_DWAA parameter.

EXR_COMPRESSION_DWAB

int

OpenCV CV_IMWRITE_EXR_COMPRESSION_DWAB parameter.

EXR_COMPRESSION_NO

int

OpenCV CV_IMWRITE_EXR_COMPRESSION_NO parameter.

EXR_COMPRESSION_PIZ

int

OpenCV CV_IMWRITE_EXR_COMPRESSION_PIZ parameter.

EXR_COMPRESSION_PXR24

int

OpenCV CV_IMWRITE_EXR_COMPRESSION_PXR24 parameter.

EXR_COMPRESSION_RLE

int

OpenCV CV_IMWRITE_EXR_COMPRESSION_RLE parameter.

EXR_COMPRESSION_ZIP

int

OpenCV CV_IMWRITE_EXR_COMPRESSION_ZIP parameter.

EXR_COMPRESSION_ZIPS

int

OpenCV CV_IMWRITE_EXR_COMPRESSION_ZIPS parameter.

EXR_TYPE

int

OpenCV CV_IMWRITE_EXR_TYPE parameter.

EXR_TYPE_FLOAT

int

OpenCV CV_IMWRITE_EXR_TYPE_FLOAT parameter.

EXR_TYPE_HALF

int

OpenCV CV_IMWRITE_EXR_TYPE_HALF parameter.

JPEG2000_COMPRESSION_X1000

int

OpenCV CV_IMWRITE_JPEG2000_COMPRESSION_X1000 parameter.

JPEG_CHROMA_QUALITY

int

OpenCV CV_IMWRITE_JPEG_CHROMA_QUALITY parameter.

JPEG_LUMA_QUALITY

int

OpenCV CV_IMWRITE_JPEG_LUMA_QUALITY parameter.

JPEG_OPTIMIZE

int

OpenCV CV_IMWRITE_JPEG_OPTIMIZE parameter.

JPEG_PROGRESSIVE

int

OpenCV CV_IMWRITE_JPEG_PROGRESSIVE parameter.

JPEG_QUALITY

int

OpenCV CV_IMWRITE_JPEG_QUALITY parameter.

JPEG_RST_INTERVAL

int

OpenCV CV_IMWRITE_JPEG_RST_INTERVAL parameter.

PAM_FORMAT_BLACKANDWHITE

int

OpenCV CV_IMWRITE_PAM_FORMAT_BLACKANDWHITE parameter.

PAM_FORMAT_GRAYSCALE

int

OpenCV CV_IMWRITE_PAM_FORMAT_GRAYSCALE parameter.

PAM_FORMAT_GRAYSCALE_ALPHA

int

OpenCV CV_IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA parameter.

PAM_FORMAT_NULL

int

OpenCV CV_IMWRITE_PAM_FORMAT_NULL parameter.

PAM_FORMAT_RGB

int

OpenCV CV_IMWRITE_PAM_FORMAT_RGB parameter.

PAM_FORMAT_RGB_ALPHA

int

OpenCV CV_IMWRITE_PAM_FORMAT_RGB_ALPHA parameter.

PAM_TUPLETYPE

int

OpenCV CV_IMWRITE_PAM_TUPLETYPE parameter.

PNG_BILEVEL

int

OpenCV CV_IMWRITE_PNG_BILEVEL parameter.

PNG_COMPRESSION

int

OpenCV CV_IMWRITE_PNG_COMPRESSION parameter.

PNG_STRATEGY

int

OpenCV CV_IMWRITE_PNG_STRATEGY parameter.

PNG_STRATEGY_DEFAULT

int

OpenCV CV_IMWRITE_PNG_STRATEGY_DEFAULT parameter.

PNG_STRATEGY_FILTERED

int

OpenCV CV_IMWRITE_PNG_STRATEGY_FILTERED parameter.

PNG_STRATEGY_FIXED

int

OpenCV CV_IMWRITE_PNG_STRATEGY_FIXED parameter.

PNG_STRATEGY_HUFFMAN_ONLY

int

OpenCV CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY parameter.

PNG_STRATEGY_RLE

int

OpenCV CV_IMWRITE_PNG_STRATEGY_RLE parameter.

PXM_BINARY

int

OpenCV CV_IMWRITE_PXM_BINARY parameter.

TIFF_COMPRESSION

int

OpenCV CV_IMWRITE_TIFF_COMPRESSION parameter.

TIFF_RESUNIT

int

OpenCV CV_IMWRITE_TIFF_RESUNIT parameter.

TIFF_XDPI

int

OpenCV CV_IMWRITE_TIFF_XDPI parameter.

TIFF_YDPI

int

OpenCV CV_IMWRITE_TIFF_YDPI parameter.

WEBP_QUALITY

int

OpenCV CV_IMWRITE_WEBP_QUALITY parameter.


Comments or questions? Please email jim@jim-easterbrook.me.uk.