OpenCV  4.0.0-rc
Open Source Computer Vision
Namespaces | Enumerations | Functions
imgcodecs.hpp File Reference
#include "opencv2/core.hpp"

Namespaces

 cv
 "black box" representation of the file storage associated with a file on disk.
 

Enumerations

enum  {
  CV_LOAD_IMAGE_UNCHANGED =-1,
  CV_LOAD_IMAGE_GRAYSCALE =0,
  CV_LOAD_IMAGE_COLOR =1,
  CV_LOAD_IMAGE_ANYDEPTH =2,
  CV_LOAD_IMAGE_ANYCOLOR =4,
  CV_LOAD_IMAGE_IGNORE_ORIENTATION =128
}
 
enum  {
  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_PNG_COMPRESSION =16,
  CV_IMWRITE_PNG_STRATEGY =17,
  CV_IMWRITE_PNG_BILEVEL =18,
  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,
  CV_IMWRITE_PXM_BINARY =32,
  CV_IMWRITE_EXR_TYPE = 48,
  CV_IMWRITE_WEBP_QUALITY =64,
  CV_IMWRITE_PAM_TUPLETYPE = 128,
  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
}
 
enum  cv::ImreadModes {
  cv::IMREAD_UNCHANGED = -1,
  cv::IMREAD_GRAYSCALE = 0,
  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
}
 Imread flags. More...
 
enum  cv::ImwriteEXRTypeFlags {
  cv::IMWRITE_EXR_TYPE_HALF = 1,
  cv::IMWRITE_EXR_TYPE_FLOAT = 2
}
 
enum  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_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_WEBP_QUALITY = 64,
  cv::IMWRITE_PAM_TUPLETYPE = 128,
  cv::IMWRITE_TIFF_RESUNIT = 256,
  cv::IMWRITE_TIFF_XDPI = 257,
  cv::IMWRITE_TIFF_YDPI = 258
}
 Imwrite flags. More...
 
enum  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
}
 Imwrite PAM specific tupletype flags used to define the 'TUPETYPE' field of a PAM file. More...
 
enum  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
}
 Imwrite PNG specific flags used to tune the compression algorithm. More...
 

Functions

bool cv::haveImageReader (const String &filename)
 Returns true if the specified image can be decoded by OpenCV. More...
 
bool cv::haveImageWriter (const String &filename)
 Returns true if an image with the specified filename can be encoded by OpenCV. More...
 
Mat cv::imdecode (InputArray buf, int flags)
 Reads an image from a buffer in memory. More...
 
Mat cv::imdecode (InputArray buf, int flags, Mat *dst)
 
bool cv::imencode (const String &ext, InputArray img, std::vector< uchar > &buf, const std::vector< int > &params=std::vector< int >())
 Encodes an image into a memory buffer. More...
 
Mat cv::imread (const String &filename, int flags=IMREAD_COLOR)
 Loads an image from a file. More...
 
bool cv::imreadmulti (const String &filename, std::vector< Mat > &mats, int flags=IMREAD_ANYCOLOR)
 Loads a multi-page image from a file. More...
 
bool cv::imwrite (const String &filename, InputArray img, const std::vector< int > &params=std::vector< int >())
 Saves an image to a specified file. More...
 

Enumeration Type Documentation

§ anonymous enum

anonymous enum
Enumerator
CV_LOAD_IMAGE_UNCHANGED 
CV_LOAD_IMAGE_GRAYSCALE 
CV_LOAD_IMAGE_COLOR 
CV_LOAD_IMAGE_ANYDEPTH 
CV_LOAD_IMAGE_ANYCOLOR 
CV_LOAD_IMAGE_IGNORE_ORIENTATION 

§ anonymous enum

anonymous enum
Enumerator
CV_IMWRITE_JPEG_QUALITY 
CV_IMWRITE_JPEG_PROGRESSIVE 
CV_IMWRITE_JPEG_OPTIMIZE 
CV_IMWRITE_JPEG_RST_INTERVAL 
CV_IMWRITE_JPEG_LUMA_QUALITY 
CV_IMWRITE_JPEG_CHROMA_QUALITY 
CV_IMWRITE_PNG_COMPRESSION 
CV_IMWRITE_PNG_STRATEGY 
CV_IMWRITE_PNG_BILEVEL 
CV_IMWRITE_PNG_STRATEGY_DEFAULT 
CV_IMWRITE_PNG_STRATEGY_FILTERED 
CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY 
CV_IMWRITE_PNG_STRATEGY_RLE 
CV_IMWRITE_PNG_STRATEGY_FIXED 
CV_IMWRITE_PXM_BINARY 
CV_IMWRITE_EXR_TYPE 
CV_IMWRITE_WEBP_QUALITY 
CV_IMWRITE_PAM_TUPLETYPE 
CV_IMWRITE_PAM_FORMAT_NULL 
CV_IMWRITE_PAM_FORMAT_BLACKANDWHITE 
CV_IMWRITE_PAM_FORMAT_GRAYSCALE 
CV_IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA 
CV_IMWRITE_PAM_FORMAT_RGB 
CV_IMWRITE_PAM_FORMAT_RGB_ALPHA