1. In an optical inspection system comprising an image processing computer system connected to an image sensor, a method of determining condition of a deformed object comprising: providing a reference model of the deformed object comprising first areas; determining in the initial three-dimensional image second areas corresponding to the first areas; determining a first geometric transformation which matches the second areas with the first areas; determining a corrected three-dimensional image based on the first geometric transformation and on the initial three-dimensional image; providing the reference model of the deformed object comprising third areas; acquiring at least one two-dimensional image of the object with the image sensor; searching in the two-dimensional image for at least fourth areas corresponding to the third areas; determining a second geometric transformation which matches the fourth areas with the third areas; applying the second transformation to the first areas to obtain fifth areas the two-dimensional image; searching in the initial three-dimensional image for the second areas corresponding to the fifth areas; determining a third geometric transformation which matches the second areas with the fifth areas; determining the corrected three-dimensional image based on the second and third geometric transformations and on the initial three-dimensional image; and determining condition of the deformed object based on the corrected three-dimensional image.