フィルターのクリア

how to convert the rgb in to gray for this code?

1 回表示 (過去 30 日間)
nirai selvi
nirai selvi 2015 年 12 月 18 日
回答済み: Guillaume 2015 年 12 月 18 日
% Create a detector object faceDetector = vision.CascadeObjectDetector; % Read input image [basefilename, pathname ] = uigetfile({'*.jpg';'*.png';'*.bmp'},'File selector'); filename= fullfile(pathname, basefilename); I = imread(filename);
% Detect faces bbox = step(faceDetector, I); disp(bbox); % Create a shape inserter object to draw bounding boxes around detections shapeInserter = vision.ShapeInserter('BorderColor','Custom','CustomBorderColor',[255 255 0]);
% Draw boxes around detected faces and display results I_faces = step(shapeInserter, I, int32(bbox)); figure, imshow(I_faces), title('Detected face');

回答 (1 件)

Guillaume
Guillaume 2015 年 12 月 18 日
How about rgb2gray?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by