Lock-in (LI) thermography is a popular thermal-nondestructive-testing technique which, like other active thermographic techniques, requires an external heating stimulus, preferably on a blackened surface. It is not, however, immune to nonideal situations like nonuniform heating and surface emissivity variation. The phase image, to some extent, helps to reduce the effect of these artifacts but is inadequate if the variations are large. For example, a poorly blackened metallic sample with reflecting patches on its surface is very difficult to actively thermograph because of direct reflection from the surface. This paper proposes an image reconstruction algorithm for offline removal of such artifacts. In addition, the proposed algorithm enables LI thermography tests in the transient regime and removes temperature gradients due to nonuniform heating. The algorithm was tested with a mild-steel sample having 20-mm-diameter back-drilled holes at various depths ranging from 0.2 to 7.7 mm, stimulated at 20-, 40-, 50-, 60-, and 80-mHz excitation frequencies. The effect of the total number of heating cycles is also presented. © 2011 IEEE.