【文件属性】:
文件名称:判断色彩图
文件大小:1KB
文件格式:M
更新时间:2021-06-09 16:17:41
颜色算法
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