Patent ID: 7613359

Claim:
An image measuring apparatus comprising: an imaging portion with pixels, each pixel being allocated with one color, four pixels constituting one set, one set being allocated with a plurality of colors to express a color, and said sets being arranged in a matrix, configured to image a measuring object and output four image data based on said four pixels, respectively; and a calculation portion which calculates, based on the four image data, respectively, positions of the measuring object and contrast values at one side and an other side across the measuring object as a boundary, and which generates a position data of the measuring object based on the positions and contrast values, and outputs the position data, wherein the position data of the measuring object is generated by calculating an average position of the measuring object by: multiplying the positions by the corresponding contrast values; calculating the sum of the products of the positions and the contrast values; and dividing the sum of the products by the sum of the contrast values.