图像有损压缩与无损压缩_有损压缩与无损压缩之间的区别

图像有损压缩与无损压缩

Lossy and lossless compression are two kinds of data compression techniques. Here in this article, you will get to learn about what is lossy and lossless compression, their differences, and uses.

有损和无损压缩是两种数据压缩技术。 在本文的此处,您将了解什么是有损和无损压缩,它们的区别和用途。

So, let’s start with the basics.

因此,让我们从基础开始。

什么是数据压缩? (What is Data Compression?)

Data compression is the process of diminishing the storage size of any data or file so that it consumes less space on the disk. It is the technique of modifying, restructuring, encoding and converting the schema or instance of any data to reduce its size.

数据压缩是减小任何数据或文件的存储大小,以使其在磁盘上占用较少空间的过程。 它是一种修改,重组,编码和转换任何数据的模式或实例以减小其大小的技术。

In simple words, it is converting the file in such a way that its size is reduced to a maximum extent. Data compressions is also known as bit-rate reduction or source coding.

简而言之,它将以最大程度减小文件大小的方式转换文件。 数据压缩也称为比特率降低或源编码。

Check the diagram below:

检查下图:

Data-compression

An example of an image that is converted or compressed to reduce its size without losing the ability to reconstruct the image.

转换或压缩以减小其尺寸而又不损失重建图像能力的图像的示例。

Now, the question here is why there is a need for data compression?

现在,这里的问题是为什么需要数据压缩?

There are two primary reasons for the same.

造成这种情况的主要原因有两个。

  • Storage – it helps in reducing the size of data that is required to store it on the disk

    存储–它有助于减少将数据存储在磁盘上所需的数据量

  • Time – saves time in data transmission as the size is reduced to an extent

    时间–尺寸减小到一定程度,节省了数据传输时间

You are getting the point!

您明白了!

Now coming back to the main topic, there are mainly two types of data compression techniques. Let’s discuss them.

现在回到主要主题,主要有两种类型的数据压缩技术。 让我们讨论一下。

数据压缩技术 (Data Compression Techniques)

Data-compression-techniques
有损压缩 (Lossy Compression)

Lossy compression is a technique that involves the elimination of a specific amount of data. It helps in reducing the file size to a great extent without any noticeable thing. Also, once the file is compressed, it cannot be restored back to its original form as the data from the file is significantly reduced. This technique is much more useful when the quality of the file is not essential. Additionally, it helps to save much space on the disk to store the data.

有损压缩是一种涉及消除特定数量数据的技术。 它有助于在没有任何明显注意的情况下大大减小文件大小。 同样,一旦压缩了文件,由于来自文件的数据将大大减少,因此无法将其恢复为原始格式。 当文件的质量不是很重要时,此技术会更加有用。 此外,它有助于节省磁盘上的大量空间来存储数据。

Lossy compression is not useful when the quality of the file is essential. Besides, if there’s any further analysis to be processed on the record, this method is not ideal. This method is generally used for audio and video compression, where there is a significant amount of data loss, and even users cannot recognize it.

当文件的质量至关重要时,有损压缩是没有用的。 此外,如果记录上有任何进一步的分析要处理,这种方法也不理想。 此方法通常用于音频和视频压缩,这会导致大量数据丢失,甚至用户也无法识别它。

Example of lossy compression: JPEG image

有损压缩的示例:JPEG图像

lossy-compression

Image Source

图片来源

“Compressed image (left) shows blocking artifacts compared to the original image (right) as a result of the JPEG compression scheme used.”

“由于使用了JPEG压缩方案,与原始图像(右)相比,压缩图像(左)显示出块状伪影。”

无损压缩 (Lossless Compression)

Lossless compression is a technique that involves only a certain amount of elimination of data. This technique also helps in reducing the file size, but not to the greater extent as that of lossy compression. Instead, in this method, if the file is compressed, it can be restored back to its original form. Further, the quality of the data is not compromised; hence, the reduction in size is not much.

无损压缩是一种仅涉及消除一定量数据的技术。 此技术还有助于减小文件大小,但不会像有损压缩那样在很大程度上。 相反,在这种方法中,如果文件被压缩,则可以将其还原回其原始形式。 此外,数据的质量不会受到影响; 因此,尺寸减小不多。

Lossless compression is not useful when you want reduced size for extra storage. Also, if there is any further analysis to be performed on the file, lossless compression is not beneficial. It is useful for maintaing the originality of files by eliminating only unwanted data. This technique is commonly used for text files, sensitive documents, and confidential information.

当您希望减小尺寸以增加存储空间时,无损压缩将无用。 此外,如果要对文件执行任何进一步的分析,则无损压缩将无益。 通过仅消除不需要的数据,对于保持文件的原始性很有用。 此技术通常用于文本文件,敏感文档和机密信息。

Example of lossless compression: PNG image

无损压缩示例:PNG图像

lossless-compression

Image Source

图片来源

“The original image (left) is identical to the compressed image (right). It is represented by the identical graphs at the bottom that show the grey values for the pixels in each column is the same between the two images.”

“原始图像(左)与压缩图像(右)相同。 它由底部的相同图形表示,该图形显示两列图像中每列像素的灰度值相同。”

有损压缩与无损压缩之间的区别 (Difference between Lossy and Lossless Compression)

