Section of Microtechnics, EPFL
Pictures of paintings shot by amateurs in museums or art galleries often present two kinds of deformations. These deformations can already be corrected by various applications, however the process can require practice and is not user friendly. Therefore, this project aims to create an ImageJ plugin to correct the lens distortion (inherent from the optical system) and the perspective deformations in pictures of paintings.
A general distortion model was used to correct the barrel or pincushion lens distortion. Moreover, a method was developed to recover, from a quadrilateral in an image plane, the corresponding rectangle in the object space that can be projected onto the quadrilateral through a pinhole. Both these methods were implemented in a java plugin along with an Active Contour Model,commonly known as snake. With the appropriated image processing, the snake can optimize the parameters of the perspective and distortion models to fit the painting present in the image. Finally, through interpolation, a corrected image of the painting can be created.
The resulting plugin proved to efficiently correct automatically the deformations when a good contrast can be seen between the painting and the background of the image. The figure 1 shows an input image with the grid of the snake optimized on top of the painting. The corrected image can be seen in figure 2. When the contrast between the painting and the background is not sufficient, the correction cannot be automated and the user has to find the parameters of the deformations models by experimentation, his own eyes acting as the optimizer.