官术网_书友最值得收藏!

File extensions

Although the images we are going to manipulate in OpenCV can be seen as rectangular arrays of RGB triplets (in the case of RGB images), they are not necessarily created, stored, or transmitted in that format. In this sense, some file formats, such as GIF, PNG, bitmaps, or JPEG, use different forms of compression (lossless or lossy) to represent images more efficiently.

In this way, and for the sake of completeness, a brief introduction to these image files is given here, with a special focus on the file formats supported by OpenCV. The following file formats (with the associated file extensions) are supported by OpenCV:

  • Windows bitmaps: *.bmp and *.dib
  • JPEG files: *.jpeg, *.jpg, and *.jpe
  • JPEG 2000 files: *.jp2
  • Portable Network Graphics: *.png
  • Portable image format: *.pbm, *.pgm, and *.ppm
  • TIFF files: *.tiff and *.tif

The Bitmap image file (BMP) or device independent bitmap (DIB) file format is a raster image file format that's used to store bitmap digital images. The BMP file format can deal with 2D digital images in various color depths and, optionally, with data compression, alpha channels, or color profiles. 

Joint Photographic Experts Group (JPEG) is a raster image file format that's used to store images that have been compressed to store a lot of information in a small file. 

JPEG 2000 is an image compression standard and coding system that uses wavelet-based compression techniques offering a high level of scalability and accessibility. In this way, JPEG 2000 compresses images with fewer artefacts than a regular JPEG.

Portable Network Graphics (PNG) is a compressed raster graphics file format, which was introduced in 1994 as an improved replacement for Graphics Interchange Format (GIF).

The portable pixmap format (PPM), the portable bitmap format (PBM), and the portable graymap format (PGM) specify rules for exchanging graphics files. Several applications refer to these file formats collectively as the portable anymap format (PNM). These files are a convenient and simple method of saving image data. Additionally, they are easy to read. In this sense, the PPM, PBM, and PGM formats are all designed to be as simple as possible.

Tagged Image File Format (TIFF) is an adaptable file format for handling images and data within a single file.

The lossless and lossy types of compression algorithms are applied to the image, resulting in images that are smaller than the uncompressed image. On the one hand, in lossless compression algorithms, the resulting image is equivalent to the original, meaning that after reversing the compression process, the resulting image is equivalent (equal) to the original. On the other hand, in lossy compression algorithms, the resulting image is not equivalent to the original, meaning that some details in the image are lost. In this sense, in many lossy compression algorithms, the level of compression can be adjusted.

主站蜘蛛池模板: 利辛县| 凤庆县| 阿尔山市| 沂水县| 穆棱市| 汶川县| 闸北区| 哈尔滨市| 伊宁市| 泰宁县| 许昌市| 潼关县| 永丰县| 钦州市| 淳化县| 汉沽区| 潮州市| 汝南县| 建水县| 石渠县| 中宁县| 林周县| 武山县| 视频| 阜城县| 海丰县| 张家川| 苗栗市| 大邑县| 廉江市| 宁远县| 化州市| 汪清县| 法库县| 延川县| 枣庄市| 凌海市| 玉门市| 平顶山市| 沧州市| 太保市|