Can get the byte array from the image like this..(from MSDN)
Bitmap bmp = new Bitmap("Flower1.jpg");
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
System.Drawing.Imaging.BitmapData bmpData =
bmp.LockBits(rect, System.Drawing.Imaging.ImageLockMode.ReadWrite,
bmp.PixelFormat);
IntPtr ptr = bmpData.Scan0;
int bytes = bmp.Width * bmp.Height*3 ;
byte[] rgbValues = new byte[bytes];
System.Runtime.InteropServices.Marshal.Copy(ptr, rgbValues, 0, bytes);
Once get the array need to loop through the array and use the algorithm for comparison.
The simpler way for comparing images would be comparing the image histogram. There are ways in the frequency domain as well. Why because the same frame area taken in bright light and dim light has different pixel values, but more or less same histogram shape. For this simple fact comparing byte to byte (or pixel to pixel). There are many advance algorithms over there, some use the entropy content of the image. Though there many algorithms there is no hard and fast rules which one is better. So you need research trying those popular algorithms
You may use libraries like Accord.net or Aforge.net, they have already developed algorithms which may useful for you.
http://www.aforgenet.com/framework/[
^]
http://accord-net.origo.ethz.ch/[
^]