图像有损压缩与无损压缩

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:

检查下图:

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)

有损压缩 (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图像

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图像

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)

Basis Lossy Compression Lossless Compression
Definition 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 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
Compression Ratio High Low
File Quality Low High
Elimination of Data Even the necessary data is also removed which isn’t noticeable Only some specific amount of unwanted data is removed
Restoration Cannot restore its original form Can restore its original form
Loss of Information This technique involves some loss of information This technique doesn’t include any loss of information
Data Accommodation More data accommodation Less data accommodation
Distortion Files are distorted No distortion
Data holding capacity More Less
Algorithms Used Transform coding, DCT, DWT, fractal compression, RSSMS RLW, LZW, Arithmetic encoding, Huffman encoding, Shannon Fano coding
File Types JPEG, 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

图像有损压缩与无损压缩

图像有损压缩与无损压缩_有损压缩与无损压缩之间的区别相关推荐

  1. 怎么判断间隙过渡过盈配合_间隙配合过盈配合过渡配合之间的区别

    1. 间隙配合 2. 过盈配合 3. 过渡配合 之间的区别 ? 配合的种类 ( 1 )间隙配合 具有间隙(包括最小间隙等于零)的配合称为间隙配合.此时,孔的公差带在轴 的公差带之上. 由于孔. 轴的实 ...

  2. 框架和库的区别_框架和库之间的区别

    框架和库的区别 Developers often use the terms "library" and "framework" interchangeably ...

  3. 开发环境与工具部署服务_开发与部署之间的区别

    开发环境与工具部署服务 多年以来,我是一名Smalltalk程序员,这种经验使我从不同的角度来观察编程世界中的思想. 例如,将源代码存储在文本文件中的想法已经习惯了一些. 作为程序员,我们经常在&qu ...

  4. 无监督和有监督的区别_机器学习和人工智能之间的区别

    机器学习示意图 机器学习是人工智能的一门学科,其中人工智能的应用范围更广,涵盖了与人类智能相似的主要系统.术语机器学习和人工智能的区别在于,人工智能是模仿人类智能的所有应用,智能发明的设计和综合.另一 ...

  5. 语法和语义之间的差异_语法和语义之间的区别

    语法和语义之间的差异 Here you will learn about difference between Syntax and Semantics with example. 在这里,您将通过示 ...

  6. 单精度浮点数和双精度浮点数_浮点数和双精度数之间的区别

    单精度浮点数和双精度浮点数 Here you will learn about difference between float and double i.e. float vs double. 在这 ...

  7. 验证和确认的区别_验证与确认之间的区别

    验证和确认的区别 Today we are going to cover the topic difference between Verification and Validation. 今天,我们 ...

  8. java 对象和实例有什么区别_对象和实例之间的区别

    " 类别"一词来自" 分类"(将类别放入其中的" 类别"),现在我们都听说" 类别"就像一个蓝图,但这到底是什么意思?这 ...

  9. image.merge图像有什么变化_经常用到压缩软件的你,知道什么是无损压缩和有损压缩吗?...

    通过上一篇文章我们就应该知道了为什么要进行视频压缩,因为未经过压缩的视频数据量大的惊人,大大超出了我们的消费能力,而经过压缩后的视频不仅仅数据量有了巨大的降低,最主要的一方面是在经过高压缩比压缩过后, ...

  10. 转:无损压缩和有损压缩

    图像有损压缩与无损压缩 有损和无损压缩是两种数据压缩技术. 在本文的此处,您将了解什么是有损和无损压缩,它们的区别和用途. 什么是数据压缩? (What is Data Compression?) 数 ...

最新文章

  1. axure9中继器添加一列序号自增_中继器如何做简单穿梭框
  2. 我在学python-你们以为我在学C++?其实我在学 Python
  3. network重启失败原因
  4. malloc 背后的系统知识(虚拟内存地址)
  5. VS2017 安装 QT5.9
  6. 数据科学家是个性感的工作?我信你个鬼!
  7. 六、传递、返回复杂类型的对象
  8. Android:权限处理
  9. 家庭影院的Dolby音效如何设置
  10. APM-Skywalking调研及实施报告
  11. python查询46级成绩
  12. 子网掩码计算题与解析
  13. 酒仙网都准备IPO啦,郝鸿峰开始发飙颠覆啦哈
  14. 垃圾分类,全民行动PPT模板
  15. 全面解析流式大数据实时处理技术、平台及应用
  16. 微信公众号开发教程(四)自定义菜单
  17. 第一章 第一节 可充当主语的词类
  18. 2019最新iOS面试题及答案
  19. MTK5G-MT6853(天玑720)
  20. matlab论文图示例代码,MATLAB数字水印 源代码+毕业论文

热门文章

  1. 写一个最简单的React可配置路由(react-router
  2. 电容(3)——晶振电路的电容选择
  3. document的JavaScript一些用法
  4. 寒冬不怕!印度互联网市场潜力巨大
  5. Tensorflow-wavenet生成模拟声音
  6. Openstack Integration with VMware vCenter by Devstack and Opencontrail
  7. R语言中5种正态性检验的方法
  8. xgene:WGS,突变与癌,RNA-seq,WES
  9. 涉及第三方支付接口,怎么测?
  10. 同个网络找不到计算机打印机共享,搜索不到共享打印机怎么办_同一局域网找不到共享打印机的解决方法-系统城...