In a visual inspection method and apparatus, a picture processing unit converts
an original picture, obtained by taking a photograph of a BGA illuminated by a
ring illuminator from above, using a camera, and labels a binary picture obtained
by this binary conversion. Then, it forms a rectangle circumscribing an outer circumference
of a labeling picture obtained by the labeling, and inverts a labeling picture
within the formed circumscribing rectangle, and removes a portion of a region formed
by the outer circumference and the circumscribing rectangle in a picture obtained
by the inversion, and then generates an inspection picture by adding a picture
obtained by the removal to the labeling picture, and accordingly judges a pass
or rejection of the inspection target sample based on the generated inspection
picture. Thus, the inspection can be carried out at high accuracy irrespectively
of a low cost.