First you have to figure out what format the picture was taken in. If it's RAW or BMP, then you've got nice little bytes of information for each rgb value of each pixel. If it was JPEG, then you've got to decompress it to get the pixel values. I think it might help to search for the term "threshold" in regards to picture analysis. It is basically getting rid of the colors that you don't want. Another way to find areas of the same color, since your data is basically a matrix, is to treat the column number as "x", treat the RGB value as "y", then find the change in y as x increases, along the row (aka a derivative). Then you've got an array of 0's for filled in areas of the same color, and enormous values at the border zones, and you can fill in your shape w/ whatever geometry you want to get the area. Or, if this is a long term project, you could check out Activision Tools or Euresys E-Vision. They already do this all this and much more.