MATLAB: How a video be processed in a original format(RGB format)

gray video to rgb videomatlab coder

Sir,
I have a codings to track the people in a video.My codings is
%Tracking people
hsrc = vision.VideoFileReader('D:/videos/vi.avi', ...
'ImageColorSpace', 'Intensity', ...
'VideoOutputDataType', 'uint8');
hfg = vision.ForegroundDetector(...
'NumTrainingFrames', 5, ... % 5 because of short video
'InitialVariance', 30*30); % initial standard deviation of 30
hblob = vision.BlobAnalysis(...
'CentroidOutputPort', false, 'AreaOutputPort', false, ...
'BoundingBoxOutputPort', true, 'MinimumBlobArea', 10);
hsnk = vision.VideoPlayer();
while ~isDone(hsrc)
frame = step(hsrc);
fgMask = step(hfg, frame);
bbox = step(hblob, fgMask);
% draw bounding boxes around people
out = insertShape(frame, 'Rectangle', bbox, 'Color', 'green');
step(hsnk, out); % view results in the video player
end
release(hsnk);
release(hsrc);
But the video have been processed as a gray video. How can I process this in original RGB format.

Best Answer

sir, Can you give the RGb format instance?
Related Question