B = zeros(m,n,p,...) or B = zeros([m n p ...]) returns an m-by-n-by-p-by-... array of zeros.
Now, 1:n is the same as the vector [1 2 3 4 5 6 ... n]
so
zeros(1:n)
is the same as
zeros([1,2,3,4,...n])
which would request factorial(n) array locations. If your n is 21, that would be 51090942171709440000 array locations, which is between 2^65 and 2^66 array locations, and thus would require between 2^68 and 2^69 bytes of storage.
貌似在MATLAB7.11下imread(FILENAME,FMT)两个参数都需要给定,我试了下I=imread('G:\picture\31','jpeg');可以通过.注意'G:\picture\31'这里,若文件名中没有后缀.jpeg就不要写成'G:\picture\31.jpeg
图像工具箱中的函数im****,操作结果数据类型基本都是unit8类型,因为图像是unit8类型,所以图像工具箱中的函数和普通功能相同函数处理步骤可能相同,只是处理结果多了一步类型转换。图像工具箱中的函数在处理时先对数据进行适当的缩放,然后再进行转换。例如filter2与imfilter函数都是滤波函数,但是filter2处理后的结果是double类型,而imfilter是uint8类型,所以imfilter的结果是将filter2中小于0的值变为0,大于255的值变为255,其它的数变换成0~255.转换成uint8类型,也就是imfilter2结果.filter可能是基于相关的处理.
多行注释: 选中要注释的若干语句, 编辑器菜单Text->Comment, 或者快捷键Ctrl+R
取消注释: 选中要取消注释的语句, 编辑器菜单Text->Uncomment, 或者快捷键Ctrl+T
matlab中DIP工具箱函数im2bw使用阈值(threshold)变换法把灰度图像(grayscaleimage)转换成二值图像。一般二值图相的阈值用level= graythresh(I)获取,其中level是[0,1]中的数,如果要取得灰度值的取值范围可以用range= getrangefromclass(I)