如何获得HDR图像的亮度

发布于 2025-01-30 09:50:01 字数 136 浏览 4 评论 0原文

我目前正在从事一个项目,其中有一堆HDR图像,我需要获得每个图像的中位数并绘制它们。

我正在尝试使用 openCV ,但我找不到获得图像中位数的功能或方法。有什么办法吗?我确定应该有一些方法,但我看不到找到它。

I am currently working on a project where I have a bunch of HDR images and I need to get the median luminance of each image and plot them.

I am trying using opencv but I am unable to find a function or way to get the median luminance of an image. Is there any way to do it? I am sure there should be some ways but I am just can't see to find it.

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

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

发布评论

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

评论(1

眼藏柔 2025-02-06 09:50:02

@fmw42的评论解决了问题。将他的评论作为答案,以帮助他人。

@fmw42评论 -

转换为实验室Colorspace并提取L(亮度)通道。然后
获取亮度通道的平均(平均)或中位数
亮度。请参阅cv2.cvtcolor()以更改颜色空间并参见
cv2.mean()获得中位数的平均值或np.median()。

Solved the issue thanks to the comment of @fmw42. Writing his comment as an answer so that it helps others.

@fmw42 commented -

convert to LAB colorspace and extract the L (luminance) channel. Then
get the average (mean) of the luminance channel or the median of the
luminance. See cv2.cvtColor() to change color spaces and see
cv2.mean() to get the average or np.median() for the median.

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