我现在有一个二进制的数据,想要保存成16bit的灰度图像,
help。。。
关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率
如何用python保持一个16bit的png格式图片?
收起
- 写回答
- 好问题 0 提建议
- 关注问题
微信扫一扫点击复制链接分享
- 邀请回答
- 编辑 收藏 删除 结题
- 收藏 举报
3条回答 默认 最新
- 关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率
oyljerry 2016-03-21 13:25关注是不是可以直接把二进制转换成16bit.存入文件
本回答被题主选为最佳回答 , 对您是否有帮助呢? 本回答被专家选为最佳回答 , 对您是否有帮助呢? 本回答被题主和专家选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏举报
微信扫一扫点击复制链接分享
评论按下Enter换行,Ctrl+Enter发表内容
报告相同问题?
提交
- 2020-11-23 22:15简森刘的博客 I'm trying to read a PNG image file written in 16-bit data type. The data should be converted to a NumPy array. But I have no idea how to read the file in '16-bit'. I tried with PIL and SciPy, but the...
- 2020-11-23 22:15weixin_39760650的博客 I'm trying to read a PNG image file written in 16-bit data type. The data should be converted to a NumPy array. But I have no idea how to read the file in '16-bit'. I tried with PIL and SciPy, but the...
- 2023-09-26 23:40yangbocsu的博客 【代码】用 Python将 png 图片转换为颜色深度为16的数组。
- 2021-02-20 08:54weixin_39848953的博客 I have a folder containing over 200 raw images, i want to convert all of them to png or any other format, In C it's pretty easy but in python i don't know how it's doneI found this snippet#import stru...
- 2020-12-05 13:42weixin_39867708的博客 python存储16bit和32bit图像的实例笔记:python中存储16bit和32...'''测试16bit和32bit图像的python存储方法'''import numpy as npimport scipy.miscfrom PIL import Image# 用已有的8bit和16bit图作存储测试path16...
- 2022-04-01 15:35总的来说,利用Python进行16位图像到8位图像的转换是一个常见的图像处理任务,通过PIL库和简单的编程技巧可以轻松实现。对于大规模的图像数据集,批量处理是必不可少的,可以大大提高工作效率。
- 2023-01-11 20:04ly_ljs_521的博客 想把16通道tif彩色图像转成 jpg、png通用格式
- 2020-11-23 22:15weixin_39812142的博客 我一直在玩这个图像使用PIL版本5.3.0: 它读取数据就好了:>>> image = Image.open('/home/jcomeau/Downloads/grayscale_example.png')>>> image.mode'I'>>> image.getextrema()(5140, 62708)>>> image.save('/tmp/...
- 2024-06-02 22:11拉姆哥的小屋的博客 如何把图片保存成16位png格式?
- 2020-06-10 04:43IamGroot2022的博客 from PIL import Image width = 320 height = 240 img_gray_8 = Image.new('L', (width, height), 128) img_...16', (width, height), 128) img_gray_8.save("img_gray_8.bmp") img_gray_16.save("img_gray_16.png")
- 2020-07-10 22:23CV小白进阶路的博客 from PIL import Image import imageio import numpy as np def load(path): img = imageio.imread(path) return img filename = '**' img = load(path) img = np.array(img).astype(np.uint16)#假设对图像做...
- 2023-02-11 22:46Trevorbai的博客 应对超高清、HDR等图像增强类深度学习任务和专业图片处理任务时,我们需要对16bit图像进行读取、转tensor和保存等操作,这里总结出四种python实现的方法供参考~
- 2023-03-14 20:23谢欣桁的博客 当涉及到图像处理和计算机视觉时,有时需要将彩色图片转换为灰度图片,一张一张使用PS等工具转换十分复杂且没有必要。...使用Pillow库来打开,加载并转换彩色图像,并将图像储存在另一个文件夹里。
- 2020-03-18 09:00以下是一个简单的Python代码示例,展示了如何进行这种转换: ```python import numpy as np # 假设mask_16bit是16位的掩码数据 mask_16bit = np.load('5825b5d03ea34f0fa4268e2d93f4a668') # 将16位掩码转换为8位...
- 2023-10-03 16:28weixin_57110465的博客 Python,如何用Pillow库读取或保存16位RAW图像
- 2020-12-05 23:23weixin_39883091的博客 笔记:python中存储16bit和32bit图像的...'''测试16bit和32bit图像的python存储方法'''import numpy as npimport scipy.miscfrom PIL import Image# 用已有的8bit和16bit图作存储测试path16 = 'D:\Py_exercise\lena1...
- 2024-06-11 13:54Python之栈的博客 MoviePy 是一个用于视频编辑的 Python 库,使用户能够处理、编辑和操作视频文件。这个库允许你剪辑视频、添加文本、合并视频剪辑,以及应用各种效果和转换。它建立在 NumPy、imageio 和 Decorator 等库的基础上,...
- 2022-03-02 16:21941618163的博客 2:png一般为uint16, jpg为uint8, 在matlab中imwrite时注意不能把uint8数据存储为.png。 matlab: a) tiff的读取,需要用到geotiffread()函数,如: [data,R] =geotiffread('D:\GF1_WFV1_E99.4_N36.3_20140716_...
- 2020-12-15 11:27多数是的博客 I am extracting frames from video with the help of VideoCapture. Extracted the first frame converted the frame into an image with the ... Use a lossless format like PNG if every bit is important to you.
- 2023-12-12 19:30视觉研坊的博客 name[:-4])) cv2.imwrite(os.path.join(save_path,out_dat_name),imgUint8) key = cv2.waitKey(30) & 0xff if key == 27: sys.exit(0) 2.2.3 批量转换结果 三、总结 以上就是使用Python读取.dat格式数据并转为.png,...
- 没有解决我的问题, 去提问