matlab 中
数据类型
double
single
unit8
unit16
Logical
常见转化: im2double()等4个
默认读入图片是unit8类型的,一般数据处理先将变为double();
Intendity:灰度范围 命令: imagesc(),axis,colormap();
Binary:bwlabel(),bwmorph(),bwdist();%用于mask时
indexed:region
3D Matrix
RGB rgb2grey();
常见I/O操作:
imread imwrite %读入图片,读出图片
im2farm()%图片转电影
movie2avi()%保存电影
aviread()%
mmread()
mmreader()/VideoReader()
movie() %show movie
Matrix access
sub
Image Manipulation
常见命令:
imcrop()%针对图片的某个区域处理
imrotate()%旋转图片
imfilter()%用变化核去convolve/correlation 卷积,联系
nlfilter()%
blkproc()%
fspecial() %自己去定义变化核
imresize()%预处理,将图片变化尺寸
kron()%Kronecker tensor product 外积
padarray()%
colfilt()%按列堆积图片
imfreehand()%用鼠标选取一定区域
MEX 实现C,C++编译
P文件(保密文件)
matlab 调用C C再调用exe
数据呈现
scatter()%在图里画点
Imagesc()%2D数据
print()%
常见的问题:
避免循环
管理内存(没用的变 量删了)