OpenCV 4.11.0
开源计算机视觉
加载中…
搜索中…
无匹配项
imgcodecs.hpp 文件参考
#include "opencv2/core.hpp"
imgcodecs.hpp 的包含依赖关系图
此图显示哪些文件直接或间接包含此文件

结构体  cv::Animation
 表示包含多个帧的动画。Animation 结构体旨在存储和管理动画序列的数据,例如来自动画格式(例如,GIF、AVIF、APNG、WebP)的数据。它支持循环、背景颜色设置、帧时间和帧存储。更多…
 
类  cv::ImageCollection
 按需读取多页图像。更多…
 
结构体  cv::ImageCollection::iterator
 

命名空间

命名空间  cv
 

枚举

枚举  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
}
 图像读取标志。更多…
 
枚举  cv::ImwriteEXRCompressionFlags {
  cv::IMWRITE_EXR_COMPRESSION_NO = 0 ,
  cv::IMWRITE_EXR_COMPRESSION_RLE = 1 ,
  cv::IMWRITE_EXR_COMPRESSION_ZIPS = 2 ,
  cv::IMWRITE_EXR_COMPRESSION_ZIP = 3 ,
  cv::IMWRITE_EXR_COMPRESSION_PIZ = 4 ,
  cv::IMWRITE_EXR_COMPRESSION_PXR24 = 5 ,
  cv::IMWRITE_EXR_COMPRESSION_B44 = 6 ,
  cv::IMWRITE_EXR_COMPRESSION_B44A = 7 ,
  cv::IMWRITE_EXR_COMPRESSION_DWAA = 8 ,
  cv::IMWRITE_EXR_COMPRESSION_DWAB = 9
}
 
枚举  cv::ImwriteEXRTypeFlags {
  cv::IMWRITE_EXR_TYPE_HALF = 1 ,
  cv::IMWRITE_EXR_TYPE_FLOAT = 2
}
 
枚举  cv::ImwriteFlags {
  cv::IMWRITE_JPEG_QUALITY = 1 ,
  cv::IMWRITE_JPEG_PROGRESSIVE = 2 ,
  cv::IMWRITE_JPEG_OPTIMIZE = 3 ,
  cv::IMWRITE_JPEG_RST_INTERVAL = 4 ,
  cv::IMWRITE_JPEG_LUMA_QUALITY = 5 ,
  cv::IMWRITE_JPEG_CHROMA_QUALITY = 6 ,
  cv::IMWRITE_JPEG_SAMPLING_FACTOR = 7 ,
  cv::IMWRITE_PNG_COMPRESSION = 16 ,
  cv::IMWRITE_PNG_STRATEGY = 17 ,
  cv::IMWRITE_PNG_BILEVEL = 18 ,
  cv::IMWRITE_PXM_BINARY = 32 ,
  cv::IMWRITE_EXR_TYPE = (3 << 4) + 0 ,
  cv::IMWRITE_EXR_COMPRESSION = (3 << 4) + 1 ,
  cv::IMWRITE_EXR_DWA_COMPRESSION_LEVEL = (3 << 4) + 2 ,
  cv::IMWRITE_WEBP_QUALITY = 64 ,
  cv::IMWRITE_HDR_COMPRESSION = (5 << 4) + 0 ,
  cv::IMWRITE_PAM_TUPLETYPE = 128 ,
  cv::IMWRITE_TIFF_RESUNIT = 256 ,
  cv::IMWRITE_TIFF_XDPI = 257 ,
  cv::IMWRITE_TIFF_YDPI = 258 ,
  cv::IMWRITE_TIFF_COMPRESSION = 259 ,
  cv::IMWRITE_TIFF_ROWSPERSTRIP = 278 ,
  cv::IMWRITE_TIFF_PREDICTOR = 317 ,
  cv::IMWRITE_JPEG2000_COMPRESSION_X1000 = 272 ,
  cv::IMWRITE_AVIF_QUALITY = 512 ,
  cv::IMWRITE_AVIF_DEPTH = 513 ,
  cv::IMWRITE_AVIF_SPEED = 514 ,
  cv::IMWRITE_JPEGXL_QUALITY = 640 ,
  cv::IMWRITE_JPEGXL_EFFORT = 641 ,
  cv::IMWRITE_JPEGXL_DISTANCE = 642 ,
  cv::IMWRITE_JPEGXL_DECODING_SPEED = 643 ,
  cv::IMWRITE_GIF_LOOP = 1024 ,
  cv::IMWRITE_GIF_SPEED = 1025 ,
  cv::IMWRITE_GIF_QUALITY = 1026 ,
  cv::IMWRITE_GIF_DITHER = 1027 ,
  cv::IMWRITE_GIF_TRANSPARENCY = 1028 ,
  cv::IMWRITE_GIF_COLORTABLE = 1029
}
 图像写入标志。更多…
 
