转换UINT16->字节图像更暗
我想将带有UINT16像素的图像转换为字节像素。我实际上使用GDAL库(和gdal_translate命令)来执行此操作,但是输出映像比原始
您知道我能做些什么来转换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
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要指定比例值。
例如: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.