ImageVerifierCode 换一换
格式:DOCX , 页数:11 ,大小:91.98KB ,
资源ID:16245884      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/16245884.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(真彩色图像处理文档格式.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

真彩色图像处理文档格式.docx

1、图4.5是基于matlab以增强亮度和饱和度的方法进行真彩色增强的图像,其代码见附录图4.4 对HSI图像进行增强结果这是对前两个方法的综合, 很显然,图(b)比图(a)要亮,要清晰,视觉效果比以上两种方法分别做要好的多。2、直接在rgb空间对图像增强 图4.6是基于matlab在rgb空间增强图像,其代码见附录 图4.5 对RGB图像进行增强结果以下是基于matlab以增强亮度的方法进行真彩色增强的代码:% 彩色图像亮度增强 (执行速度较慢)clcclearfc = imread(E:maomao.jpg);figure(1);imshow(fc)title(原始真彩色(256*256*25

2、6色)图像)fr = fc(:,:,1);fg = fc(:,2);fb = fc(:,3);% imshow(fr)% title(红色分量图像% imshow(fg)绿色分量图像% imshow(fb)蓝色分量图像) h = rgb2hsi(fc);H = h(:S = h(:I = h(:I =I*1.5;% imshow(H)色调分量图像% imshow(S)饱和度分量图像% imshow(I)亮度分量图像h = cat(3,H,S,I);%cat函数是拼接数组的函数,这里将在第3维上进行拼接。f = hsi2rgb(h);%增强亮度分量后的rgb图像f = min(f,1);%保证元

3、素值最大为1,因为按公式转换为rgb后可能出现大于1的情况figure(2);imshow(f)仅增强HSI图像的亮度分量所得到的RGB图像基于matlab以增强对比度的方法进行真彩色增强代码:% 例6.8 彩色图像亮度增强 (执行速度较慢)I:S=S*2.0;增强HSI图像的对比度所得到的RGB图像基于matlab以增强亮度和饱和度的方法进行真彩色增强的图像imshow(fc) I =I*2.0;S =S*2.0;rgb图像转化为hsi图像的代码:rgb2hsi(rgb)function hsi = rgb2hsi(rgb)%RGB2HSI Converts an RGB image to

4、HSI.% HSI = RGB2HSI(RGB) converts an RGB image to HSI. The input image% is assumed to be of size M-by-N-by-3, where the third dimension% accounts for three image planes: red, green, and blue, in that% order. If all RGB component images are equal, the HSI conversion% is undefined. The input image can

5、 be of class double (with values% in the range 0, 1), uint8, or uint16. % The output image, HSI, is of class double, where:% hsi(:, :, 1) = hue image normalized to the range 0, 1 by% dividing all angle values by 2*pi. , 2) = saturation image, in the range 0, 1., 3) = intensity image, in the range 0,

6、 1.% Copyright 2002-2004 R. C. Gonzalez, R. E. Woods, & S. L. Eddins% Digital Image Processing Using MATLAB, Prentice-Hall, 2004% $Revision: 1.5 $ $Date: 2005/01/18 13:44:59 $% Extract the individual component images.rgb = im2double(rgb);r = rgb(:, 1);g = rgb(:, 2);b = rgb(:, 3);% Implement the conv

7、ersion equations.num = 0.5*(r - g) + (r - b);den = sqrt(r - g).2 + (r - b).*(g - b);theta = acos(num./(den + eps);H = theta;H(b g) = 2*pi - H(b g);H = H/(2*pi);num = min(min(r, g), b);den = r + g + b;den(den = 0) = eps;S = 1 - 3.* num./den;H(S = 0) = 0;I = (r + g + b)/3;% Combine all three results i

8、nto an hsi image.hsi = cat(3, H, S, I);hsi图像转化为rgb图像的代码:hsi2rgb(hsi)function rgb = hsi2rgb(hsi)%HSI2RGB Converts an HSI image to RGB.% RGB = HSI2RGB(HSI) converts an HSI image to RGB, where HSI is% assumed to be of class double with:, 1) = hue image, assumed to be in the range% 0, 1 by having been d

9、ivided by 2*pi.% The components of the output image are:% rgb(:, 1) = red., 2) = green., 3) = blue. 2003/10/13 01:01:06 $% Extract the individual HSI component images.hsi=im2double(hsi);H = hsi(:, 1) * 2 * pi;S = hsi(:I = hsi(:R = zeros(size(hsi, 1), size(hsi, 2);G = zeros(size(hsi, 1), size(hsi, 2)

10、;B = zeros(size(hsi, 1), size(hsi, 2);% RG sector (0 = H 2*pi/3).idx = find( (0 = H) & (H 2*pi/3);B(idx) = I(idx) .* (1 - S(idx);R(idx) = I(idx) .* (1 + S(idx) .* cos(H(idx) ./ cos(pi/3 - H(idx);G(idx) = 3*I(idx) - (R(idx) + B(idx);% BG sector (2*pi/3 4*pi/3).idx = find( (2*pi/3 4*pi/3) );R(idx) = I

11、(idx) .* (1 - S(idx);G(idx) = I(idx) .* (1 + S(idx) .* cos(H(idx) - 2*pi/3) ./ . cos(pi - H(idx);B(idx) = 3*I(idx) - (R(idx) + G(idx);% BR sector.idx = find( (4*pi/3 = 2*pi);G(idx) = I(idx) .* (1 - S(idx);B(idx) = I(idx) .* (1 + S(idx) .* cos(H(idx) - 4*pi/3) ./ . cos(5*pi/3 - H(idx);R(idx) = 3*I(id

12、x) - (G(idx) + B(idx);% Combine all three results into an RGB image. Clip to 0, 1 to% compensate for floating-point arithmetic rounding effects.rgb = cat(3, R, G, B);rgb = max(min(rgb, 1), 0);直接在RGB空间进行图像增强A=imread(C:UsersliuxinjuDesktopmaomao.jpg%读入原始RGB图像whos;figure;imshow(A):original image%显示图像r

13、c d=size(A);%计算图像大小%-计算红色分量并显示分解图-%red(:,1)=A(:,2)=zeros(r,c);,3)=zeros(r,c);red=uint8(red*2.0);imshow(red)Red Component%-计算绿色分量并显示分解图-%green(:,2)=A(:,1)=zeros(r,c);green=uint8(green*2.0);imshow(green)Green Component%-计算蓝色分量并显示分解图-%blue(:,3)=A(:blue=uint8(blue*2.0);imshow(blue)Blue Component%-合成-%B(:,1)=red(:,2)=green(:,3)=blue(:imshow(B):composition image

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1