MATLAB: How to plot pixel trand intesity over time (only Red channel) from a Video

Image Processing Toolboxvideo processing

hello, I have a video (699 frame, 1080*1920, 30fps )and i would plot the intensity trand of a selected pixel (cordinates: X=470, Y=84). How can i do to get it?
Below the code. i don't know where i'm wrong.
totRGB = zeros(699,1080,1920,3);
%cycle for (k=0:numFileTest)
for k=0:699
% input frame
p=double(k);
p=int2str(p);
nomefilea=strcat('KinectScreenshot_RGB',p);
nomefile=strcat(nomefilea,'.bmp');
frame=imread(nomefile);
totRGB(k,:,:,:) = frame; % % [numFrame, Y, X, channel]
trend_a = totRGB(:,470,84,1); % -------------------------------->where i'm wrong?
end
plot(trend_a)

Best Answer

My attached demo does the same thing except that it plots the mean over the whole image instead of a point. It will be trivial for you to modify to do just a single point.
Related Question