From 7579cd806868b10d32a02a26b6b41ac523b1a617 Mon Sep 17 00:00:00 2001 From: pascal Date: Wed, 21 Nov 2018 17:59:37 +0100 Subject: [PATCH] updated documentation for imread and imwrite (added pfm image format) --- modules/imgcodecs/include/opencv2/imgcodecs.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/imgcodecs/include/opencv2/imgcodecs.hpp b/modules/imgcodecs/include/opencv2/imgcodecs.hpp index 822e5c7..26cfabf 100644 --- a/modules/imgcodecs/include/opencv2/imgcodecs.hpp +++ b/modules/imgcodecs/include/opencv2/imgcodecs.hpp @@ -145,6 +145,7 @@ Currently, the following file formats are supported: - Portable Network Graphics - \*.png (see the *Note* section) - WebP - \*.webp (see the *Note* section) - Portable image format - \*.pbm, \*.pgm, \*.ppm \*.pxm, \*.pnm (always supported) +- PFM files - \*.pfm (see the *Note* section) - Sun rasters - \*.sr, \*.ras (always supported) - TIFF files - \*.tiff, \*.tif (see the *Note* section) - OpenEXR Image files - \*.exr (see the *Note* section) @@ -171,6 +172,7 @@ Currently, the following file formats are supported: [Vector](http://www.gdal.org/ogr_formats.html). - If EXIF information are embedded in the image file, the EXIF orientation will be taken into account and thus the image will be rotated accordingly except if the flag @ref IMREAD_IGNORE_ORIENTATION is passed. +- Use the IMREAD_UNCHANGED flag to keep the floating point values from PFM image. @param filename Name of file to be loaded. @param flags Flag that can take values of cv::ImreadModes @@ -195,8 +197,9 @@ single-channel or 3-channel (with 'BGR' channel order) images can be saved using this function, with these exceptions: - 16-bit unsigned (CV_16U) images can be saved in the case of PNG, JPEG 2000, and TIFF formats -- 32-bit float (CV_32F) images can be saved in TIFF, OpenEXR, and Radiance HDR formats; 3-channel -(CV_32FC3) TIFF images will be saved using the LogLuv high dynamic range encoding (4 bytes per pixel) +- 32-bit float (CV_32F) images can be saved in PFM, TIFF, OpenEXR, and Radiance HDR formats; + 3-channel (CV_32FC3) TIFF images will be saved using the LogLuv high dynamic range encoding + (4 bytes per pixel) - PNG images with an alpha channel can be saved using this function. To do this, create 8-bit (or 16-bit) 4-channel image BGRA, where the alpha channel goes last. Fully transparent pixels should have alpha set to 0, fully opaque pixels should have alpha set to 255/65535 (see the code sample below). -- 2.7.4