← Computer Vision for EveryoneToolsInVisionLearning Center
Document and Scene Understanding · Lesson 65

Locate Text in an Image

A scanned form contains text in several locations.

Read the full lesson and open its transcript below. A narrated video will be added after production.

Lesson overview

What you will learn

A scanned form contains text in several locations.

  1. A practical question
  2. The useful idea
  3. Work through the example
  4. Limits and next step
01

A practical question

A camera photographs a parking permit on a windshield. Before reading a single character, we need to locate the text region. Reflections, slanted glass, and nearby printed stickers all compete for attention.

02

The useful idea

A text detector proposes regions likely to contain writing. Inspect whether its boxes include full lines or cut off the first and last letters. A tight box can look precise while making recognition impossible. A region around decorative stripes can be a false alarm.

03

Work through the example

Overlay the proposed regions on the original photo. Include daytime, night, and heavily reflective examples. If text is too small or blurred in the capture, enlarging its crop later won't invent the missing strokes. A document photograph can contain a printed heading, a form field, and handwriting. Finding where text sits is a different task from recognizing its letters. Draw separate boxes on several layouts and inspect whether lines are cut, merged, or skipped. If a field box includes the label and the value together, later recognition may confuse their roles. Keep the crop with its page position so a reviewer can trace an extracted word to the source. Use this case to test your understanding: Inspect boxes over headings and handwritten fields separately. Here is the limitation to watch for: A detector can miss pale text or confuse decorative marks with letters. The answer follows from that evidence: Text detection proposes regions where characters may appear before recognition. On the photographed permit, separate the heading from the field values before reading characters. If a bounding box merges them, even perfect recognition can attach the wrong text to the wrong field. Retain each crop's page location.

04

Limits and next step

Keep the regions with their source images. Next, we'll recognize characters inside those boxes and validate the result against the permit's expected format.

Worked example

Inspect boxes over headings and handwritten fields separately.

Knowledge check

Quick check: test your understanding

Try it yourself: Consider this case: Inspect boxes over headings and handwritten fields separately. Explain how you would check the result. In your answer, address this limitation: A detector can miss pale text or confuse decorative marks with letters.

Check the reasoning

Text detection proposes regions where characters may appear before recognition. A detector can miss pale text or confuse decorative marks with letters.

What is the main idea behind locate text in an image?

Text detection proposes regions where characters may appear before recognition.

How is it used in the example?

Inspect boxes over headings and handwritten fields separately.

What limitation should be checked?

A detector can miss pale text or confuse decorative marks with letters.

Further reading

Programming Computer Vision with Python — Jan Erik Solem.

Original ToolsInVision teaching examples. Editorial approach · Suggest a correction

Accessible referenceLesson 65 transcript295 words · Narration ready for the upcoming videoOpen transcript

A camera photographs a parking permit on a windshield. Before reading a single character, we need to locate the text region. Reflections, slanted glass, and nearby printed stickers all compete for attention.

A text detector proposes regions likely to contain writing. Inspect whether its boxes include full lines or cut off the first and last letters. A tight box can look precise while making recognition impossible. A region around decorative stripes can be a false alarm.

Overlay the proposed regions on the original photo. Include daytime, night, and heavily reflective examples. If text is too small or blurred in the capture, enlarging its crop later won't invent the missing strokes. A document photograph can contain a printed heading, a form field, and handwriting. Finding where text sits is a different task from recognizing its letters. Draw separate boxes on several layouts and inspect whether lines are cut, merged, or skipped. If a field box includes the label and the value together, later recognition may confuse their roles. Keep the crop with its page position so a reviewer can trace an extracted word to the source. Use this case to test your understanding: Inspect boxes over headings and handwritten fields separately. Here is the limitation to watch for: A detector can miss pale text or confuse decorative marks with letters. The answer follows from that evidence: Text detection proposes regions where characters may appear before recognition. On the photographed permit, separate the heading from the field values before reading characters. If a bounding box merges them, even perfect recognition can attach the wrong text to the wrong field. Retain each crop's page location.

Keep the regions with their source images. Next, we'll recognize characters inside those boxes and validate the result against the permit's expected format.