分享
分销 收藏 举报 申诉 / 29
播放页_导航下方通栏广告

类型彩色图像处理MATLAB函数简介PPT学习课件.ppt

  • 上传人:精****
  • 文档编号:6258916
  • 上传时间:2024-12-03
  • 格式:PPT
  • 页数:29
  • 大小:208.50KB
  • 下载积分:10 金币
  • 播放页_非在线预览资源立即下载上方广告
    配套讲稿:

    如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

    特殊限制:

    部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

    关 键  词:
    彩色 图像 处理 MATLAB 函数 简介 PPT 学习 课件
    资源描述:
    ,单击此处编辑母版标题样式,单击此处编辑母版文本样式,第二级,第三级,第四级,第五级,*,彩色图像处理函数简介,1,1,函数简介,applycform -Apply device-independent color space,transformation.,hsv2rgb -Convert HSV values to RGB color space,(MATLAB Toolbox).,iccread -Read ICC color profile.,lab2double -Convert Lab color values to double.,lab2uint16 -Convert Lab color values to uint16.,lab2uint8 -Convert Lab color values to uint8.,makecform -Create device-independent color,space transform structure.,ntsc2rgb -Convert NTSC values to RGB color space.,2,1,函数简介,rgb2hsv -Convert RGB values to HSV color space,(MATLAB Toolbox).,rgb2ntsc -Convert RGB values to NTSC color space.,rgb2ycbcr -Convert RGB values to YCBCR color,space.,whitepoint -Returns XYZ values of standard,illuminants.,xyz2double -Convert XYZ color values to double.,xyz2uint16 -Convert XYZ color values to uint16.,ycbcr2rgb -Convert YCBCR values to RGB color,space.,3,1,函数简介,dither -Convert image using dithering.,gray2ind -Convert intensity image to indexed image.,grayslice -Create indexed image from intensity image,by thresholding.,graythresh -Compute global image threshold using,Otsus method.,im2bw -Convert image to binary image by,thresholding.,im2double -Convert image array to double precision.,4,1,函数简介,ind2gray -Convert indexed image to intensity image.,ind2rgb -Convert indexed image to RGB image,(MATLAB Toolbox).,mat2gray -Convert matrix to intensity image.,rgb2gray -Convert RGB image or colormap to,grayscale.,rgb2ind -Convert RGB image to indexed image.,5,2,颜色空间转换矩阵的创建与应用,makecform,Create a color transformation structure,Syntax,C=makecform(type),creates the color transformation structure C that defines the color space conversion specified by type.To perform the transformation,pass the color transformation structure as an argument to the applycform function.,6,type,参数,7,type,参数,8,颜色空间,9,应用,rgb=imread(peppers.png);,cform=makecform(srgb2lab);,lab=applycform(rgb,cform);,10,3,颜色空间转换函数举例,rgb2hsv,Convert RGB colormap to HSV colormap,cmap=rgb2hsv(M),Description,converts an RGB colormap M to an HSV colormap cmap.Both colormaps are m-by-3 matrices.The elements of both colormaps are in the range 0 to 1.The columns of the input matrix M represent intensities of red,green,and blue,respectively.The columns of the output matrix cmap represent hue,saturation,and value,respectively.,11,3,颜色空间转换函数举例,hsv2rgb,Convert HSV colormap to RGB colormap,M=hsv2rgb(H),Description,converts a hue-saturation-value(HSV)colormap to a red-green-blue(RGB)colormap.H is an m-by-3 matrix,where m is the number of colors in the colormap.The columns of H represent hue,saturation,and value,respectively.M is an m-by-3 matrix.Its columns are intensities of red,green,and blue,respectively.,12,编程应用,fc=imread(peppers.png);,%,提取,RGB,分量,fr=fc(:,:,1);,fg=fc(:,:,2);,fb=fc(:,:,3);,figure(1),imshow(f),title(rgb image),13,编程应用,figure(2),imshow(fr),title(red component),figure(3),imshow(fg),title(green component),figure(4),imshow(fb),title(blue component),14,编程应用,%,将,RGB,转换成,HSV,hc=rgb2hsv(fc);,%,提取,HSV,分量,h=hc(:,:,1);,s=hc(:,:,2);,v=hc(:,:,3);,figure(5),imshow(hsv2rgb(hc),title(hsv image),15,编程应用,%,显示,HSV,分量图像,figure(6),imshow(h),title(hue component),figure(7),imshow(s),title(saturation component),figure(8),imshow(v),title(value component),16,编程应用,%,产生均值滤波器,w=fspecial(average,5);,%,对,RGB,图像滤波,rgb_filtered=imfilter(fc,w,replicate);,figure(9),imshow(rgb_filtered),title(filtered RGB image),17,编程应用,%,仅对,HSV,图像的,v,分量滤波,v_filtered=imfilter(v,w,replicate);,h=cat(3,h,s,v_filtered);,f_filtered=hsv2rgb(h);,f_filtered=min(f_filtered,1);,figure(10),imshow(f_filtered),title(filtered hsv image),18,编程应用,%,对,h,s,v,同时滤波,h_filtered=imfilter(h,w,replicate);,s_filtered=imfilter(s,w,replicate);,v_filtered=imfilter(v,w,replicate);,h=cat(3,h_filtered,s_filtered,v_filtered);,f_filtered=hsv2rgb(h);,f_filtered=min(f_filtered,1);,figure(11),imshow(f_filtered),19,4,颜色空间转换函数的编写,function hsi=rgb2hsi(rgb),%,将,RGB,图像转换成,HSI,图像,rgb=im2double(rgb);,r=rgb(:,:,1);,g=rgb(:,:,2);,b=rgb(:,:,3);,20,4,颜色空间转换函数的编写,%,将,RGB,转换,HSI,num=0.5*(r-g)+(r-b);,den=sqrt(r-g).2+(r-b).*(g-b);,theta=acos(num./(den+eps);,H=theta;,h(bg)=2*pi-H(bg);,H=H/(2*pi);,num=min(min(r,g),b);,den=r+g+b;,den(den=0)=eps;,S=1-3.*num./den;,I=(r+g+b)/3;,hsi=cat(3,H,S,I);,21,4,颜色空间转换函数的编写,function rgb=hsi2rgb(hsi),%,将,HSI,图像转换成,RGB,图像,H=hsi(:,:,1)*2*pi;,S=hsi(:,:,2);,I=hsi(:,:,3);,%,初始化,R=zeros(size(hsi,1),size(hsi,2);,G=zeros(size(hsi,1),size(hsi,2);,B=zeros(size(hsi,1),size(hsi,2);,22,4,颜色空间转换函数的编写,%,分区转换,%RB,区间(,0-120,),idx=find(0=H),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);,23,4,颜色空间转换函数的编写,%GB,区间(,120-240,),idx=find(2*pi/3=H),R(idx)=I(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);,24,4,颜色空间转换函数的编写,%BR,区间(,240-360,),idx=find(4*pi/3=H),G(idx)=I(idx).*(1-S(idx);,R(idx)=I(idx).*(1+S(idx).*cos(H(idx)-4*pi/3)./cos(5*pi/3-H(idx);,G(idx)=3*I(idx)-(G(idx)+B(idx);,%,组合成,RGB,图像,rgb=cat(3,R,G,B);,rgb=max(min(rgb,1),0);,25,5,灰度条与彩条产生函数,function graybar(h,w,l,map),%h,w,为一个小条带图像的高度和宽度,%l,为条带的灰度级或颜色数,,map,为调色板,c=;,if nargin=0,h=64;w=8;l=16;,elseif nargin=4,error(wrong number of inputs.),end,26,5,灰度条与彩条产生函数,X=ones(h,w);,l=256/l;,for k=0:l:256,Y=k*X;,c=cat(2,c,Y);,end,if isempty(map),map=0:1/256:1*ones(1,3);,end,figure,imshow(c,map),27,6,彩色,索引,灰度图像的转换,x,map=gray2ind(gray_image,n);,gray_image=ind2gray(x,map);,x,map=rgb2ind(rgb_image,n,dither_option);,rgb_image=ind2rgb(x,map);,gray_image=rgb2gray(rgb_image);,28,6,彩色,索引,灰度图像的转换,f=imread(peppers.png);x1,map1=rgb2ind(f,8,nodither);,figure(1),imshow(f),x2,map2=rgb2ind(f,8,dither);,figure(2),imshow(x1,map1),figure(3),imshow(x2,map2),g=rgb2gray(f);,g1=dither(g);,figure(4),imshow(g);,figure(5),imshow(g1);,29,
    展开阅读全文
    提示  咨信网温馨提示:
    1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
    2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
    3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
    4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
    5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
    6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。

    开通VIP折扣优惠下载文档

    自信AI创作助手
    关于本文
    本文标题:彩色图像处理MATLAB函数简介PPT学习课件.ppt
    链接地址:https://www.zixin.com.cn/doc/6258916.html
    页脚通栏广告

    Copyright ©2010-2026   All Rights Reserved  宁波自信网络信息技术有限公司 版权所有   |  客服电话:0574-28810668    微信客服:咨信网客服    投诉电话:18658249818   

    违法和不良信息举报邮箱:help@zixin.com.cn    文档合作和网站合作邮箱:fuwu@zixin.com.cn    意见反馈和侵权处理邮箱:1219186828@qq.com   | 证照中心

    12321jubao.png12321网络举报中心 电话:010-12321  jubao.png中国互联网举报中心 电话:12377   gongan.png浙公网安备33021202000488号  icp.png浙ICP备2021020529号-1 浙B2-20240490   


    关注我们 :微信公众号  抖音  微博  LOFTER               

    自信网络  |  ZixinNetwork