枚举  cv::ImwriteGIFCompressionFlags {
  cv::IMWRITE_GIF_FAST_NO_DITHER = 1 ,
  cv::IMWRITE_GIF_FAST_FLOYD_DITHER = 2 ,
  cv::IMWRITE_GIF_COLORTABLE_SIZE_8 = 3 ,
  cv::IMWRITE_GIF_COLORTABLE_SIZE_16 = 4 ,
  cv::IMWRITE_GIF_COLORTABLE_SIZE_32 = 5 ,
  cv::IMWRITE_GIF_COLORTABLE_SIZE_64 = 6 ,
  cv::IMWRITE_GIF_COLORTABLE_SIZE_128 = 7 ,
  cv::IMWRITE_GIF_COLORTABLE_SIZE_256 = 8
}
 IMWRITE_GIF_QUALITY 参数键的 GIF 特定值,如果大于 3,则与颜色表的大小相关。更多…
 
枚举  cv::ImwriteHDRCompressionFlags {
  cv::IMWRITE_HDR_COMPRESSION_NONE = 0 ,
  cv::IMWRITE_HDR_COMPRESSION_RLE = 1
}
 IMWRITE_HDR_COMPRESSION 参数键的 HDR 特定值。更多…
 
枚举  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
}
 
枚举  cv::ImwritePAMFlags {
  cv::IMWRITE_PAM_FORMAT_NULL = 0 ,
  cv::IMWRITE_PAM_FORMAT_BLACKANDWHITE = 1 ,
  cv::IMWRITE_PAM_FORMAT_GRAYSCALE = 2 ,
  cv::IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA = 3 ,
  cv::IMWRITE_PAM_FORMAT_RGB = 4 ,
  cv::IMWRITE_PAM_FORMAT_RGB_ALPHA = 5
}
 用于定义 PAM 文件“TUPLETYPE”字段的 PAM 文件特定 tupletype 标志。更多…
 
枚举  cv::ImwritePNGFlags {
  cv::IMWRITE_PNG_STRATEGY_DEFAULT = 0 ,
  cv::IMWRITE_PNG_STRATEGY_FILTERED = 1 ,
  cv::IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY = 2 ,
  cv::IMWRITE_PNG_STRATEGY_RLE = 3 ,
  cv::IMWRITE_PNG_STRATEGY_FIXED = 4
}
 用于调整压缩算法的 PNG 特定标志。更多…
 
枚举  cv::ImwriteTiffCompressionFlags {
  cv::IMWRITE_TIFF_COMPRESSION_NONE = 1 ,
  cv::IMWRITE_TIFF_COMPRESSION_CCITTRLE = 2 ,
  cv::IMWRITE_TIFF_COMPRESSION_CCITTFAX3 = 3 ,
  cv::IMWRITE_TIFF_COMPRESSION_CCITT_T4 = 3 ,
  cv::IMWRITE_TIFF_COMPRESSION_CCITTFAX4 = 4 ,
  cv::IMWRITE_TIFF_COMPRESSION_CCITT_T6 = 4 ,
  cv::IMWRITE_TIFF_COMPRESSION_LZW = 5 ,
  cv::IMWRITE_TIFF_COMPRESSION_OJPEG = 6 ,
  cv::IMWRITE_TIFF_COMPRESSION_JPEG = 7 ,
  cv::IMWRITE_TIFF_COMPRESSION_T85 = 9 ,
  cv::IMWRITE_TIFF_COMPRESSION_T43 = 10 ,
  cv::IMWRITE_TIFF_COMPRESSION_NEXT = 32766 ,
  cv::IMWRITE_TIFF_COMPRESSION_CCITTRLEW = 32771 ,
  cv::IMWRITE_TIFF_COMPRESSION_PACKBITS = 32773 ,
  cv::IMWRITE_TIFF_COMPRESSION_THUNDERSCAN = 32809 ,
  cv::IMWRITE_TIFF_COMPRESSION_IT8CTPAD = 32895 ,
  cv::IMWRITE_TIFF_COMPRESSION_IT8LW = 32896 ,
  cv::IMWRITE_TIFF_COMPRESSION_IT8MP = 32897 ,
  cv::IMWRITE_TIFF_COMPRESSION_IT8BL = 32898 ,
  cv::IMWRITE_TIFF_COMPRESSION_PIXARFILM = 32908 ,
  cv::IMWRITE_TIFF_COMPRESSION_PIXARLOG = 32909 ,
  cv::IMWRITE_TIFF_COMPRESSION_DEFLATE = 32946 ,
  cv::IMWRITE_TIFF_COMPRESSION_ADOBE_DEFLATE = 8 ,
  cv::IMWRITE_TIFF_COMPRESSION_DCS = 32947 ,
  cv::IMWRITE_TIFF_COMPRESSION_JBIG = 34661 ,
  cv::IMWRITE_TIFF_COMPRESSION_SGILOG = 34676 ,
  cv::IMWRITE_TIFF_COMPRESSION_SGILOG24 = 34677 ,
  cv::IMWRITE_TIFF_COMPRESSION_JP2000 = 34712 ,
  cv::IMWRITE_TIFF_COMPRESSION_LERC = 34887 ,
  cv::IMWRITE_TIFF_COMPRESSION_LZMA = 34925 ,
  cv::IMWRITE_TIFF_COMPRESSION_ZSTD = 50000 ,
  cv::IMWRITE_TIFF_COMPRESSION_WEBP = 50001 ,
  cv::IMWRITE_TIFF_COMPRESSION_JXL = 50002
}
 
