Friday, June 28, 2013

How to convert image to text

We can use  Tesseract OCR (optical character recognition)  to convert image to text.

Tesseract is considered one of the most accurate free software OCR engines currently available.

 Tesseract also support many languages.

to install  Tesseract use apt-get

 root@darapc:/home/dara/pdf2djvu# apt-get install tesseract-ocr

 Example of using it


To convert it use the following command

root@darapc:/home/dara/pdf2djvu# tesseract Descriptive-Essay-Sample.jpg Descriptive-Essay-Sample.jpg

the result is
root@darapc:/home/dara/pdf2djvu# cat Descriptive-Essay-Sample.jpg.txt

 The Mona Lisa is perhaps Leonardo DaVinci's most famous of
paintings. It is an oil painting, painted on poplar wood. The
painting is most famous for the smile of the woman, which
people have been trying to decipher for a long time. Many
believe that the portrait is that of DaVinci himself, while many
also place a lot mystic connections with this painting.

The portrait depicts a woman's bust, with a distant landscape
that is visible in the backdrop. Leonardo used a pyramid design
to install the woman in a simple and calm manner within the
painting. The woman is shown with her hands folded, with her
breast, neck, and face painted the same color as her hands. The
light is diffused so that the various curves and geometrical
shapes on the painting are made visible through it.

Perhaps the most interesting thing about the painting is the
woman's smile. Many believe that it is innocent and inviting,
while others believe it is that of smugness and is a smirk. Many
scientiļ¬c studies have been undertaken to determine the eXact
nature of the smile and the real reason remains a mystery. It is
believed that every person sees the smile differently because of
the changes in the lighting that Leonardo presented.

The woman is shown seated in an open area, and behind her is
a vast landscape, which recedes to an icy mountain. Some
winding paths and a far away bridge is also perceptible in the

The painting is an amazing one and one should definitely take a
look at it in order to appreciate its full beauty. The painting is
currently on display at the Musee du Louvre, in Paris.

No comments:

Post a Comment