chromadist.m
来自「基于MATLAB的人脸检测程序」· M 代码 · 共 15 行
M
15 行
function [cb, cr] = ChromaDist(filename)
% return the chromatic components of the image
% low pass filtering is carried out to remove noise
im = imread(filename);
imycc = rgb2ycbcr(im);
lpf = 1/9 * ones(3);
cb = imycc(:,:,2);
cb = filter2(lpf, cb);
cb = reshape(cb, 1, prod(size(cb)));
cr = imycc(:,:,3);
cr = filter2(lpf, cr);
cr = reshape(cr, 1, prod(size(cr)));
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?