BasisLossy CompressionLossless Compression
DefinitionLossy compression is a technique that involves the elimination of a specific amount of data. It helps in reducing the file size to a great extent without any noticeable thingLossless compression is a technique that involves only a certain amount of elimination of data. This technique also helps in reducing the file size, but not to the greater extent
Compression RatioHighLow
File QualityLowHigh
Elimination of DataEven the necessary data is also removed which isn’t noticeableOnly some specific amount of unwanted data is removed
RestorationCannot restore its original formCan restore its original form
Loss of InformationThis technique involves some loss of informationThis technique doesn’t include any loss of information
Data AccommodationMore data accommodationLess data accommodation
DistortionFiles are distortedNo distortion
Data holding capacityMoreLess
Algorithms UsedTransform coding, DCT, DWT, fractal compression, RSSMSRLW, LZW, Arithmetic encoding, Huffman encoding, Shannon Fano coding
File TypesJPEG, GIF, MP3, MP4, MKV, OGG, etc.RAW, BMP, PNG, WAV, FLAC, ALAC, etc.
基础 有损压缩 无损压缩
定义 有损压缩是一种涉及消除特定数量数据的技术。 它有助于在没有任何明显注意的情况下大大减小文件大小 无损压缩是一种仅涉及消除一定量数据的技术。 此技术还有助于减小文件大小,但不会在更大程度上
压缩率
档案品质
消除数据 即使必要的数据也被删除,这并不明显 仅删除了特定数量的有害数据
恢复 无法恢复其原始形式 可以恢复其原始形式
信息丢失 此技术涉及一些信息丢失 此技术不包括任何信息丢失
数据调整 更多数据住宿 数据容纳量减少
失真 文件变形 无失真
资料储存能力 更多
使用的算法 变换编码,DCT,DWT,分形压缩,RSSMS RLW,LZW,算术编码,霍夫曼编码,香农法诺编码
文件类型 JPEG,GIF,MP3,MP4,MKV,OGG等 RAW,BMP,PNG,WAV,FLAC,ALAC等

使用哪个? (Which One to Use?)

Although both are the types of data compression, each can be useful under different situations. Like, lossy compression helps in reducing the file size, which means it is helpful to those who have vast amounts of data stored on the database. So, this technique is useful in storing the data with a much-diminished size. Also, for webpages files of such lower size is beneficial for faster loading.

尽管这两种都是数据压缩的类型,但是每种压缩在不同情况下都是有用的。 像,有损压缩有助于减小文件大小,这对那些在数据库上存储大量数据的用户有帮助。 因此,此技术在存储大小减小的数据时很有用。 同样,对于网页而言,这种较小的文件有利于更快地加载。

Further, this process doesn’t allow any after analysis of the data once the compression is completed. Also, the file cannot be restructured in its original form as it involves the loss of data.

此外,压缩完成后,此过程将不允许对数据进行任何后续分析。 同样,该文件不能以其原始形式进行重组,因为它涉及数据丢失。

Unlike lossy compression, lossless compression doesn’t involve any loss of data. Neither the quality of data is compromised, nor the size of data is excessively reduced. It keeps the original format so it can be restored, and further operation can be performed. This method is helpful for those who need to access the data back again without compromising its quality.

与有损压缩不同,无损压缩不涉及任何数据丢失。 既不会损害数据质量,也不会过度减少数据大小。 它保留了原始格式,因此可以还原,并且可以执行进一步的操作。 此方法对需要再次访问数据而不影响其质量的用户很有用。

最后的话 (Final Words)

Both lossy compression and lossless compression helps in the compression of data in their unique way. While lossy compression is useful to store data by compromising the data, lossless compression doesn’t. Lossless compression technique is beneficial for maintaing the originality of data, and lossy compression, on the other hand, doesn’t. Both the methods are helpful in database management, to identify and compress files accordingly.

有损压缩和无损压缩都以其独特的方式帮助压缩数据。 尽管有损压缩通过破坏数据来存储数据很有用,但无损压缩却没有。 无损压缩技术有利于保持数据的原始性,而无损压缩则不能。 两种方法都有助于数据库管理,从而相应地识别和压缩文件。

If there’s any other query regarding data compression or both the techniques of data compression, then let us know in the comment box below.

如果还有关于数据压缩或这两种数据压缩技术的任何其他查询,请在下面的注释框中告知我们。

翻译自: https://www.thecrazyprogrammer.com/2019/12/lossy-and-lossless-compression.html

图像有损压缩与无损压缩

信源编码 Assignment of CH1 1、 什么是数据压缩,一般分为几类?请列举实例说明。 数据压缩,就是以最少的码数表示信源所发出的信号,减少容纳给定信息集合或数据采样集合的信号空间。 其主要分为两大类型:lossless 和 lossy。其具体分类和实例用图表表示如下: 数据压缩 冗余度压缩(熵编码) lossless 统计编码 霍夫曼编码、游程编码、二进制信源编码等 算术编码 基于字典的编码、LZW 编码等 其他编码 完全可逆的小波分解+统计编码等 熵压缩 (lossy) 特征抽取 分析/综合编码 子带、小波、分类、模型基等 量化 其他 无记忆量化编码 均匀量化、Max 量化、压扩量化等 有 记忆量化 序列量化 预测编码 增量调制、线性预测、非线性预测、自适应预测、运动补偿预测等 其他方法 序贯量化等 分组量化 直接映射 矢量量化、神经网络、方块截尾等 变化编码 正交变换:KLT、DCT、DFT、WHT 等 非正交变换 其他函数变换等 2、 什么是信源编码,他与数据压缩有何关系? 信源编码是一种以提高通信有效性为目的而对信源符号进行的变换,或者说为了减少或消除信源冗余度而进行的信源符号变换。 信源编码的作用有二 : 一是实现模拟信号的数字化传输;二就是设法减少码元数目和降低码元速率,即所谓的数据压缩技术。信源编码理论和数据压缩理论之间没有明显差别。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值