Module opencv::imgcodecs [−][src]
Expand description
Modules
Enums
Imread flags
Imwrite flags
Imwrite PAM specific tupletype flags used to define the ‘TUPETYPE’ field of a PAM file.
Imwrite PNG specific flags used to tune the compression algorithm. These flags will be modify the way of PNG image compression and will be passed to the underlying zlib processing stage.
Constants
If set, the image is read in any possible color format.
If set, return 16-bit/32-bit image when the input has the corresponding depth, otherwise convert it to 8-bit.
If set, always convert image to the 3 channel BGR color image.
If set, always convert image to the single channel grayscale image (codec internal conversion).
If set, do not rotate the image according to EXIF’s orientation flag.
If set, use the gdal driver for loading the image.
If set, always convert image to the 3 channel BGR color image and the image size reduced 1/2.
If set, always convert image to the 3 channel BGR color image and the image size reduced 1/4.
If set, always convert image to the 3 channel BGR color image and the image size reduced 1/8.
If set, always convert image to the single channel grayscale image and the image size reduced 1/2.
If set, always convert image to the single channel grayscale image and the image size reduced 1/4.
If set, always convert image to the single channel grayscale image and the image size reduced 1/8.
If set, return the loaded image as is (with alpha channel, otherwise it gets cropped). Ignore EXIF orientation.
override EXR compression type (ZIP_COMPRESSION = 3 is default)
lossy 4-by-4 pixel block compression, fixed compression rate
lossy 4-by-4 pixel block compression, flat fields are compressed more
lossy DCT based compression, in blocks of 32 scanlines. More efficient for partial buffer access. Supported since OpenEXR 2.2.0.
lossy DCT based compression, in blocks of 256 scanlines. More efficient space wise and faster to decode full frames than DWAA_COMPRESSION. Supported since OpenEXR 2.2.0.
no compression
piz-based wavelet compression
lossy 24-bit float compression
run length encoding
zlib compression, in blocks of 16 scan lines
zlib compression, one scan line at a time
override EXR storage type (FLOAT (FP32) is default)
store as FP32 (default)
store as HALF (FP16)
For JPEG2000, use to specify the target compression rate (multiplied by 1000). The value can be from 0 to 1000. Default is 1000.
Separate chroma quality level, 0 - 100, default is 0 - don’t use.
Separate luma quality level, 0 - 100, default is 0 - don’t use.
Enable JPEG features, 0 or 1, default is False.
Enable JPEG features, 0 or 1, default is False.
For JPEG, it can be a quality from 0 to 100 (the higher is the better). Default value is 95.
JPEG restart interval, 0 - 65535, default is 0 - no restart.
For PAM, sets the TUPLETYPE field to the corresponding string value that is defined for the format
Binary level PNG, 0 or 1, default is 0.
For PNG, it can be the compression level from 0 to 9. A higher value means a smaller size and longer compression time. If specified, strategy is changed to IMWRITE_PNG_STRATEGY_DEFAULT (Z_DEFAULT_STRATEGY). Default value is 1 (best speed setting).
One of cv::ImwritePNGFlags, default is IMWRITE_PNG_STRATEGY_RLE.
Use this value for normal data.
Use this value for data produced by a filter (or predictor).Filtered data consists mostly of small values with a somewhat random distribution. In this case, the compression algorithm is tuned to compress them better.
Using this value prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.
Use this value to force Huffman encoding only (no string match).
Use this value to limit match distances to one (run-length encoding).
For PPM, PGM, or PBM, it can be a binary format flag, 0 or 1. Default value is 1.
For TIFF, use to specify the image compression scheme. See libtiff for integer constants corresponding to compression formats. Note, for images whose depth is CV_32F, only libtiff’s SGILOG compression scheme is used. For other supported depths, the compression scheme can be specified by this flag; LZW compression is the default.
For TIFF, use to specify which DPI resolution unit to set; see libtiff documentation for valid values
For TIFF, use to specify the X direction DPI
For TIFF, use to specify the Y direction DPI
For WEBP, it can be a quality from 1 to 100 (the higher is the better). By default (without any parameter) and for quality above 100 the lossless compression is used.
Functions
Returns true if the specified image can be decoded by OpenCV
Returns true if an image with the specified filename can be encoded by OpenCV
Returns the number of images inside the give file
Reads an image from a buffer in memory.
Reads an image from a buffer in memory.
Encodes an image into a memory buffer.
Loads an image from a file.
Loads a multi-page image from a file.
Loads a of images of a multi-page image from a file.
Saves an image to a specified file.
multi-image overload for bindings