降低的图像颜色更大,而较小
我将256位图像颜色带有以下函数:
def reduce(image,quantize_val=32):
img_reduced=(image//quantize_val) * quantize_val + quantize_val//2
return img_reduced
当我保存它时:
cv2.imwrite("reduced.jpg",img_reduced)
它甚至比第一个图像更大,而CV2将其保存为24位,这是错误的,我如何强制使用9位保存图像的CV2 ?
I'm reduce a 256 bit image colors with following function:
def reduce(image,quantize_val=32):
img_reduced=(image//quantize_val) * quantize_val + quantize_val//2
return img_reduced
when I save that using:
cv2.imwrite("reduced.jpg",img_reduced)
It is even bigger than first image, and cv2 save it as 24bit which is wrong, how can I force cv2 that save image with 9 bits for example?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论