資源簡介
岡薩雷斯數(shù)字圖像處理第二版中的tofloat函數(shù),原書配帶的函數(shù)式p文件,此處已經(jīng)轉為M文件。
代碼片段和文件信息
function?[outrevertclass]=tofloat(in)
%TOFLOAT?Convert?imge?to?floating?point
identity=@(x)x;
tosingle=@im2single;
table={‘uint8‘tosingle@im2uint8
????‘uint16‘tosingle@im2uint16
????‘int16‘tosingle@im2int16
????‘logical‘tosingle@logical
????‘double‘identityidentity
????‘single‘identityidentity};
classIndex=find(strcmp(class(in)table(:1)));
if?isempty(classIndex)
????error(‘unsupported?input?image?class.‘);
end
out=table{classIndex2}(in);
revertclass=table{classIndex3};
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????507??2013-07-17?12:11??tofloat.m
?????文件?????????507??2013-07-17?12:11??tofloat2.m
- 上一篇:rvctools 機器人視覺伺服工具箱
- 下一篇:sigmoid核函數(shù)
評論
共有 條評論