Patent Document ID: 7936948
Application ID: 11757400
Patent Status: 1

Claim One:
1. A system for merging differently focused images, the system comprising a measuring machine and a computer for obtaining a plurality of the differently focused images of an object disposed on the measuring machine, the plurality of differently focused images being stored in a compressed file and sharing a file header of the compressed file to reduce an access time while merging the differently focused images, the computer comprising a merge images program, the merge images program comprising: a read module configured for reading the plurality of the differently focused images of the object disposed on the measuring machine, selecting an image of the plurality of the differently focused images as a first image, selecting another image of the plurality of the differently focused images as a next image, reading gray values of the pixels and computing a gradient of each pixel according to the gray values; a determining module configured for determining whether the gradient of each of the pixels of the first image is less than the gradient of a corresponding pixel of the next image, determining whether the next image is a last image, and determining whether the read pixel is a last pixel of the first image; a merge images module configured for obtaining a merged image by updating/replacing the gray value and the gradient of the pixel of the first image with the gray value and the gradient of the corresponding pixel of the next image if the gradient of the pixel of the first image is less than the gradient of the corresponding pixel of the next image, and by keeping the gray value and the gradient of the pixel of the first image if the gradient of the pixel in the first image is greater than or equal to the gradient of the corresponding pixel in the next image.