Flags used for image file reading and writingImage file reading and writing
Detailed Description
Enumerations | |
| enum | cv::ImageMetadataType { cv::IMAGE_METADATA_UNKNOWN = -1 , = 0 , = 1 , = 2 , = 3 , = 3 } |
Enumerations | |
| enum | cv::ImageMetadataType { cv::IMAGE_METADATA_UNKNOWN = -1 , = 0 , = 1 , = 2 , = 3 , = 3 } |
| enum | cv::ImreadModes { cv::IMREAD_UNCHANGED = -1 , cv::IMREAD_GRAYSCALE = 0 , cv::IMREAD_COLOR_BGR = 1 , cv::IMREAD_COLOR = 1 , cv::IMREAD_ANYDEPTH = 2 , cv::IMREAD_ANYCOLOR = 4 , cv::IMREAD_LOAD_GDAL = 8 , cv::IMREAD_REDUCED_GRAYSCALE_2 = 16 , cv::IMREAD_REDUCED_COLOR_2 = 17 , cv::IMREAD_REDUCED_GRAYSCALE_4 = 32 , cv::IMREAD_REDUCED_COLOR_4 = 33 , cv::IMREAD_REDUCED_GRAYSCALE_8 = 64 , cv::IMREAD_REDUCED_COLOR_8 = 65 , cv::IMREAD_IGNORE_ORIENTATION = 128 , cv::IMREAD_COLOR_RGB = 256 } |
| enum | cv::ImwriteBMPCompressionFlags { cv::IMWRITE_BMP_COMPRESSION_RGB = 0 , cv::IMWRITE_BMP_COMPRESSION_BITFIELDS = 3 } |
| Imwrite BMP specific values for IMWRITE_BMP_COMPRESSION parameter key. More... |
| enum | cv::ImwriteEXRTypeFlags { cv::IMWRITE_EXR_TYPE_HALF = 1 , cv::IMWRITE_EXR_TYPE_FLOAT = 2 } |
| Imwrite flags. More... |
| Imwrite GIF specific values for IMWRITE_GIF_QUALITY parameter key, if larger than 3, then its related to the size of the color table. More... |
| enum | cv::ImwriteHDRCompressionFlags { cv::IMWRITE_HDR_COMPRESSION_NONE = 0 , cv::IMWRITE_HDR_COMPRESSION_RLE = 1 } |
| Imwrite HDR specific values for IMWRITE_HDR_COMPRESSION parameter key. More... |
| enum | cv::ImwriteJPEGSamplingFactorParams { cv::IMWRITE_JPEG_SAMPLING_FACTOR_411 = 0x411111 , cv::IMWRITE_JPEG_SAMPLING_FACTOR_420 = 0x221111 , cv::IMWRITE_JPEG_SAMPLING_FACTOR_422 = 0x211111 , cv::IMWRITE_JPEG_SAMPLING_FACTOR_440 = 0x121111 , cv::IMWRITE_JPEG_SAMPLING_FACTOR_444 = 0x111111 } |
| Imwrite PAM specific tupletype flags used to define the 'TUPLETYPE' field of a PAM file. More... |
| enum | cv::ImwritePNGFilterFlags { cv::IMWRITE_PNG_FILTER_NONE = 8 , cv::IMWRITE_PNG_FILTER_SUB = 16 , cv::IMWRITE_PNG_FILTER_UP = 32 , cv::IMWRITE_PNG_FILTER_AVG = 64 , cv::IMWRITE_PNG_FILTER_PAETH = 128 , cv::IMWRITE_PNG_FAST_FILTERS = (IMWRITE_PNG_FILTER_NONE | IMWRITE_PNG_FILTER_SUB | IMWRITE_PNG_FILTER_UP) , cv::IMWRITE_PNG_ALL_FILTERS = (IMWRITE_PNG_FAST_FILTERS | IMWRITE_PNG_FILTER_AVG | IMWRITE_PNG_FILTER_PAETH) } |
| Imwrite PNG specific values for IMWRITE_PNG_FILTER parameter key. More... |
| Imwrite PNG specific flags used to tune the compression algorithm. More... |
| enum | cv::ImwriteTiffPredictorFlags { cv::IMWRITE_TIFF_PREDICTOR_NONE = 1 , cv::IMWRITE_TIFF_PREDICTOR_HORIZONTAL = 2 , cv::IMWRITE_TIFF_PREDICTOR_FLOATINGPOINT = 3 } |
| enum | cv::ImwriteTiffResolutionUnitFlags { cv::IMWRITE_TIFF_RESOLUTION_UNIT_NONE = 1 , cv::IMWRITE_TIFF_RESOLUTION_UNIT_INCH = 2 , cv::IMWRITE_TIFF_RESOLUTION_UNIT_CENTIMETER = 3 } |
#include <opencv2/imgcodecs.hpp>
| Enumerator | |
|---|---|
| IMAGE_METADATA_UNKNOWN Python: cv.IMAGE_METADATA_UNKNOWN | |
| IMAGE_METADATA_EXIF Python: cv.IMAGE_METADATA_EXIF | |
| IMAGE_METADATA_XMP Python: cv.IMAGE_METADATA_XMP | |
| IMAGE_METADATA_ICCP Python: cv.IMAGE_METADATA_ICCP | |
| IMAGE_METADATA_CICP Python: cv.IMAGE_METADATA_CICP | |
| IMAGE_METADATA_MAX Python: cv.IMAGE_METADATA_MAX | |
| enum cv::ImreadModes |
#include <opencv2/imgcodecs.hpp>
Imread flags
| Enumerator | |
|---|---|
| IMREAD_UNCHANGED Python: cv.IMREAD_UNCHANGED | If set, return the loaded image as is (with alpha channel, otherwise it gets cropped). Ignore EXIF orientation. |
| IMREAD_GRAYSCALE Python: cv.IMREAD_GRAYSCALE | If set, always convert image to the single channel grayscale image (codec internal conversion). |
| IMREAD_COLOR_BGR Python: cv.IMREAD_COLOR_BGR | If set, always convert image to the 3 channel BGR color image. |
| IMREAD_COLOR Python: cv.IMREAD_COLOR | Same as IMREAD_COLOR_BGR. |
| IMREAD_ANYDEPTH Python: cv.IMREAD_ANYDEPTH | If set, return 16-bit/32-bit image when the input has the corresponding depth, otherwise convert it to 8-bit. |
| IMREAD_ANYCOLOR Python: cv.IMREAD_ANYCOLOR | If set, the image is read in any possible color format. |
| IMREAD_LOAD_GDAL Python: cv.IMREAD_LOAD_GDAL | If set, use the gdal driver for loading the image. |
| IMREAD_REDUCED_GRAYSCALE_2 Python: cv.IMREAD_REDUCED_GRAYSCALE_2 | If set, always convert image to the single channel grayscale image and the image size reduced 1/2. |
| IMREAD_REDUCED_COLOR_2 Python: cv.IMREAD_REDUCED_COLOR_2 | If set, always convert image to the 3 channel BGR color image and the image size reduced 1/2. |
| IMREAD_REDUCED_GRAYSCALE_4 Python: cv.IMREAD_REDUCED_GRAYSCALE_4 | If set, always convert image to the single channel grayscale image and the image size reduced 1/4. |
| IMREAD_REDUCED_COLOR_4 Python: cv.IMREAD_REDUCED_COLOR_4 | If set, always convert image to the 3 channel BGR color image and the image size reduced 1/4. |
| IMREAD_REDUCED_GRAYSCALE_8 Python: cv.IMREAD_REDUCED_GRAYSCALE_8 | If set, always convert image to the single channel grayscale image and the image size reduced 1/8. |
| IMREAD_REDUCED_COLOR_8 Python: cv.IMREAD_REDUCED_COLOR_8 | If set, always convert image to the 3 channel BGR color image and the image size reduced 1/8. |
| IMREAD_IGNORE_ORIENTATION Python: cv.IMREAD_IGNORE_ORIENTATION | If set, do not rotate the image according to EXIF's orientation flag. |
| IMREAD_COLOR_RGB Python: cv.IMREAD_COLOR_RGB | If set, always convert image to the 3 channel RGB color image. |
#include <opencv2/imgcodecs.hpp>
Imwrite BMP specific values for IMWRITE_BMP_COMPRESSION parameter key.
| Enumerator | |
|---|---|
| IMWRITE_BMP_COMPRESSION_RGB Python: cv.IMWRITE_BMP_COMPRESSION_RGB | Use BI_RGB. OpenCV v4.12.0 or before supports to encode with this compression only. |
| IMWRITE_BMP_COMPRESSION_BITFIELDS Python: cv.IMWRITE_BMP_COMPRESSION_BITFIELDS | Use BI_BITFIELDS. OpenCV v4.13.0 or later can support to encode with this compression. (only for 32 BPP images) |
#include <opencv2/imgcodecs.hpp>
| Enumerator | |
|---|---|
| IMWRITE_EXR_COMPRESSION_NO Python: cv.IMWRITE_EXR_COMPRESSION_NO | no compression |
| IMWRITE_EXR_COMPRESSION_RLE Python: cv.IMWRITE_EXR_COMPRESSION_RLE | run length encoding |
| IMWRITE_EXR_COMPRESSION_ZIPS Python: cv.IMWRITE_EXR_COMPRESSION_ZIPS | zlib compression, one scan line at a time |
| IMWRITE_EXR_COMPRESSION_ZIP Python: cv.IMWRITE_EXR_COMPRESSION_ZIP | zlib compression, in blocks of 16 scan lines |
| IMWRITE_EXR_COMPRESSION_PIZ Python: cv.IMWRITE_EXR_COMPRESSION_PIZ | piz-based wavelet compression |
| IMWRITE_EXR_COMPRESSION_PXR24 Python: cv.IMWRITE_EXR_COMPRESSION_PXR24 | lossy 24-bit float compression |
| IMWRITE_EXR_COMPRESSION_B44 Python: cv.IMWRITE_EXR_COMPRESSION_B44 | lossy 4-by-4 pixel block compression, fixed compression rate |
| IMWRITE_EXR_COMPRESSION_B44A Python: cv.IMWRITE_EXR_COMPRESSION_B44A | lossy 4-by-4 pixel block compression, flat fields are compressed more |
| IMWRITE_EXR_COMPRESSION_DWAA Python: cv.IMWRITE_EXR_COMPRESSION_DWAA | lossy DCT based compression, in blocks of 32 scanlines. More efficient for partial buffer access. Supported since OpenEXR 2.2.0. |
| IMWRITE_EXR_COMPRESSION_DWAB Python: cv.IMWRITE_EXR_COMPRESSION_DWAB | 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. |
#include <opencv2/imgcodecs.hpp>
| Enumerator | |
|---|---|
| IMWRITE_EXR_TYPE_HALF Python: cv.IMWRITE_EXR_TYPE_HALF | store as HALF (FP16) |
| IMWRITE_EXR_TYPE_FLOAT Python: cv.IMWRITE_EXR_TYPE_FLOAT | store as FP32 (default) |
| enum cv::ImwriteFlags |
#include <opencv2/imgcodecs.hpp>
Imwrite flags.
| Enumerator | |
|---|---|
| IMWRITE_JPEG_QUALITY Python: cv.IMWRITE_JPEG_QUALITY | For JPEG, it can be a quality from 0 to 100 (the higher is the better). Default value is 95. |
| IMWRITE_JPEG_PROGRESSIVE Python: cv.IMWRITE_JPEG_PROGRESSIVE | Enable JPEG features, 0 or 1, default is False. |
| IMWRITE_JPEG_OPTIMIZE Python: cv.IMWRITE_JPEG_OPTIMIZE | Enable JPEG features, 0 or 1, default is False. |
| IMWRITE_JPEG_RST_INTERVAL Python: cv.IMWRITE_JPEG_RST_INTERVAL | JPEG restart interval, 0 - 65535, default is 0 - no restart. |
| IMWRITE_JPEG_LUMA_QUALITY Python: cv.IMWRITE_JPEG_LUMA_QUALITY | Separate luma quality level, 0 - 100, default is -1 - don't use. If JPEG_LIB_VERSION < 70, Not supported. |
| IMWRITE_JPEG_CHROMA_QUALITY Python: cv.IMWRITE_JPEG_CHROMA_QUALITY | Separate chroma quality level, 0 - 100, default is -1 - don't use. If JPEG_LIB_VERSION < 70, Not supported. |
| IMWRITE_JPEG_SAMPLING_FACTOR Python: cv.IMWRITE_JPEG_SAMPLING_FACTOR | For JPEG, set sampling factor. See cv::ImwriteJPEGSamplingFactorParams. |
| IMWRITE_PNG_COMPRESSION Python: cv.IMWRITE_PNG_COMPRESSION | 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). |
| IMWRITE_PNG_STRATEGY Python: cv.IMWRITE_PNG_STRATEGY | For PNG, One of cv::ImwritePNGFlags, default is IMWRITE_PNG_STRATEGY_RLE. |
| IMWRITE_PNG_BILEVEL Python: cv.IMWRITE_PNG_BILEVEL | For PNG, Binary level PNG, 0 or 1, default is 0. For APNG, it is not supported. |
| IMWRITE_PNG_FILTER Python: cv.IMWRITE_PNG_FILTER | For PNG, One of cv::ImwritePNGFilterFlags, default is IMWRITE_PNG_FILTER_SUB. For APNG, it is not supported. |
| IMWRITE_PNG_ZLIBBUFFER_SIZE Python: cv.IMWRITE_PNG_ZLIBBUFFER_SIZE | For PNG with libpng, sets the size of the internal zlib compression buffer in bytes, from 6 to 1048576(1024 KiB). Default is 8192(8 KiB). For normal use, 131072(128 KiB) or 262144(256 KiB) may be sufficient. If WITH_SPNG=ON, it is not supported. For APNG, it is not supported. |
| IMWRITE_PXM_BINARY Python: cv.IMWRITE_PXM_BINARY | For PPM, PGM, or PBM, it can be a binary format flag, 0 or 1. Default value is 1. |
| IMWRITE_EXR_TYPE Python: cv.IMWRITE_EXR_TYPE | override EXR storage type (FLOAT (FP32) is default) |
| IMWRITE_EXR_COMPRESSION Python: cv.IMWRITE_EXR_COMPRESSION | override EXR compression type (ZIP_COMPRESSION = 3 is default) |
| IMWRITE_EXR_DWA_COMPRESSION_LEVEL Python: cv.IMWRITE_EXR_DWA_COMPRESSION_LEVEL | override EXR DWA compression level (45 is default) |
| IMWRITE_WEBP_QUALITY Python: cv.IMWRITE_WEBP_QUALITY | 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. |
| IMWRITE_HDR_COMPRESSION Python: cv.IMWRITE_HDR_COMPRESSION | specify HDR compression |
| IMWRITE_PAM_TUPLETYPE Python: cv.IMWRITE_PAM_TUPLETYPE | For PAM, sets the TUPLETYPE field to the corresponding string value that is defined for the format. |
| IMWRITE_TIFF_RESUNIT Python: cv.IMWRITE_TIFF_RESUNIT | For TIFF, use to specify which DPI resolution unit to set. See ImwriteTiffResolutionUnitFlags. Default is IMWRITE_TIFF_RESOLUTION_UNIT_INCH. |
| IMWRITE_TIFF_XDPI Python: cv.IMWRITE_TIFF_XDPI | For TIFF, use to specify the X direction DPI. |
| IMWRITE_TIFF_YDPI Python: cv.IMWRITE_TIFF_YDPI | For TIFF, use to specify the Y direction DPI. |
| IMWRITE_TIFF_COMPRESSION Python: cv.IMWRITE_TIFF_COMPRESSION | For TIFF, use to specify the image compression scheme. See cv::ImwriteTiffCompressionFlags. 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. |
| IMWRITE_TIFF_ROWSPERSTRIP Python: cv.IMWRITE_TIFF_ROWSPERSTRIP | For TIFF, use to specify the number of rows per strip. |
| IMWRITE_TIFF_PREDICTOR Python: cv.IMWRITE_TIFF_PREDICTOR | For TIFF, use to specify predictor. See cv::ImwriteTiffPredictorFlags. Default is IMWRITE_TIFF_PREDICTOR_HORIZONTAL . |
| IMWRITE_JPEG2000_COMPRESSION_X1000 Python: cv.IMWRITE_JPEG2000_COMPRESSION_X1000 | For JPEG2000, use to specify the target compression rate (multiplied by 1000). The value can be from 0 to 1000. Default is 1000. |
| IMWRITE_AVIF_QUALITY Python: cv.IMWRITE_AVIF_QUALITY | For AVIF, it can be a quality between 0 and 100 (the higher the better). Default is 95. |
| IMWRITE_AVIF_DEPTH Python: cv.IMWRITE_AVIF_DEPTH | For AVIF, it can be 8, 10 or 12. If >8, it is stored/read as CV_16U. Default is 8. |
| IMWRITE_AVIF_SPEED Python: cv.IMWRITE_AVIF_SPEED | For AVIF, it is between 0 (slowest) and 10(fastest). Default is 9. |
| IMWRITE_JPEGXL_QUALITY Python: cv.IMWRITE_JPEGXL_QUALITY | For JPEG XL, it can be a quality from 0 to 100 (the higher is the better). Default value is 95. If set, distance parameter is re-calicurated from quality level automatically. This parameter request libjxl v0.10 or later. |
| IMWRITE_JPEGXL_EFFORT Python: cv.IMWRITE_JPEGXL_EFFORT | For JPEG XL, encoder effort/speed level without affecting decoding speed; it is between 1 (fastest) and 10 (slowest). Default is 7. |
| IMWRITE_JPEGXL_DISTANCE Python: cv.IMWRITE_JPEGXL_DISTANCE | For JPEG XL, distance level for lossy compression: target max butteraugli distance, lower = higher quality, 0 = lossless; range: 0 .. 25. Default is 1. |
| IMWRITE_JPEGXL_DECODING_SPEED Python: cv.IMWRITE_JPEGXL_DECODING_SPEED | For JPEG XL, decoding speed tier for the provided options; minimum is 0 (slowest to decode, best quality/density), and maximum is 4 (fastest to decode, at the cost of some quality/density). Default is 0. |
| IMWRITE_BMP_COMPRESSION Python: cv.IMWRITE_BMP_COMPRESSION | For BMP, use to specify compress parameter for 32bpp image. Default is IMWRITE_BMP_COMPRESSION_BITFIELDS. See cv::ImwriteBMPCompressionFlags. |
| IMWRITE_GIF_LOOP Python: cv.IMWRITE_GIF_LOOP | Not functional since 4.12.0. Replaced by cv::Animation::loop_count. |
| IMWRITE_GIF_SPEED Python: cv.IMWRITE_GIF_SPEED | Not functional since 4.12.0. Replaced by cv::Animation::durations. |
| IMWRITE_GIF_QUALITY Python: cv.IMWRITE_GIF_QUALITY | For GIF, it can be a quality from 1 to 8. Default is 2. See cv::ImwriteGifCompressionFlags. |
| IMWRITE_GIF_DITHER Python: cv.IMWRITE_GIF_DITHER | For GIF, it can be a quality from -1(most dither) to 3(no dither). Default is 0. |
| IMWRITE_GIF_TRANSPARENCY Python: cv.IMWRITE_GIF_TRANSPARENCY | For GIF, the alpha channel lower than this will be set to transparent. Default is 1. |
| IMWRITE_GIF_COLORTABLE Python: cv.IMWRITE_GIF_COLORTABLE | For GIF, 0 means global color table is used, 1 means local color table is used. Default is 0. |
#include <opencv2/imgcodecs.hpp>
Imwrite GIF specific values for IMWRITE_GIF_QUALITY parameter key, if larger than 3, then its related to the size of the color table.
| Enumerator | |
|---|---|
| IMWRITE_GIF_FAST_NO_DITHER Python: cv.IMWRITE_GIF_FAST_NO_DITHER | |
| IMWRITE_GIF_FAST_FLOYD_DITHER Python: cv.IMWRITE_GIF_FAST_FLOYD_DITHER | |
| IMWRITE_GIF_COLORTABLE_SIZE_8 Python: cv.IMWRITE_GIF_COLORTABLE_SIZE_8 | |
| IMWRITE_GIF_COLORTABLE_SIZE_16 Python: cv.IMWRITE_GIF_COLORTABLE_SIZE_16 | |
| IMWRITE_GIF_COLORTABLE_SIZE_32 Python: cv.IMWRITE_GIF_COLORTABLE_SIZE_32 | |
| IMWRITE_GIF_COLORTABLE_SIZE_64 Python: cv.IMWRITE_GIF_COLORTABLE_SIZE_64 | |
| IMWRITE_GIF_COLORTABLE_SIZE_128 Python: cv.IMWRITE_GIF_COLORTABLE_SIZE_128 | |
| IMWRITE_GIF_COLORTABLE_SIZE_256 Python: cv.IMWRITE_GIF_COLORTABLE_SIZE_256 | |
#include <opencv2/imgcodecs.hpp>
Imwrite HDR specific values for IMWRITE_HDR_COMPRESSION parameter key.
| Enumerator | |
|---|---|
| IMWRITE_HDR_COMPRESSION_NONE Python: cv.IMWRITE_HDR_COMPRESSION_NONE | |
| IMWRITE_HDR_COMPRESSION_RLE Python: cv.IMWRITE_HDR_COMPRESSION_RLE | |
#include <opencv2/imgcodecs.hpp>
| Enumerator | |
|---|---|
| IMWRITE_JPEG_SAMPLING_FACTOR_411 Python: cv.IMWRITE_JPEG_SAMPLING_FACTOR_411 | 4x1,1x1,1x1 |
| IMWRITE_JPEG_SAMPLING_FACTOR_420 Python: cv.IMWRITE_JPEG_SAMPLING_FACTOR_420 | 2x2,1x1,1x1(Default) |
| IMWRITE_JPEG_SAMPLING_FACTOR_422 Python: cv.IMWRITE_JPEG_SAMPLING_FACTOR_422 | 2x1,1x1,1x1 |
| IMWRITE_JPEG_SAMPLING_FACTOR_440 Python: cv.IMWRITE_JPEG_SAMPLING_FACTOR_440 | 1x2,1x1,1x1 |
| IMWRITE_JPEG_SAMPLING_FACTOR_444 Python: cv.IMWRITE_JPEG_SAMPLING_FACTOR_444 | 1x1,1x1,1x1(No subsampling) |
| enum cv::ImwritePAMFlags |
#include <opencv2/imgcodecs.hpp>
Imwrite PAM specific tupletype flags used to define the 'TUPLETYPE' field of a PAM file.
| Enumerator | |
|---|---|
| IMWRITE_PAM_FORMAT_NULL Python: cv.IMWRITE_PAM_FORMAT_NULL | |
| IMWRITE_PAM_FORMAT_BLACKANDWHITE Python: cv.IMWRITE_PAM_FORMAT_BLACKANDWHITE | |
| IMWRITE_PAM_FORMAT_GRAYSCALE Python: cv.IMWRITE_PAM_FORMAT_GRAYSCALE | |
| IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA Python: cv.IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA | |
| IMWRITE_PAM_FORMAT_RGB Python: cv.IMWRITE_PAM_FORMAT_RGB | |
| IMWRITE_PAM_FORMAT_RGB_ALPHA Python: cv.IMWRITE_PAM_FORMAT_RGB_ALPHA | |
#include <opencv2/imgcodecs.hpp>
Imwrite PNG specific values for IMWRITE_PNG_FILTER parameter key.
| Enumerator | |
|---|---|
| IMWRITE_PNG_FILTER_NONE Python: cv.IMWRITE_PNG_FILTER_NONE | Applies no filter to the PNG image (useful when you want to save the raw pixel data without any compression filter). |
| IMWRITE_PNG_FILTER_SUB Python: cv.IMWRITE_PNG_FILTER_SUB | Applies the "sub" filter, which calculates the difference between the current byte and the previous byte in the row. |
| IMWRITE_PNG_FILTER_UP Python: cv.IMWRITE_PNG_FILTER_UP | applies the "up" filter, which calculates the difference between the current byte and the corresponding byte directly above it. |
| IMWRITE_PNG_FILTER_AVG Python: cv.IMWRITE_PNG_FILTER_AVG | applies the "average" filter, which calculates the average of the byte to the left and the byte above. |
| IMWRITE_PNG_FILTER_PAETH Python: cv.IMWRITE_PNG_FILTER_PAETH | applies the "Paeth" filter, a more complex filter that predicts the next pixel value based on neighboring pixels. |
| IMWRITE_PNG_FAST_FILTERS Python: cv.IMWRITE_PNG_FAST_FILTERS | This is a combination of IMWRITE_PNG_FILTER_NONE, IMWRITE_PNG_FILTER_SUB, and IMWRITE_PNG_FILTER_UP, typically used for faster compression. |
| IMWRITE_PNG_ALL_FILTERS Python: cv.IMWRITE_PNG_ALL_FILTERS | This combines all available filters (NONE, SUB, UP, AVG, and PAETH), which will attempt to apply all of them for the best possible compression. |
| enum cv::ImwritePNGFlags |
#include <opencv2/imgcodecs.hpp>
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.
| Enumerator | |
|---|---|
| IMWRITE_PNG_STRATEGY_DEFAULT Python: cv.IMWRITE_PNG_STRATEGY_DEFAULT | Use this value for normal data. |
| IMWRITE_PNG_STRATEGY_FILTERED Python: cv.IMWRITE_PNG_STRATEGY_FILTERED | 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. |
| IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY Python: cv.IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY | Use this value to force Huffman encoding only (no string match). |
| IMWRITE_PNG_STRATEGY_RLE Python: cv.IMWRITE_PNG_STRATEGY_RLE | Use this value to limit match distances to one (run-length encoding). |
| IMWRITE_PNG_STRATEGY_FIXED Python: cv.IMWRITE_PNG_STRATEGY_FIXED | Using this value prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications. |
#include <opencv2/imgcodecs.hpp>
| Enumerator | |
|---|---|
| IMWRITE_TIFF_COMPRESSION_NONE Python: cv.IMWRITE_TIFF_COMPRESSION_NONE | dump mode |
| IMWRITE_TIFF_COMPRESSION_CCITTRLE Python: cv.IMWRITE_TIFF_COMPRESSION_CCITTRLE | CCITT modified Huffman RLE. |
| IMWRITE_TIFF_COMPRESSION_CCITTFAX3 Python: cv.IMWRITE_TIFF_COMPRESSION_CCITTFAX3 | CCITT Group 3 fax encoding. |
| IMWRITE_TIFF_COMPRESSION_CCITT_T4 Python: cv.IMWRITE_TIFF_COMPRESSION_CCITT_T4 | CCITT T.4 (TIFF 6 name) |
| IMWRITE_TIFF_COMPRESSION_CCITTFAX4 Python: cv.IMWRITE_TIFF_COMPRESSION_CCITTFAX4 | CCITT Group 4 fax encoding. |
| IMWRITE_TIFF_COMPRESSION_CCITT_T6 Python: cv.IMWRITE_TIFF_COMPRESSION_CCITT_T6 | CCITT T.6 (TIFF 6 name) |
| IMWRITE_TIFF_COMPRESSION_LZW Python: cv.IMWRITE_TIFF_COMPRESSION_LZW | Lempel-Ziv & Welch. |
| IMWRITE_TIFF_COMPRESSION_OJPEG Python: cv.IMWRITE_TIFF_COMPRESSION_OJPEG | !6.0 JPEG |
| IMWRITE_TIFF_COMPRESSION_JPEG Python: cv.IMWRITE_TIFF_COMPRESSION_JPEG | JPEG DCT compression |
| IMWRITE_TIFF_COMPRESSION_T85 Python: cv.IMWRITE_TIFF_COMPRESSION_T85 | !TIFF/FX T.85 JBIG compression |
| IMWRITE_TIFF_COMPRESSION_T43 Python: cv.IMWRITE_TIFF_COMPRESSION_T43 | !TIFF/FX T.43 colour by layered JBIG compression |
| IMWRITE_TIFF_COMPRESSION_NEXT Python: cv.IMWRITE_TIFF_COMPRESSION_NEXT | NeXT 2-bit RLE. |
| IMWRITE_TIFF_COMPRESSION_CCITTRLEW Python: cv.IMWRITE_TIFF_COMPRESSION_CCITTRLEW | #1 w/ word alignment |
| IMWRITE_TIFF_COMPRESSION_PACKBITS Python: cv.IMWRITE_TIFF_COMPRESSION_PACKBITS | Macintosh RLE. |
| IMWRITE_TIFF_COMPRESSION_THUNDERSCAN Python: cv.IMWRITE_TIFF_COMPRESSION_THUNDERSCAN | ThunderScan RLE. |
| IMWRITE_TIFF_COMPRESSION_IT8CTPAD Python: cv.IMWRITE_TIFF_COMPRESSION_IT8CTPAD | IT8 CT w/padding. |
| IMWRITE_TIFF_COMPRESSION_IT8LW Python: cv.IMWRITE_TIFF_COMPRESSION_IT8LW | IT8 Linework RLE. |
| IMWRITE_TIFF_COMPRESSION_IT8MP Python: cv.IMWRITE_TIFF_COMPRESSION_IT8MP | IT8 Monochrome picture. |
| IMWRITE_TIFF_COMPRESSION_IT8BL Python: cv.IMWRITE_TIFF_COMPRESSION_IT8BL | IT8 Binary line art. |
| IMWRITE_TIFF_COMPRESSION_PIXARFILM Python: cv.IMWRITE_TIFF_COMPRESSION_PIXARFILM | Pixar companded 10bit LZW. |
| IMWRITE_TIFF_COMPRESSION_PIXARLOG Python: cv.IMWRITE_TIFF_COMPRESSION_PIXARLOG | Pixar companded 11bit ZIP. |
| IMWRITE_TIFF_COMPRESSION_DEFLATE Python: cv.IMWRITE_TIFF_COMPRESSION_DEFLATE | Deflate compression, legacy tag. |
| IMWRITE_TIFF_COMPRESSION_ADOBE_DEFLATE Python: cv.IMWRITE_TIFF_COMPRESSION_ADOBE_DEFLATE | Deflate compression, as recognized by Adobe. |
| IMWRITE_TIFF_COMPRESSION_DCS Python: cv.IMWRITE_TIFF_COMPRESSION_DCS | Kodak DCS encoding. |
| IMWRITE_TIFF_COMPRESSION_JBIG Python: cv.IMWRITE_TIFF_COMPRESSION_JBIG | ISO JBIG. |
| IMWRITE_TIFF_COMPRESSION_SGILOG Python: cv.IMWRITE_TIFF_COMPRESSION_SGILOG | SGI Log Luminance RLE. |
| IMWRITE_TIFF_COMPRESSION_SGILOG24 Python: cv.IMWRITE_TIFF_COMPRESSION_SGILOG24 | SGI Log 24-bit packed. |
| IMWRITE_TIFF_COMPRESSION_JP2000 Python: cv.IMWRITE_TIFF_COMPRESSION_JP2000 | Leadtools JPEG2000. |
| IMWRITE_TIFF_COMPRESSION_LERC Python: cv.IMWRITE_TIFF_COMPRESSION_LERC | ESRI Lerc codec: https://github.com/Esri/lerc. |
| IMWRITE_TIFF_COMPRESSION_LZMA Python: cv.IMWRITE_TIFF_COMPRESSION_LZMA | LZMA2. |
| IMWRITE_TIFF_COMPRESSION_ZSTD Python: cv.IMWRITE_TIFF_COMPRESSION_ZSTD | ZSTD: WARNING not registered in Adobe-maintained registry. |
| IMWRITE_TIFF_COMPRESSION_WEBP Python: cv.IMWRITE_TIFF_COMPRESSION_WEBP | WEBP: WARNING not registered in Adobe-maintained registry. |
| IMWRITE_TIFF_COMPRESSION_JXL Python: cv.IMWRITE_TIFF_COMPRESSION_JXL | JPEGXL: WARNING not registered in Adobe-maintained registry. |
#include <opencv2/imgcodecs.hpp>
| Enumerator | |
|---|---|
| IMWRITE_TIFF_PREDICTOR_NONE Python: cv.IMWRITE_TIFF_PREDICTOR_NONE | no prediction scheme used |
| IMWRITE_TIFF_PREDICTOR_HORIZONTAL Python: cv.IMWRITE_TIFF_PREDICTOR_HORIZONTAL | horizontal differencing |
| IMWRITE_TIFF_PREDICTOR_FLOATINGPOINT Python: cv.IMWRITE_TIFF_PREDICTOR_FLOATINGPOINT | floating point predictor |
#include <opencv2/imgcodecs.hpp>
| Enumerator | |
|---|---|
| IMWRITE_TIFF_RESOLUTION_UNIT_NONE Python: cv.IMWRITE_TIFF_RESOLUTION_UNIT_NONE | no absolute unit of measurement. |
| IMWRITE_TIFF_RESOLUTION_UNIT_INCH Python: cv.IMWRITE_TIFF_RESOLUTION_UNIT_INCH | inch |
| IMWRITE_TIFF_RESOLUTION_UNIT_CENTIMETER Python: cv.IMWRITE_TIFF_RESOLUTION_UNIT_CENTIMETER | centimeter |