| 查看: 2354 | 回复: 1 | |||
[求助]
图像位深度改变
|
| 用MATLAB处理.bmp文件时,图像的位深度是24位导致全息程序一直出错,可能是位深太大。如何加一段程序将读入的.bmp图片位深降为8位?希望各位大神能帮忙,谢谢! |
» 猜你喜欢
最失望的一年
已经有17人回复
拟解决的关键科学问题还要不要写
已经有8人回复
为什么nbs上溴 没有产物点出现呢
已经有6人回复
求推荐博导
已经有4人回复
存款400万可以在学校里躺平吗
已经有34人回复
求助一下有机合成大神
已经有4人回复
求推荐英文EI期刊
已经有5人回复
26申博
已经有3人回复
基金委咋了?2026年的指南还没有出来?
已经有10人回复
疑惑?
已经有5人回复
» 本主题相关价值贴推荐,对您同样有帮助:
图像处理领域,我做了一点儿东西,各位帮着看看有没有可能发啊,谢谢了
已经有16人回复
纳米压痕测试出的载荷-位移深度曲线 分析()
已经有12人回复
【专题】第三代测序技术——单分子测序
已经有59人回复
求助!深度学习入门
已经有20人回复
3D智能数字化与3D打印的一本新书
已经有12人回复
怎样得到单幅图像的深度图?
已经有3人回复
初入图像分割,推荐一两本经典书籍或文献
已经有19人回复
大家觉得语音信号处理在未来几年有多大的发展前途,对比图像和视频,哪方面比较好呢?
已经有17人回复
深度学习(Deep Learning)算法简介及其成功应用
已经有19人回复
为什么改变了辐射亮度值,显示出的图像色彩仍与原图像无差别呢?
已经有6人回复
高速高分辨率成像拉曼显微镜 RAMAN-11
已经有34人回复
局部立体匹配算法交流
已经有8人回复
扫描电镜的图像求高人帮忙分析一下
已经有22人回复
图像配准方面的经典书籍(英文)
已经有331人回复
求助,有关于立体匹配中的tsukuba图像
已经有9人回复
【请教】请大家帮忙看看扫描电镜的图片
已经有11人回复
【求助】图像去噪是否可以作为博士研究的方向
已经有33人回复
jinjinliu
银虫 (著名写手)
- 应助: 7 (幼儿园)
- 金币: 2192.7
- 红花: 4
- 帖子: 1080
- 在线: 647.7小时
- 虫号: 814679
- 注册: 2009-07-23
- 性别: GG
- 专业: 机械结构强度学
|
Overview of Image Class Conversions You can convert uint8 and uint16 image data to double using the MATLAB double function. However, converting between classes changes the way MATLAB and the toolbox interpret the image data. If you want the resulting array to be interpreted properly as image data, you need to rescale or offset the data when you convert it. For easier conversion of classes, use one of these functions: im2uint8, im2uint16, im2int16, im2single, or im2double. These functions automatically handle the rescaling and offsetting of the original data of any image class. For example, this command converts a double-precision RGB image with data in the range [0,1] to a uint8 RGB image with data in the range [0,255]. RGB2 = im2uint8(RGB1); Back to Top Losing Information in Conversions When you convert to a class that uses fewer bits to represent numbers, you generally lose some of the information in your image. For example, a uint16 grayscale image is capable of storing up to 65,536 distinct shades of gray, but a uint8 grayscale image can store only 256 distinct shades of gray. When you convert a uint16 grayscale image to a uint8 grayscale image, im2uint8 quantizes the gray shades in the original image. In other words, all values from 0 to 127 in the original image become 0 in the uint8 image, values from 128 to 385 all become 1, and so on. Back to Top Converting Indexed Images It is not always possible to convert an indexed image from one storage class to another. In an indexed image, the image matrix contains only indices into a colormap, rather than the color data itself, so no quantization of the color data is possible during the conversion. For example, a uint16 or double indexed image with 300 colors cannot be converted to uint8, because uint8 arrays have only 256 distinct values. If you want to perform this conversion, you must first reduce the number of the colors in the image using the imapprox function. This function performs the quantization on the colors in the colormap, to reduce the number of distinct |
2楼2015-08-19 20:22:31













回复此楼