1. An image measuring apparatus, comprising: an imaging device that images a workpiece to acquire an image of the workpiece; and a processing device that performs measurement of the workpiece based on the image and outputs a measurement result, the processing device based on the image, generating another image whose number-of-pixels is smaller than that of the image, setting a plurality of regions by segmenting one portion of the another image including pixels whose density levels are higher than a threshold value and another portion of the another image including pixels whose density levels are lower than the threshold value to different regions, and calculating the measurement result based on the plurality of regions.