枚举  cv::ImwriteTiffPredictorFlags {
  cv::IMWRITE_TIFF_PREDICTOR_NONE = 1 ,
  cv::IMWRITE_TIFF_PREDICTOR_HORIZONTAL = 2 ,
  cv::IMWRITE_TIFF_PREDICTOR_FLOATINGPOINT = 3
}
 

函数

CV_EXPORTS_W bool cv::haveImageReader (const String &filename)
 检查OpenCV是否可以解码指定的图像文件。
 
CV_EXPORTS_W bool cv::haveImageWriter (const String &filename)
 检查OpenCV是否可以编码指定的图像文件或指定的扩展名。
 
CV_EXPORTS_W size_t cv::imcount (const String &filename, int flags=IMREAD_ANYCOLOR)
 返回给定文件中图像的数量。
 
CV_EXPORTS_W Mat cv::imdecode (InputArray buf, int flags)
 从内存缓冲区读取图像。
 
CV_EXPORTS Mat cv::imdecode (InputArray buf, int flags, Mat *dst)
 
CV_EXPORTS_W bool cv::imdecodemulti (InputArray buf, int flags, CV_OUT std::vector< Mat > &mats, const cv::Range &range=Range::all())
 从内存缓冲区读取多页图像。
 
CV_EXPORTS_W bool cv::imencode (const String &ext, InputArray img, CV_OUT std::vector< uchar > &buf, const std::vector< int > &params=std::vector< int >())
 将图像编码到内存缓冲区。
 
CV_EXPORTS_W bool cv::imencodemulti (const String &ext, InputArrayOfArrays imgs, CV_OUT std::vector< uchar > &buf, const std::vector< int > &params=std::vector< int >())
 将图像数组编码到内存缓冲区。
 
CV_EXPORTS_W Mat cv::imread (const String &filename, int flags=IMREAD_COLOR_BGR)
 从文件加载图像。
 
CV_EXPORTS_W void cv::imread (const String &filename, OutputArray dst, int flags=IMREAD_COLOR_BGR)
 从文件加载图像。
 
CV_EXPORTS_W bool cv::imreadanimation (const String &filename, CV_OUT Animation &animation, int start=0, int count=INT16_MAX)
 将动画图像文件的帧加载到Animation结构体中。
 
CV_EXPORTS_W bool cv::imreadmulti (const String &filename, CV_OUT std::vector< Mat > &mats, int flags=IMREAD_ANYCOLOR)
 从文件加载多页图像。
 
CV_EXPORTS_W bool cv::imreadmulti (const String &filename, CV_OUT std::vector< Mat > &mats, int start, int count, int flags=IMREAD_ANYCOLOR)
 从文件加载多页图像中的图像。
 
CV_EXPORTS_W bool cv::imwrite (const String &filename, InputArray img, const std::vector< int > &params=std::vector< int >())
 将图像保存到指定文件。
 
CV_EXPORTS_W bool cv::imwriteanimation (const String &filename, const Animation &animation, const std::vector< int > &params=std::vector< int >())
 Animation保存到指定文件。
 
static CV_WRAP bool cv::imwritemulti (const String &filename, InputArrayOfArrays img, const std::vector< int > &params=std::vector< int >())
 用于绑定的多图像重载。