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

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.

主站蜘蛛池模板: 合江县| 防城港市| 柘荣县| 樟树市| 普兰店市| 丹巴县| 翁牛特旗| 夏津县| 交口县| 来凤县| 绥德县| 长治市| 长乐市| 菏泽市| 灌阳县| 当雄县| 巴彦县| 沾化县| 清新县| 武鸣县| 微山县| 赤峰市| 仪征市| 马鞍山市| 黑龙江省| 德惠市| 手游| 博客| 精河县| 金昌市| 中江县| 集安市| 石阡县| 新丰县| 德安县| 陵水| 阳东县| 宁明县| 桓仁| 梅州市| 布尔津县|