A defect examination apparatus detects defect locations for a plurality of
to-be-inspected objects vertically and horizontally arranged according to
a prescribed rule. A blob analysis section finds location coordinates for
the plurality of to-be-inspected objects. Based on location coordinates
found by this blob analysis section, a rotation angle calculation section
finds a rotation angle for a horizontal series of the to-be-inspected
objects against a horizontal line. The rotation angle calculation section
also finds a rotation angle for a vertical series of the to-be-inspected
objects against a vertical line. A pitch size calculation section finds
vertical and horizontal pitch sizes for the plurality of to-be-inspected
objects. A matrix number analysis section finds a matrix number for each
to-be-inspected object based on a rotation angle found by the rotation
angle calculation section and a pitch size found by the pitch size
calculation section.