?? face_test_luminance.m
字號:
clear,clc
Ori_Face=imread('C:\matlab\sub6.1.jpg');
copy=Ori_Face;
Chrom=rgb2ycbcr(copy);
for i=1:size(Chrom,1)%Read row pixels
for j=1:size(Chrom,2)%Read column pixels
%This conditions will determine the face based on RGB colour value
if (105<Chrom(i,j,1)<117 && 110<Chrom(i,j,2)<113 && Chrom(i,j,3)>128)%why i can't extract blue color properly?
copy(i,j,1)=0; %is my condition have any mistakes?
copy(i,j,2)=0;
copy(i,j,3)=255; %i get my pixel value by pixel region tool/
%If above conditions is not meet, other colour values will be set to 255 (white)
else
copy(i,j,1)=255;
copy(i,j,2)=255;
copy(i,j,3)=255;
end
end
end
% h = fspecial('prewitt');
% filteredRGB = imfilter(copy, h);
% imshow(filteredRGB);
imtool(copy);
imtool(Chrom);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -