PYQT5从其他颜色空间读取图像

发布于 2025-01-30 14:42:33 字数 472 浏览 0 评论 0原文

令给出表示图像的Numpy 3维数阵列。在其他帖子中提到了如何显示这样的图像pyqt5。但是,这一次,给定的图像具有ybr_full的色彩空间。处理此问题的通常方法是使用命令convert_color_space。但是,这样的命令会使我的代码运行太慢,以防我有大量图像要显示。我的问题是:有什么方法可以使PYQT5窗口直接读取和显示颜色空间ybr_full的图像(以及更常见的颜色空间),以便我们不需要将任何图像转换为其他颜色空间?也就是说,我是否有可能更改pyqt5使用的默认颜色空间?

附录: YBR_FULL代表Y,CB和Cr。转换公式由:

Let a numpy 3 dimensional array that represents an image be given. It is mentionned in other posts how to display such an image PyQt5 . However, this time, the given image has a colorspace of YBR_Full . The usual way of dealing with this is by using the command convert_color_space. But such a command would make my code run too slow in case I have a large amount of images to display. My question is: is there any way to make PyQt5 window to read and display directly images of the color space YBR_Full (and more generally color spaces other than RGB ) so that we do NOT need to convert any image to other color space ? That is, is it possible for me to change the default color space used by PyQt5 ?

Appendix:
YBR_Full stands for Y, Cb, and Cr. The conversion formula is given by:
enter image description here

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文