Lost works of Goya, Van Gogh and Van Eyck could be discovered after scientists developed an artificially intelligent algorithm which can spot earlier images in x-rays of paintings.

Conservators and art historians often scan artworks as many great masters reused their canvases. The images can give hints of the original composition, or even reveal an entirely different subject.

But until now it has been tricky to tease apart the underlying and overlying images because they were all merged together in the x-ray.

Now computer scientists at University College London has developed a programme that can sort the images, effectively separating the artworks from each other.

The team is currently working with the National Gallery on Portrait of Dona Isoabel de Porcel by Francisco Goya, which was shown to have been painted over the figure of a young man in uniform.