43
#ifndef OPENCV_IMGCODECS_HPP
44
#define OPENCV_IMGCODECS_HPP
46
#include "opencv2/core.hpp"
97
IMWRITE_EXR_TYPE = (3 << 4) + 0,
145
IMWRITE_PAM_FORMAT_NULL = 0,
146
IMWRITE_PAM_FORMAT_BLACKANDWHITE = 1,
147
IMWRITE_PAM_FORMAT_GRAYSCALE = 2,
148
IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA = 3,
149
IMWRITE_PAM_FORMAT_RGB = 4,
150
IMWRITE_PAM_FORMAT_RGB_ALPHA = 5,
267
CV_EXPORTS_W
bool
imwrite(
const
String& filename, InputArray img,
268
const
std::vector<int>& params = std::vector<int>());
272
bool
imwritemulti(
const
String& filename, InputArrayOfArrays img,
273
const
std::vector<int>& params = std::vector<int>())
275
return
imwrite(filename, img, params);
309
CV_EXPORTS_W
bool
imencode(
const
String& ext, InputArray img,
310
CV_OUT std::vector<uchar>& buf,
311
const
std::vector<int>& params = std::vector<int>());
n-dimensional dense array class
Definition:
mat.hpp:802
ImwriteFlags
Imwrite flags
Definition:
imgcodecs.hpp:86
ImwriteEXRTypeFlags
Definition:
imgcodecs.hpp:108
ImwritePAMFlags
Imwrite PAM specific tupletype flags used to define the 'TUPETYPE' field of a PAM file.
Definition:
imgcodecs.hpp:144
ImreadModes
Imread flags
Definition:
imgcodecs.hpp:69
ImwriteEXRCompressionFlags
Definition:
imgcodecs.hpp:114
ImwritePNGFlags
Imwrite PNG specific flags used to tune the compression algorithm.
Definition:
imgcodecs.hpp:135
@ IMWRITE_JPEG_RST_INTERVAL
JPEG restart interval, 0 - 65535, default is 0 - no restart.
Definition:
imgcodecs.hpp:90
@ IMWRITE_JPEG_PROGRESSIVE
Enable JPEG features, 0 or 1, default is False.
Definition:
imgcodecs.hpp:88
@ IMWRITE_EXR_COMPRESSION
override EXR storage type (FLOAT (FP32) is default)
Definition:
imgcodecs.hpp:98
@ IMWRITE_TIFF_XDPI
For TIFF, use to specify the X direction DPI
Definition:
imgcodecs.hpp:102
@ IMWRITE_JPEG_LUMA_QUALITY
Separate luma quality level, 0 - 100, default is 0 - don't use.
Definition:
imgcodecs.hpp:91
@ 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_YDPI
For TIFF, use to specify the Y direction DPI
Definition:
imgcodecs.hpp:103
@ IMWRITE_WEBP_QUALITY
override EXR compression type (ZIP_COMPRESSION = 3 is default)
Definition:
imgcodecs.hpp:99
@ 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:87
@ IMWRITE_JPEG2000_COMPRESSION_X1000
For JPEG2000, use to specify the target compression rate (multiplied by 1000). The value can be from ...
Definition:
imgcodecs.hpp:105
@ 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 0 - don't use.
Definition:
imgcodecs.hpp:92
@ IMWRITE_TIFF_RESUNIT
For TIFF, use to specify which DPI resolution unit to set; see libtiff documentation for valid values
Definition:
imgcodecs.hpp:101
@ IMWRITE_PAM_TUPLETYPE
For PAM, sets the TUPLETYPE field to the corresponding string value that is defined for the format
Definition:
imgcodecs.hpp:100
@ 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 libtiff for integer constants correspondin...
Definition:
imgcodecs.hpp:104
@ IMWRITE_JPEG_OPTIMIZE
Enable JPEG features, 0 or 1, default is False.
Definition:
imgcodecs.hpp:89
@ IMWRITE_EXR_TYPE_HALF
store as HALF (FP16)
Definition:
imgcodecs.hpp:110
@ IMWRITE_EXR_TYPE_FLOAT
store as FP32 (default)
Definition:
imgcodecs.hpp:111
@ IMREAD_ANYDEPTH
If set, return 16-bit/32-bit image when the input has the corresponding depth, otherwise convert it t...
Definition:
imgcodecs.hpp:73
@ IMREAD_LOAD_GDAL
If set, use the gdal driver for loading the image.
Definition:
imgcodecs.hpp:75
@ IMREAD_IGNORE_ORIENTATION
If set, do not rotate the image according to EXIF's orientation flag.
Definition:
imgcodecs.hpp:82
@ 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:77
@ 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:76
@ 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:78
@ 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:80
@ IMREAD_ANYCOLOR
If set, the image is read in any possible color format.
Definition:
imgcodecs.hpp:74
@ 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:81
@ 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:79
@ IMREAD_GRAYSCALE
If set, always convert image to the single channel grayscale image (codec internal conversion).
Definition:
imgcodecs.hpp:71
@ IMREAD_UNCHANGED
If set, return the loaded image as is (with alpha channel, otherwise it gets cropped)....
Definition:
imgcodecs.hpp:70
@ IMREAD_COLOR
If set, always convert image to the 3 channel BGR color image.
Definition:
imgcodecs.hpp:72
@ IMWRITE_EXR_COMPRESSION_NO
no compression
Definition:
imgcodecs.hpp:115
@ IMWRITE_EXR_COMPRESSION_ZIPS
zlib compression, one scan line at a time
Definition:
imgcodecs.hpp:117
@ IMWRITE_EXR_COMPRESSION_PXR24
lossy 24-bit float compression
Definition:
imgcodecs.hpp:120
@ IMWRITE_EXR_COMPRESSION_PIZ
piz-based wavelet compression
Definition:
imgcodecs.hpp:119
@ IMWRITE_EXR_COMPRESSION_ZIP
zlib compression, in blocks of 16 scan lines
Definition:
imgcodecs.hpp:118
@ IMWRITE_EXR_COMPRESSION_B44
lossy 4-by-4 pixel block compression, fixed compression rate
Definition:
imgcodecs.hpp:121
@ IMWRITE_EXR_COMPRESSION_DWAB
lossy DCT based compression, in blocks of 256 scanlines. More efficient space wise and faster to deco...
Definition:
imgcodecs.hpp:124
@ IMWRITE_EXR_COMPRESSION_B44A
lossy 4-by-4 pixel block compression, flat fields are compressed more
Definition:
imgcodecs.hpp:122
@ IMWRITE_EXR_COMPRESSION_RLE
run length encoding
Definition:
imgcodecs.hpp:116
@ IMWRITE_EXR_COMPRESSION_DWAA
lossy DCT based compression, in blocks of 32 scanlines. More efficient for partial buffer access....
Definition:
imgcodecs.hpp:123
@ 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:137
@ IMWRITE_PNG_STRATEGY_FIXED
Using this value prevents the use of dynamic Huffman codes, allowing for a simpler decoder for specia...
Definition:
imgcodecs.hpp:140
@ IMWRITE_PNG_STRATEGY_DEFAULT
Use this value for normal data.
Definition:
imgcodecs.hpp:136
@ IMWRITE_PNG_STRATEGY_RLE
Use this value to limit match distances to one (run-length encoding).
Definition:
imgcodecs.hpp:139
@ IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY
Use this value to force Huffman encoding only (no string match).
Definition:
imgcodecs.hpp:138
CV_EXPORTS_W size_t imcount(const String &filename, int flags=IMREAD_ANYCOLOR)
Returns the number of images inside the give file
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 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
"black box" representation of the file storage associated with a file on disk.
Definition:
aruco.hpp:75