A computer-implemented method for adjusting backlight in measurement of a
profile image of an object includes setting a light source of an image
measuring machine to an original intensity level, obtaining the profile
image of the object laid on the image measuring machine, and performing a
mean filter processing and a binary image processing on the profile
image. The method further includes setting intensity variables to adjust
backlight intensity of the light source, uses the intensity variables to
calculate an optimum intensity level of the backlight intensity utilizing
an iterative method, and adjusting the backlight intensity of the light
source to the optimum intensity level to obtain an optimum profile image
of the object.