您好,欢迎光临本网站![请登录][注册会员]  
文件名称: isrgb.m,matlab
  所属分类: 教育
  开发工具:
  文件大小: 1kb
  下载次数: 0
  上传时间: 2014-03-27
  提 供 者: bob601******
 详细说明: isrgb.m matlab rgb function y = isrgb(x) %ISRGB Return true for RGB image. % FLAG = ISRGB(A) returns 1 if A is an RGB truecolor image and % 0 otherwise. % % ISRGB uses these criteria to determine if A is an RGB image: % % - If A is of class double, all values must be in the range % [0,1], and A must be M-by-N-by-3. % % - If A is of class uint8 or uint16, A must be M-by-N-by-3. % % Note that a four-dimensional array that contains multiple RGB % images returns 0, not 1. % % Class Support % ------------- % A can be of class uint8, uint16, or double. If A is of % class logical it is considered not to be RGB. % % See also ISBW, ISGRAY, ISIND. % Copyright 1993-2003 The MathWorks, Inc. % $Revision: 1.15.4.2 $ $Date: 2003/08/23 05:52:55 $ wid = sprintf('Images:%s:obsoleteFunction',mfilename); str1= sprintf('%s is obsolete and may be removed in the future.',mfilename); str2 = 'See product release notes for more information.'; warning(wid,'%s\n%s',str1,str2); y = size(x,3)==3; if y if isa(x, 'logical') y = false; elseif isa(x, 'double') % At first just test a small chunk to get a possible quick negative m = size(x,1); n = size(x,2); chunk = x(1:min(m,10),1:min(n,10),:); y = (min(chunk(:))>=0 && max(chunk(:))<=1); % If the chunk is an RGB image, test the whole image if y y = (min(x(:))>=0 && max(x(:))<=1); end end end ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: isrgb.m matlab rgb
 输入关键字,在本站1000多万海量源码库中尽情搜索: