文章和代码以及样例图片等相干资源,曾经归档至【Github仓库:digital-image-processing-matlab】或者公众号【AIShareLab】回复 数字图像处理 也可获取。
86.pixval
性能:显示图像像素信息。
语法:
pixval on pixval off pixvalpixval(fig,option)
相干命令: impixel, improfile
87.qtdecomp
性能:进行四叉树合成。
语法:
S = qtdecomp(I)S = qtdecomp(I,threshold)S = qtdecomp(I,threshold,mindim)S = qtdecomp(I,threshold,[mindim maxdim]) S = qtdecomp(I,fun)S = qtdecomp(I,fun,P1,P2,...)
举例
I = [1 1 1 1 2 3 6 61 1 2 1 4 5 6 81 1 1 1 10 15 7 71 1 1 1 20 25 7 720 22 20 22 1 2 3 420 22 22 20 5 6 7 820 22 20 20 9 10 11 1222 22 20 20 13 14 15 16];S = qtdecomp(I,5); full(S)ans =4 0 0 0 2 0 2 00 0 0 0 0 0 0 00 0 0 0 1 1 2 00 0 0 0 1 1 0 04 0 0 0 2 0 2 00 0 0 0 0 0 0 00 0 0 0 2 0 2 00 0 0 0 0 0 0 0
相干命令:
qtgetblk, qtsetblk
88.qtgetblk
性能:获取四叉树合成中的块值。
语法:
[vals,r,c] = qtgetblk(I,S,dim) [vals,idx] = qtgetblk(I,S,dim)
举例
[vals,r,c] = qtgetblk(I,S,4)vals(:,:,1) = 1 1 1 11 1 2 11 1 1 11 1 1 1vals(:,:,2) = 20 22 20 2220 22 22 2020 22 20 2022 22 20 20r = 15c = 11
相干命令:
qtdecomp, qtsetblk
89.qtsetblk
性能:设置四叉树合成中的块值。
语法:
J = qtsetblk(I,S,dim,vals)
举例
newvals = cat(3,zeros(4),ones(4)); J = qtsetblk(I,S,4,newvals)J =0 0 0 0 2 3 6 60 0 0 0 4 5 6 80 0 0 0 10 15 7 70 0 0 0 20 25 7 71 1 1 1 1 2 3 41 1 1 1 5 6 7 81 1 1 1 9 10 11 121 1 1 1 13 14 15 16
相干命令:
qtdecomp, qtgetblk
90.radon
性能:计算Radon变换。
语法:
R = radon(I,theta) R = radon(I,theta,n) [R,xp] = radon(...)
举例
iptsetpref('ImshowAxesVisible','on')I = zeros(100,100); I(25:75,25:75) = 1;theta = 0:180;[R,xp] = radon(I,theta);imshow(theta,xp,R,[]), colormap(hot), colorbar
相干命令:
iradon, phantom
91.rgb2gray
性能:转换RGB 图像或色彩映像表为灰度图像。
语法:
I = rgb2gray(RGB) newmap = rgb2gray(map)
相干命令:
ind2gray, ntsc2rgb, rgb2ind, rgb2ntsc
92.rgb2hsv
性能:
转化RGB值为HSV色彩空间。
语法:
hsvmap = rgb2hsv(rgbmap) HSV = rgb2hsv(RGB)
相干命令:
hsv2rgb, rgbplot
93.rgb2ind
性能:转化RGB图像为索引图像。
语法:
[X,map] = rgb2ind(RGB,tol) [X,map] = rgb2ind(RGB,n) X = rgb2ind(RGB,map)[...] = rgb2ind(...,dither_option)
举例
RGB = imread('flowers.tif'); [X,map] = rgb2ind(RGB,128); imshow(X,map)
相干命令:
cmunique, dither, imapprox, ind2rgb, rgb2gray
94.rgb2ntsc
性能:转化RGB的值为NTSC色彩空间。
语法:
yiqmap = rgb2ntsc(rgbmap) YIQ = rgb2ntsc(RGB)
相干命令:
ntsc2rgb, rgb2ind, ind2rgb, ind2gray
95.rgb2ycbcr
性能:转化RGB的值为YcbCr 色彩空间。
语法:
ycbcrmap = rgb2ycbcr(rgbmap) YCBCR = rgb2ycbcr(RGB)
相干命令:
ntsc2rgb, rgb2ntsc, ycbcr2rgb
96.rgbplot
性能:划分色彩映像表。
语法:
rgbplot(map)
举例rgbplot(jet)
97.roicolor
性能:抉择感兴趣的色彩区。
语法:
BW = roicolor(A,low,high) BW = roicolor(A,v)
举例
I = imread('rice.tif');BW = roicolor(I,128,255); imshow(I);figure, imshow(BW)
相干命令: roifilt2, roipoly
参考文献:
[1] Rafael C. Gonzalez, Richard E. Woods, and Steven L. Eddins. 2003. Digital Image Processing Using MATLAB. Prentice-Hall, Inc., USA.
[2] [阮秋琦. 数字图像处理(MATLAB版)[M]. 北京:电子工业出版社, 2014.](https://github.com/timerring/digital-image-processing-matlab/blob/main/reference/Digital_Image_Processing_(MATLAB_version).pdf)
[3] [冈萨雷斯. 数字图像处理(第三版)[M]. 北京:电子工业出版社, 2011.](https://github.com/timerring/digital-image-processing-matlab/blob/main/reference/Digital_Image_Processing_(Third_Edition).pdf)