有没有什么算法可以将图像直方图转换为原始图像?

发布于 2024-08-18 05:17:31 字数 323 浏览 4 评论 0原文

所以我们有直方图...有没有任何算法可以从它们生成原始图像?

替代文本
(来源:petrileskinen.fi

So we have Histograms... Is there any algorithm to generate original image from them?

alt text
(source: petrileskinen.fi)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

堇色安年 2024-08-25 05:17:31

不,因为直方图只是绘制各种色调的像素数量,而不是它们的位置

No, because the histograms simply plot the number of pixels of various tones, not their locations.

甜尕妞 2024-08-25 05:17:31

这就像在说:“你能用几罐颜料重建一幅特定的画作(不知道是哪一幅画)吗?”

That's like saying: "Can you reconstruct a specific painting (not knowing which one) from a couple of pots of paint?"

执笏见 2024-08-25 05:17:31

从直方图中重建未知图片是不可能的,但这并不意味着您无能为力。如果您有可能的图片数据库,则可以通过生成其直方图来对每张图片进行“指纹识别”,然后使用您必须搜索该指纹数据库的直方图来识别它是哪张图片。如果您找到一个合适的距离度量,您甚至可以使用它来查找与您拥有的图片“相似”(在某种非常粗略的意义上)的图片。

你不能用它来说“这是一张伦敦塔的照片;现在给我找到伦敦塔的其他照片”,但你可以用它来说“这是一张日落的照片;给我找到包含相似的颜色集”,这可能在某种程度上有用。

当然,您的夜间风景图片可能与完全不相关的事物具有非常相似的直方图,并且可能与人类看起来相似的图片具有完全不同的直方图。所以这不是一个可靠的方法。但如果您拥有的只是直方图,那么可能值得研究一下可以实现什么。

It's not possible to reconstruct an unknown picture from a histogram, but that doesn't mean there's nothing you can do. If you have a database of possible pictures, you can "fingerprint" each picture, by generating its histogram, and then use the histogram you have to search over that database of fingerprints to identify which picture it is. If you find a decent distance metric, you could possibly even use this to find pictures that are "similar" (in some very rough sense) to the picture you have.

You can't use this to say "here's a picture of the Tower of London; now find me other pictures of the Tower of London" but you could use it to say "here's a picture of a sunset; find me pictures that contain a similar set of colours", which might end up being useful to some extent.

Of course it might turn out that your evening landscape picture has a very similar histogram to something completely irrelevant, and may have a completely different histogram to a picture that, to a human, looks similar. So it's not a robust approach. But if all you have is the histogram, then it may be worth looking into what can be achieved.

方觉久 2024-08-25 05:17:31

不。直方图是有损的。

No. Histograms are lossy.

浴红衣 2024-08-25 05:17:31

直方图不携带任何空间信息。我的意思是,不可能找到对特定直方图箱有贡献的像素的 x,y 位置。直方图仅代表图像全局亮度信息。

A histogram doesn't carry any spatial information. I mean, it's not possible to find the x,y position of the pixel that contributed to a particular histogram bin. The histogram only represents image global brightness information.

冰雪之触 2024-08-25 05:17:31

直方图仅携带并提供有关图像中色调分布的信息。它是原始图像中编码的离散信息的聚合 - 有多少像素具有特定值。因此,如果不提供附加细节(例如像素的位置等),就不可能生成原始图像。

Histogram only carries and provides information about what's distribution of tones in an image. It is an aggregation of discrete information encoded in original image - how many pixels have particular values. Thus, it's not possible to generate original image without providing addition details like what's location of pixels, etc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文