43#ifndef OPENCV_IMGCODECS_HPP
44#define OPENCV_IMGCODECS_HPP
46#include "opencv2/core.hpp"
447 friend bool operator== (
const iterator& a,
const iterator& b) {
return a.m_curr == b.m_curr; }
448 friend bool operator!= (
const iterator& a,
const iterator& b) {
return a.m_curr != b.m_curr; }
To read Multi Page images on demand.
Definition imgcodecs.hpp:438
const Mat & operator[](int index)
void releaseCache(int index)
const Mat & at(int index)
ImageCollection(const String &filename, int flags)
void init(const String &img, int flags)
Ptr< Impl > pImpl
Definition imgcodecs.hpp:468
n-dimensional dense array class
Definition mat.hpp:812
Template class specifying a continuous subsequence (slice) of a sequence.
Definition types.hpp:623
This type is very similar to InputArray except that it is used for input/output and output function p...
Definition mat.hpp:296
InputArrayOfArrays Size InputOutputArray InputOutputArray OutputArrayOfArrays OutputArrayOfArrays OutputArray OutputArray OutputArray int flags
Definition calib3d.hpp:1617
InputArray InputArrayOfArrays
Definition mat.hpp:443
CV__DEBUG_NS_END typedef const _InputArray & InputArray
Definition mat.hpp:442
const CvArr const CvArr const CvArr CvArr int flags
Definition core_c.h:1342
double double end
Definition core_c.h:1381
double start
Definition core_c.h:1381
int index
Definition core_c.h:634
int count
Definition core_c.h:1413
const char const char ** filename
Definition core_c.h:2630
#define CV_EXPORTS
Definition cvdef.h:435
#define CV_OUT
Definition cvdef.h:478
#define CV_EXPORTS_W
Definition cvdef.h:472
#define CV_WRAP
Definition cvdef.h:481
ImwriteFlags
Imwrite flags.
Definition imgcodecs.hpp:85
ImwriteHDRCompressionFlags
Imwrite HDR specific values for IMWRITE_HDR_COMPRESSION parameter key.
Definition imgcodecs.hpp:212
ImwriteEXRTypeFlags
Definition imgcodecs.hpp:166
ImwriteJPEGSamplingFactorParams
Definition imgcodecs.hpp:115
ImwritePAMFlags
Imwrite PAM specific tupletype flags used to define the 'TUPLETYPE' field of a PAM file.
Definition imgcodecs.hpp:202
ImreadModes
Imread flags.
Definition imgcodecs.hpp:68
ImwriteEXRCompressionFlags
Definition imgcodecs.hpp:172
ImwriteTiffPredictorFlags
Definition imgcodecs.hpp:159
ImwritePNGFlags
Imwrite PNG specific flags used to tune the compression algorithm.
Definition imgcodecs.hpp:193
ImwriteTiffCompressionFlags
Definition imgcodecs.hpp:123
@ IMWRITE_JPEG_RST_INTERVAL
JPEG restart interval, 0 - 65535, default is 0 - no restart.
Definition imgcodecs.hpp:89
@ IMWRITE_TIFF_ROWSPERSTRIP
For TIFF, use to specify the number of rows per strip.
Definition imgcodecs.hpp:107
@ IMWRITE_JPEG_SAMPLING_FACTOR
For JPEG, set sampling factor. See cv::ImwriteJPEGSamplingFactorParams.
Definition imgcodecs.hpp:92
@ IMWRITE_JPEG_PROGRESSIVE
Enable JPEG features, 0 or 1, default is False.
Definition imgcodecs.hpp:87
@ IMWRITE_EXR_TYPE
override EXR storage type (FLOAT (FP32) is default)
Definition imgcodecs.hpp:97
@ IMWRITE_AVIF_SPEED
For AVIF, it is between 0 (slowest) and (fastest). Default is 9.
Definition imgcodecs.hpp:112
@ IMWRITE_EXR_COMPRESSION
override EXR compression type (ZIP_COMPRESSION = 3 is default)
Definition imgcodecs.hpp:98
@ IMWRITE_TIFF_XDPI
For TIFF, use to specify the X direction DPI.
Definition imgcodecs.hpp:104
@ IMWRITE_JPEG_LUMA_QUALITY
Separate luma quality level, 0 - 100, default is -1 - don't use. If JPEG_LIB_VERSION < 70,...
Definition imgcodecs.hpp:90
@ IMWRITE_PXM_BINARY
For PPM, PGM, or PBM, it can be a binary format flag, 0 or 1. Default value is 1.
Definition imgcodecs.hpp:96
@ IMWRITE_TIFF_PREDICTOR
For TIFF, use to specify predictor. See cv::ImwriteTiffPredictorFlags.
Definition imgcodecs.hpp:108
@ IMWRITE_TIFF_YDPI
For TIFF, use to specify the Y direction DPI.
Definition imgcodecs.hpp:105
@ IMWRITE_WEBP_QUALITY
For WEBP, it can be a quality from 1 to 100 (the higher is the better). By default (without any param...
Definition imgcodecs.hpp:100
@ IMWRITE_PNG_BILEVEL
Binary level PNG, 0 or 1, default is 0.
Definition imgcodecs.hpp:95
@ IMWRITE_JPEG_QUALITY
For JPEG, it can be a quality from 0 to 100 (the higher is the better). Default value is 95.
Definition imgcodecs.hpp:86
@ IMWRITE_JPEG2000_COMPRESSION_X1000
For JPEG2000, use to specify the target compression rate (multiplied by 1000). The value can be from ...
Definition imgcodecs.hpp:109
@ IMWRITE_PNG_STRATEGY
One of cv::ImwritePNGFlags, default is IMWRITE_PNG_STRATEGY_RLE.
Definition imgcodecs.hpp:94
@ IMWRITE_JPEG_CHROMA_QUALITY
Separate chroma quality level, 0 - 100, default is -1 - don't use. If JPEG_LIB_VERSION < 70,...
Definition imgcodecs.hpp:91
@ IMWRITE_TIFF_RESUNIT
For TIFF, use to specify which DPI resolution unit to set; see libtiff documentation for valid values...
Definition imgcodecs.hpp:103
@ IMWRITE_PAM_TUPLETYPE
For PAM, sets the TUPLETYPE field to the corresponding string value that is defined for the format.
Definition imgcodecs.hpp:102
@ IMWRITE_AVIF_QUALITY
For AVIF, it can be a quality between 0 and 100 (the higher the better). Default is 95.
Definition imgcodecs.hpp:110
@ IMWRITE_PNG_COMPRESSION
For PNG, it can be the compression level from 0 to 9. A higher value means a smaller size and longer ...
Definition imgcodecs.hpp:93
@ IMWRITE_TIFF_COMPRESSION
For TIFF, use to specify the image compression scheme. See cv::ImwriteTiffCompressionFlags....
Definition imgcodecs.hpp:106
@ IMWRITE_JPEG_OPTIMIZE
Enable JPEG features, 0 or 1, default is False.
Definition imgcodecs.hpp:88
@ IMWRITE_EXR_DWA_COMPRESSION_LEVEL
override EXR DWA compression level (45 is default)
Definition imgcodecs.hpp:99
@ IMWRITE_HDR_COMPRESSION
specify HDR compression
Definition imgcodecs.hpp:101
@ IMWRITE_AVIF_DEPTH
For AVIF, it can be 8, 10 or 12. If >8, it is stored/read as CV_32F. Default is 8.
Definition imgcodecs.hpp:111
@ IMWRITE_HDR_COMPRESSION_NONE
Definition imgcodecs.hpp:213
@ IMWRITE_HDR_COMPRESSION_RLE
Definition imgcodecs.hpp:214
@ IMWRITE_EXR_TYPE_HALF
store as HALF (FP16)
Definition imgcodecs.hpp:168
@ IMWRITE_EXR_TYPE_FLOAT
store as FP32 (default)
Definition imgcodecs.hpp:169
@ IMWRITE_JPEG_SAMPLING_FACTOR_420
2x2,1x1,1x1(Default)
Definition imgcodecs.hpp:117
@ IMWRITE_JPEG_SAMPLING_FACTOR_422
2x1,1x1,1x1
Definition imgcodecs.hpp:118
@ IMWRITE_JPEG_SAMPLING_FACTOR_440
1x2,1x1,1x1
Definition imgcodecs.hpp:119
@ IMWRITE_JPEG_SAMPLING_FACTOR_411
4x1,1x1,1x1
Definition imgcodecs.hpp:116
@ IMWRITE_JPEG_SAMPLING_FACTOR_444
1x1,1x1,1x1(No subsampling)
Definition imgcodecs.hpp:120
@ IMWRITE_PAM_FORMAT_NULL
Definition imgcodecs.hpp:203
@ IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA
Definition imgcodecs.hpp:206
@ IMWRITE_PAM_FORMAT_BLACKANDWHITE
Definition imgcodecs.hpp:204
@ IMWRITE_PAM_FORMAT_RGB
Definition imgcodecs.hpp:207
@ IMWRITE_PAM_FORMAT_GRAYSCALE
Definition imgcodecs.hpp:205
@ IMWRITE_PAM_FORMAT_RGB_ALPHA
Definition imgcodecs.hpp:208
@ IMREAD_ANYDEPTH
If set, return 16-bit/32-bit image when the input has the corresponding depth, otherwise convert it t...
Definition imgcodecs.hpp:72
@ IMREAD_LOAD_GDAL
If set, use the gdal driver for loading the image.
Definition imgcodecs.hpp:74
@ IMREAD_IGNORE_ORIENTATION
If set, do not rotate the image according to EXIF's orientation flag.
Definition imgcodecs.hpp:81
@ IMREAD_REDUCED_COLOR_2
If set, always convert image to the 3 channel BGR color image and the image size reduced 1/2.
Definition imgcodecs.hpp:76
@ IMREAD_REDUCED_GRAYSCALE_2
If set, always convert image to the single channel grayscale image and the image size reduced 1/2.
Definition imgcodecs.hpp:75
@ IMREAD_REDUCED_GRAYSCALE_4
If set, always convert image to the single channel grayscale image and the image size reduced 1/4.
Definition imgcodecs.hpp:77
@ IMREAD_REDUCED_GRAYSCALE_8
If set, always convert image to the single channel grayscale image and the image size reduced 1/8.
Definition imgcodecs.hpp:79
@ IMREAD_ANYCOLOR
If set, the image is read in any possible color format.
Definition imgcodecs.hpp:73
@ IMREAD_REDUCED_COLOR_8
If set, always convert image to the 3 channel BGR color image and the image size reduced 1/8.
Definition imgcodecs.hpp:80
@ IMREAD_REDUCED_COLOR_4
If set, always convert image to the 3 channel BGR color image and the image size reduced 1/4.
Definition imgcodecs.hpp:78
@ IMREAD_GRAYSCALE
If set, always convert image to the single channel grayscale image (codec internal conversion).
Definition imgcodecs.hpp:70
@ IMREAD_UNCHANGED
If set, return the loaded image as is (with alpha channel, otherwise it gets cropped)....
Definition imgcodecs.hpp:69
@ IMREAD_COLOR
If set, always convert image to the 3 channel BGR color image.
Definition imgcodecs.hpp:71
@ IMWRITE_EXR_COMPRESSION_NO
no compression
Definition imgcodecs.hpp:173
@ IMWRITE_EXR_COMPRESSION_ZIPS
zlib compression, one scan line at a time
Definition imgcodecs.hpp:175
@ IMWRITE_EXR_COMPRESSION_PXR24
lossy 24-bit float compression
Definition imgcodecs.hpp:178
@ IMWRITE_EXR_COMPRESSION_PIZ
piz-based wavelet compression
Definition imgcodecs.hpp:177
@ IMWRITE_EXR_COMPRESSION_ZIP
zlib compression, in blocks of 16 scan lines
Definition imgcodecs.hpp:176
@ IMWRITE_EXR_COMPRESSION_B44
lossy 4-by-4 pixel block compression, fixed compression rate
Definition imgcodecs.hpp:179
@ IMWRITE_EXR_COMPRESSION_DWAB
lossy DCT based compression, in blocks of 256 scanlines. More efficient space wise and faster to deco...
Definition imgcodecs.hpp:182
@ IMWRITE_EXR_COMPRESSION_B44A
lossy 4-by-4 pixel block compression, flat fields are compressed more
Definition imgcodecs.hpp:180
@ IMWRITE_EXR_COMPRESSION_RLE
run length encoding
Definition imgcodecs.hpp:174
@ IMWRITE_EXR_COMPRESSION_DWAA
lossy DCT based compression, in blocks of 32 scanlines. More efficient for partial buffer access....
Definition imgcodecs.hpp:181
@ IMWRITE_TIFF_PREDICTOR_HORIZONTAL
horizontal differencing
Definition imgcodecs.hpp:161
@ IMWRITE_TIFF_PREDICTOR_FLOATINGPOINT
floating point predictor
Definition imgcodecs.hpp:162
@ IMWRITE_TIFF_PREDICTOR_NONE
no prediction scheme used
Definition imgcodecs.hpp:160
@ IMWRITE_PNG_STRATEGY_FILTERED
Use this value for data produced by a filter (or predictor).Filtered data consists mostly of small va...
Definition imgcodecs.hpp:195
@ IMWRITE_PNG_STRATEGY_FIXED
Using this value prevents the use of dynamic Huffman codes, allowing for a simpler decoder for specia...
Definition imgcodecs.hpp:198
@ IMWRITE_PNG_STRATEGY_DEFAULT
Use this value for normal data.
Definition imgcodecs.hpp:194
@ IMWRITE_PNG_STRATEGY_RLE
Use this value to limit match distances to one (run-length encoding).
Definition imgcodecs.hpp:197
@ IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY
Use this value to force Huffman encoding only (no string match).
Definition imgcodecs.hpp:196
@ IMWRITE_TIFF_COMPRESSION_DEFLATE
Deflate compression, legacy tag.
Definition imgcodecs.hpp:145
@ IMWRITE_TIFF_COMPRESSION_JPEG
JPEG DCT compression
Definition imgcodecs.hpp:132
@ IMWRITE_TIFF_COMPRESSION_OJPEG
!6.0 JPEG
Definition imgcodecs.hpp:131
@ IMWRITE_TIFF_COMPRESSION_PACKBITS
Macintosh RLE.
Definition imgcodecs.hpp:137
@ IMWRITE_TIFF_COMPRESSION_CCITTRLEW
#1 w/ word alignment
Definition imgcodecs.hpp:136
@ IMWRITE_TIFF_COMPRESSION_IT8BL
IT8 Binary line art.
Definition imgcodecs.hpp:142
@ IMWRITE_TIFF_COMPRESSION_JXL
JPEGXL: WARNING not registered in Adobe-maintained registry.
Definition imgcodecs.hpp:156
@ IMWRITE_TIFF_COMPRESSION_T85
!TIFF/FX T.85 JBIG compression
Definition imgcodecs.hpp:133
@ IMWRITE_TIFF_COMPRESSION_LERC
ESRI Lerc codec: https://github.com/Esri/lerc.
Definition imgcodecs.hpp:152
@ IMWRITE_TIFF_COMPRESSION_NEXT
NeXT 2-bit RLE.
Definition imgcodecs.hpp:135
@ IMWRITE_TIFF_COMPRESSION_DCS
Kodak DCS encoding.
Definition imgcodecs.hpp:147
@ IMWRITE_TIFF_COMPRESSION_CCITTFAX4
CCITT Group 4 fax encoding.
Definition imgcodecs.hpp:128
@ IMWRITE_TIFF_COMPRESSION_PIXARLOG
Pixar companded 11bit ZIP.
Definition imgcodecs.hpp:144
@ IMWRITE_TIFF_COMPRESSION_CCITT_T6
CCITT T.6 (TIFF 6 name)
Definition imgcodecs.hpp:129
@ IMWRITE_TIFF_COMPRESSION_ZSTD
ZSTD: WARNING not registered in Adobe-maintained registry.
Definition imgcodecs.hpp:154
@ IMWRITE_TIFF_COMPRESSION_SGILOG24
SGI Log 24-bit packed.
Definition imgcodecs.hpp:150
@ IMWRITE_TIFF_COMPRESSION_THUNDERSCAN
ThunderScan RLE.
Definition imgcodecs.hpp:138
@ IMWRITE_TIFF_COMPRESSION_LZW
Lempel-Ziv & Welch.
Definition imgcodecs.hpp:130
@ IMWRITE_TIFF_COMPRESSION_JBIG
ISO JBIG.
Definition imgcodecs.hpp:148
@ IMWRITE_TIFF_COMPRESSION_IT8MP
IT8 Monochrome picture.
Definition imgcodecs.hpp:141
@ IMWRITE_TIFF_COMPRESSION_CCITT_T4
CCITT T.4 (TIFF 6 name)
Definition imgcodecs.hpp:127
@ IMWRITE_TIFF_COMPRESSION_WEBP
WEBP: WARNING not registered in Adobe-maintained registry.
Definition imgcodecs.hpp:155
@ IMWRITE_TIFF_COMPRESSION_IT8CTPAD
IT8 CT w/padding.
Definition imgcodecs.hpp:139
@ IMWRITE_TIFF_COMPRESSION_IT8LW
IT8 Linework RLE.
Definition imgcodecs.hpp:140
@ IMWRITE_TIFF_COMPRESSION_LZMA
LZMA2.
Definition imgcodecs.hpp:153
@ IMWRITE_TIFF_COMPRESSION_CCITTRLE
CCITT modified Huffman RLE.
Definition imgcodecs.hpp:125
@ IMWRITE_TIFF_COMPRESSION_SGILOG
SGI Log Luminance RLE.
Definition imgcodecs.hpp:149
@ IMWRITE_TIFF_COMPRESSION_ADOBE_DEFLATE
Deflate compression, as recognized by Adobe.
Definition imgcodecs.hpp:146
@ IMWRITE_TIFF_COMPRESSION_CCITTFAX3
CCITT Group 3 fax encoding.
Definition imgcodecs.hpp:126
@ IMWRITE_TIFF_COMPRESSION_JP2000
Leadtools JPEG2000.
Definition imgcodecs.hpp:151
@ IMWRITE_TIFF_COMPRESSION_NONE
dump mode
Definition imgcodecs.hpp:124
@ IMWRITE_TIFF_COMPRESSION_T43
!TIFF/FX T.43 colour by layered JBIG compression
Definition imgcodecs.hpp:134
@ IMWRITE_TIFF_COMPRESSION_PIXARFILM
Pixar companded 10bit LZW.
Definition imgcodecs.hpp:143
CV_EXPORTS_W size_t imcount(const String &filename, int flags=IMREAD_ANYCOLOR)
Returns the number of images inside the give file.
static CV_WRAP bool imwritemulti(const String &filename, InputArrayOfArrays img, const std::vector< int > ¶ms=std::vector< int >())
multi-image overload for bindings
Definition imgcodecs.hpp:356
CV_EXPORTS_W bool imencode(const String &ext, InputArray img, CV_OUT std::vector< uchar > &buf, const std::vector< int > ¶ms=std::vector< int >())
Encodes an image into a memory buffer.
CV_EXPORTS_W bool haveImageReader(const String &filename)
Returns true if the specified image can be decoded by OpenCV.
CV_EXPORTS_W bool imdecodemulti(InputArray buf, int flags, CV_OUT std::vector< Mat > &mats, const cv::Range &range=Range::all())
Reads a multi-page image from a buffer in memory.
CV_EXPORTS_W bool imwrite(const String &filename, InputArray img, const std::vector< int > ¶ms=std::vector< int >())
Saves an image to a specified file.
CV_EXPORTS_W Mat imdecode(InputArray buf, int flags)
Reads an image from a buffer in memory.
CV_EXPORTS_W bool imreadmulti(const String &filename, CV_OUT std::vector< Mat > &mats, int flags=IMREAD_ANYCOLOR)
Loads a multi-page image from a file.
CV_EXPORTS_W Mat imread(const String &filename, int flags=IMREAD_COLOR)
Loads an image from a file.
CV_EXPORTS_W bool haveImageWriter(const String &filename)
Returns true if an image with the specified filename can be encoded by OpenCV.
CvArr CvSize range
Definition imgproc_c.h:781
OutputArray dst
Definition imgproc.hpp:3564
"black box" representation of the file storage associated with a file on disk.
Definition calib3d.hpp:441
Definition imgcodecs.hpp:440
iterator(ImageCollection *col)
iterator(ImageCollection *col, int end)
Definition cvstd_wrapper.hpp:74