Finding the average color of an Image
<p>I am using a <code>BufferedImage</code> to hold a 10 by 10 sample of an image. With this Image I would like to find an approximate average color (as a <code>Color</code> object) that represents this image. Currently I have two ideas on how to implement this feature:</p>

<ol>
<li>Make a scaled instance of the image into a 1 by 1 size image and find the color of the newly created image as the average color</li>
<li>Use two for loops. The inner-most is used to average each line, the secondary for-loop is used to average each line pixel by pixel.</li>
</ol>

<p>I really like the idea of the first solution, however I am not sure how accurate it would be. The second solution would be as accurate as they come, however it seems incredibly tedious. I also believe the <code>getColor</code> command is processor intensive on a large scale such as this (I am performing this averaging roughly at 640 to 1920 times a second), please correct me if I am wrong. Since this method will be very CPU intensive, I would like to use a fairly efficient algorithm.</p>
