Assuming the camera is not moving, then you can use "imread" to read the video frames, which will give you a NxMx3 matrix, with NxM being the resolution of the image and the third dimension corresponds to RGB values. Then, if you want the RGB values of a specific pixel, you could do
for pixel (1,2) and so on. This will give you a comma separated list but you can use "permute" to turn that into a vector:
permute(my_image(1,2,:),[3 2 1])
Then you can use, for example, "norm" to calculate the Euclidean distance between two pixels.
To create histograms, you can use "imhist" and follow the code provided in the link below:
You could use a for loop, but "norm" and "vecnorm" can be applied to matrices as well for speed.