转换UINT16->字节图像更暗

发布于 2025-02-06 09:40:11 字数 362 浏览 1 评论 0原文

我想将带有UINT16像素的图像转换为字节像素。我实际上使用GDAL库(和gdal_translate命令)来执行此操作,但是输出映像比原始

”原始图像

输出image

您知道我能做些什么来转换Uint16-&gt ;字节没有失去这种光度?还是我可以做一些转换输出图像的事情?

I want to convert an image with Uint16 pixels to Byte pixels. I'm actually using GDAL library (and gdal_translate command) to do this but the output image is darker than the original

Original image

Output image

Do you know what can i do to convert Uint16 -> Byte without lose this luminosity ? Or can I do something for transform the output image ?

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

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

发布评论

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

评论(1

朕就是辣么酷 2025-02-13 09:40:11

您需要指定比例值。
例如:gdal_translate -scale 0 4000 -ot byte input.tif output.tif.tif

如果未指定值,则将其缩放到0 255。但是,如果您指定-scale 0 4000,则只需部分输入图像中有重要的信息。

通常,有些像素具有太高的价值,从而产生深色图像。深色像素在输出中没有足够的空间。

You need to specify scale values.
For example: gdal_translate -scale 0 4000 -ot Byte input.tif output.tif

If you do not specify the values it takes whole input and scales it to 0 255. But if you specify -scale 0 4000 it takes only part of the input which has significant information in your image.

There are usually some pixels that have too high value that in result produces dark image. The dark pixels do not have enough space in the output.

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