The present invention provides an object measuring apparatus capable of
performing high-speed process and accurately counting the number of a
plurality of objects even in the case where the plurality of objects pass
a boundary line simultaneously. The object measuring apparatus extracts
motion vectors at a plurality of times in each of a plurality of
positions on a boundary line on the basis of a plurality of images. The
object measuring apparatus obtains at least one integral value by
integrating components perpendicular to the boundary line of the motion
vectors. As the at least one integral value, for example, an integral
value derived by integrating the perpendicular components of one of
positive and negative signs is obtained. The object measuring apparatus
calculates the number of moving objects (people and the like) passing the
boundary line on the basis of the integral value.