1. A method of inspecting or measuring sizes of an object, comprising the steps of: setting contour registration areas at least at two locations of a reference object; registering contour positions of said reference object at each of said contour registration areas; setting an inspection area or a measurement area for an inspection or measurement object; detecting contour positions of said inspection or measurement object within said inspection or measurement area; obtaining values of correlation between said contour positions of said inspection or measurement object and said contour positions of said reference object; and determining a position relating to the highest one of said values of correlation as a position of said inspection or measurement object.