OCR (Optical Character Recognition) is the conversion of text captured in an image into machine-readable form. The classical pipeline consists of pre-processing – deskewing, noise removal, binarisation – page layout analysis that separates text blocks, tables and images, segmentation into lines and characters, and the classification itself followed by dictionary-based language correction. Modern approaches skip character segmentation and process a whole line at once: a convolutional network combined with a recurrent layer and the CTC loss function allows training without knowing the position of individual characters, while today’s systems use transformer models such as TrOCR, or multimodal language models that extract structured data from the image directly. A demanding variant is recognising text in unconstrained scenes and handwriting, where perspective distortion, varied typefaces and changing light all combine. For many languages, support for accented characters is critical, since swapping a diacritical mark changes the meaning of a word. Typical deployments are archive digitisation, invoice processing, licence plate reading and assistive technology for blind users.
The difference between an image of a page and text is like the difference between a photograph of a letter and the letter itself. In the photograph you cannot search, copy or count anything – it is just a mosaic of dark and light dots, even though you read it effortlessly. OCR is a machine that learned to do what your brain does: infer from the shapes of dark dots that this is the letter “g”. It also does what you do when the original is smudged – it uses context. If you can make out “recei?e”, you fill in the “v”, because you know the word. Without that linguistic hint, OCR would get things wrong far more often.