1. A method for identifying voids in solder balls in a ball-grid array (BGA) using an image of the BGA, the method comprising: localizing an image of a solder ball on the BGA image, the solder ball image having a radius and comprising a plurality of points, each point having an image intensity; producing a void-free model image of the solder ball based on the radius of the solder ball image, the void-free model image comprising a plurality of points, each point having an image intensity; computing a difference between the image intensities of the points of the solder ball image and the image intensities of the points of the void-free model image to produce a residual image, the residual image comprising a plurality of points, each point having an image intensity; and identifying a void using the residual image.