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

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.

主站蜘蛛池模板: 南乐县| 拉萨市| 汪清县| 星座| 鹤岗市| 望都县| 和静县| 澄江县| 洪湖市| 芜湖县| 饶阳县| 图木舒克市| 怀宁县| 阿鲁科尔沁旗| 阿巴嘎旗| 民权县| 河曲县| 华容县| 静宁县| 武邑县| 休宁县| 兰考县| 伊宁市| 安平县| 清苑县| 东乌珠穆沁旗| 济南市| 鲁山县| 庆云县| 普格县| 平原县| 晋江市| 郑州市| 南通市| 阿拉善右旗| 富裕县| 历史| 牟定县| 郴州市| 汪清县| 巩留县|