VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

How Artificial Intelligence Works | How AI Recognises Crossed-Out Text in Scanned Documents

How artificial intelligence works when recognising crossed-out words begins with a school notebook. A student writes ‘the answer is fourteen’, draws a line through fourteen and writes sixteen above it. A scanner sees all the ink at once. An ordinary handwriting recogniser may read both numbers, blend them together or ignore the line that signals a correction. A useful document-understanding system must distinguish the written words from the later mark that changes how those words should be interpreted.

Did you know that a strikethrough line does not always mean the same thing as text removal? In a revision draft, it may indicate a rejected phrase. In a historical manuscript, the crossed-out phrase can be important evidence about the author’s thinking. In a consent or assessment form, the validity of a correction may depend on separate rules. AI should recognise the visible crossing strokes and their target region without silently deleting source material.

The practical route is preserve the colour scan → locate text lines and handwriting regions → detect horizontal, diagonal, wavy or scribbled crossing strokes → associate each stroke with its underlying words → classify the annotation as likely strike-through or uncertain → interpret the document convention → retain original and corrected versions for review. The system’s task is not to rewrite the page as the student ought to have written it. It is to report faithfully what the source shows.

The five-step explanation

  • Identify the original written words
  • Detect crossing strokes separately from letters
  • Connect each stroke to its proper text region
  • Interpret deletion or correction according to context
  • Keep the original scan and review uncertain letters

1. Why crossed-out writing is a distinct document problem

A handwritten page can contain ordinary letters, punctuation, diagrams, underlines, correction marks and smudges. A line that passes through a word may change whether the word is intended as the final response, even though the letters are still physically present.

Converting the page to a plain stream of OCR text loses this difference. A software system might output ‘fourteen sixteen’ without indicating that fourteen was rejected. An automatic learning assistant that treats both numbers as current answers would misunderstand the student’s working.

The task therefore has two outputs: the original written content, as far as it is legible, and a separate annotation relationship indicating which span is crossed out. Keeping the two layers distinct makes downstream corrections safer.

2. A strike-through mark is not necessarily a straight line

Some writers use one horizontal stroke, others use a diagonal slash, a zigzag or a dense scribble. A word may be crossed through several times, while an entire sentence might be cancelled with a large X across its block.

Research in Pattern Recognition on struck-out handwritten text explicitly considers horizontal, slanted, zigzag and wavy cancellation strokes across individual words and multiple lines. This diversity explains why a detector trained only on one neat straight line would miss real corrections.

The geometry of the crossing matters. A narrow line passing through the middle of a word is different from a line placed neatly below it. But those patterns can overlap in messy handwriting, so the system needs context and sometimes an uncertainty label.

3. The first stage is detecting the written text

The document system identifies lines, words or regions that contain handwriting. OCR or handwritten-text recognition may estimate the characters, while a layout detector records where each text region sits in the page.

Crossing marks can interfere with that recognition. A heavy line through a lowercase letter can make the letter resemble a different character or hide its identifying stroke. A recogniser might output plausible text from language context despite insufficient visual evidence.

That is why the untouched scan must remain available. A model should never represent a guessed original word as directly observed when the crossing stroke actually obscures its letters.

4. A second stage detects crossing strokes

Some classical approaches inspect connected ink components, line orientation and the path a stroke takes through word boxes. A long line running across multiple letters can be a candidate cancellation mark, especially if it connects writing in an unusual way.

Other approaches use image segmentation to mark pixels likely to belong to striking-through ink. A neural detector may learn different scribble styles from annotated examples. The output can be a region or mask rather than a simple yes-or-no label for the whole page.

Not every long stroke is a correction. Fraction bars, table lines, arrows and underlines can also cross or approach text. The algorithm must compare the stroke with nearby writing and the larger layout before classifying its function.

5. Why an underline is not a deletion

A student may underline a definition to emphasise it. An underline often runs beneath the baseline of the words, whereas a typical strike-through crosses the letter bodies. That is a useful geometric distinction.

But handwritten strokes are rarely perfectly aligned. A high underline can touch descenders; a low strike-through may lie near the text baseline. A slash through one digit could also be a mathematical convention rather than a correction.

The model must consider local geometry, stroke direction and document context. When the evidence supports multiple interpretations, the result should be marked ambiguous rather than automatically removing the word.

6. The relationship between a mark and its target words

Detecting a strike-through line is only half the task. The system needs to determine which words or cells the line cancels. One stroke may cover the last two words of a sentence, while the first three remain valid.

A simple geometric rule can compare the stroke mask with the bounding boxes of recognised words. A better method may also group the line and its text in a shared document-structure representation. Overlap thresholds can still fail on sloping handwriting or a long sentence with two lines.

A useful export might say ‘Words at these coordinates appear struck through’ while preserving their original text. That is more informative and honest than producing a cleaned transcript in which the cancelled phrase has disappeared entirely.

7. A fictional algebra correction

Imagine a student writes 5x = 20 and then writes x = 5. The student notices the calculation should give x = 4, strikes through 5 and writes 4 beside it. A teacher later photographs the working.

The AI finds both the old and new numerals, identifies a crossing stroke through the first answer, and records a candidate correction. A study application can display the visible sequence rather than present ‘x = 4’ as if the student had never made a mistake.

Now suppose the student merely draws a line beneath the correct answer. A detector trained to equate any horizontal stroke with cancellation might wrongly delete the working. The distinction changes how the learner’s reasoning is assessed.

This worksheet and correction are invented examples. They are not evidence about a real child or an accuracy claim concerning a deployed model.

8. A common OCR error: reading the correction as a character

A diagonal crossing stroke can look like part of a letter, especially in cursive handwriting. A recogniser may treat it as an additional slash, a digit one or part of an X. This corrupts both the original content and its annotation.

One strategy detects the strike-through before or alongside text recognition, then supplies that information to the recogniser. Another performs a controlled removal of crossing-stroke pixels for OCR while retaining the original image as evidence.

The objective is not to pretend the stroke never existed. A temporary cleaned image can aid recognition, but the stored document representation must still record that the phrase was cancelled and that some underlying letters may remain uncertain.

9. Where deep learning can help

A 2026 research article on strike-through handwriting detection describes a multi-scale, context-aware model using a ResNet-based visual backbone and stroke-aware attention. Its experiments include synthetically varied cancellation marks over handwritten-document samples.

Such methods can help detect complex crossing patterns that a single straight-line rule misses. However, performance figures are tied to the dataset, annotation policy and tested conditions. Synthetic strike-through marks may differ from actual marks made with different pens and paper.

Neural detection is not enough to determine an author’s final intention in every case. The model might identify overlapping ink accurately while still being uncertain whether the mark represents a deletion, a correction, a diagrammatic arrow or a decorative line.

10. Crossed-out text sometimes must be preserved verbatim

Historical documents often reveal the sequence of a writer’s choices through deletions and additions. Removing cancelled language from a digital facsimile can hide an important part of the manuscript’s history.

Similarly, a learner’s draft may use corrections to show progress. A teacher might want to inspect both the original error and the new answer. An archival or educational tool should offer a reading view and a diplomatic transcription that records alterations rather than only one finalised text.

That need changes the product design. A machine-cleaned image can be a convenience, but a faithful document edition should retain the source and mark which text was actually struck through.

Table 1. Similar strokes with different document meanings
Visible strokePossible roleWhat must be checked
Line across letter bodiesStrike-through or cancellationWhich words it crosses
Line below wordsUnderline or emphasisText baseline and context
Fraction barMathematical notationSurrounding expression
Diagonal line across a form boxMark or correctionForm instructions
Dense scribbleCancelled text or drawingSource region and uncertainty

11. Crossed-out words in forms have additional limits

A form can contain a crossed-out choice followed by a newly marked option. The visual system may identify the correction without knowing whether the change was authorised, initialled or valid under the organisation’s rules.

A model that turns the darkest or latest-looking mark into the definitive final answer can overstate its evidence. A static scan may not show the order in which strokes were written.

An accountable output separates ‘visible strike-through over option A’ from ‘verified final choice is option B’. The latter can require document-specific rules and human review beyond computer vision.

12. Printed strikethrough is another case

Born-digital documents may use font styling to cross out text. PDF extraction can sometimes preserve strike-through annotation or style information, but scanned documents often contain only pixels. These source types need different processing paths.

Google’s Document AI reference lists a strikeout property among text-style fields, while noting that the feature is not supported in that particular API description. It would be misleading to cite the existence of a schema field as proof that the service can identify all struck-out scanned handwriting.

A good implementation checks actual capabilities and versioned documentation. When source editing metadata is available, it may provide better evidence than image inference alone. Otherwise visual recognition remains a candidate process subject to error.

13. Two overlapping strike-through marks complicate grouping

A writer may cross an entire line with one diagonal stroke and add a second to make the cancellation clear. Another may scribble over only part of a word. The algorithm must decide whether the marks belong to one annotation or several.

A region-based detector can group connected strokes, but overlapping text can make that grouping ambiguous. Removing all intersecting pixels risks deleting the underlying letters too.

The safer representation retains both the original image and a proposed strike-through mask. Reviewers can adjust which word boxes belong to the cancellation without altering the visual source.

14. Evaluating detection and transcription separately

Researchers may evaluate strike-through localisation using overlap between predicted and annotated regions. Recognition quality requires a different test: can the system read the original words and preserve the fact that they were cancelled?

A detector could achieve excellent region overlap yet falsely assign the strike-through to the neighbouring line of text. Conversely, it could recognise the original words correctly but fail to indicate the deletion, which is a semantic error.

Independent test pages should include underlines, slashes, mathematics, multiple pen colours, faint marks and scribbles. Performance should be reported by condition rather than concealed inside one overall number.

Table 2. Common struck-out-text extraction errors
FailureConsequenceReview approach
Crossing stroke becomes OCR letterOriginal word misreadSeparate ink layers for analysis
Underline treated as deletionValid sentence removedCompare stroke position
Scribble covers whole wordInvented underlying lettersMark unreadable
Cancellation assigned to next lineWrong answer rejectedCheck exact word boxes
Old response silently deletedRevision history lostPreserve diplomatic transcript
Correction accepted as final authorityUnverified intention claimedApply form or assessment rules

15. How to display corrections accessibly

An accessible digital transcription can represent cancelled words with clear markup and provide the replacement phrase where the source supports it. The exact visual crossing should still be available in the original image.

For an everyday classroom note, a display might say ‘Earlier answer: fourteen (crossed out); replacement: sixteen’. That is more informative than dropping the old answer or reading both numbers as if they form one sentence.

Voice or screen-reader output should explain the correction without relying solely on a visual line. This requires a content policy for uncertainty as well as accurate geometric detection.

16. A safe learning exercise

Write three original sentences. Cross out one word in the first with a straight line, use a zigzag over part of the second and underline a phrase in the third. Photograph the page with clear, even lighting.

Ask a classmate to identify which strokes indicate cancellation and which indicate emphasis. Then draw a fraction bar or table border near the text and repeat the classification. The exercise shows why line detection is not enough.

For a digital extension, keep the original scan and mark the crossing-stroke regions on a separate overlay. Do not let an automated cleanup overwrite the source page; the annotation itself is part of the evidence.

17. Privacy and fairness in educational assessment

Student drafts and examination working can contain names, marks and sensitive educational information. Automated interpretation should use authorised documents and avoid inventing a student’s intention from one ambiguous line.

A correction may demonstrate useful self-monitoring even when the first attempt was wrong. A system that erases all crossings can remove evidence of learning; one that treats every crossing as an invalid answer can unfairly judge a legitimate revision.

The proper workflow depends on assessment rules. Computer vision reports what is visible, while authorised educators decide how that evidence should affect feedback or marking.

18. Common misconceptions

First, a crossed-out phrase has not vanished from the original document. Second, detecting a long line does not prove it is a deletion. Third, printed font styling and handwritten crossing marks may require different methods.

Fourth, removing a strike-through pixel mask does not guarantee faithful recovery of covered characters. Fifth, a model cannot always infer the order of pen strokes from a single scan. Sixth, a neat OCR transcript can misrepresent an important correction.

The practical rule is to report the original text, candidate deletion and replacement evidence separately. When the source is ambiguous, uncertainty is more useful than a confident fictional history of the edit.

19. The deeper lesson: edits are data, not noise

Crossed-out text is a strong example of why document AI must recover relationships rather than only recognised words. The line through a sentence expresses an action about that sentence. It may alter its intended status without making the original marks disappear.

Computer vision can localise the stroke, recognition can suggest the words and document logic can connect the two. Human review remains important when the meaning of the correction depends on context or rules.

The durable insight is that faithful AI should not ‘clean up’ a document so aggressively that it destroys its history. It should help people see what was written, what was changed and which parts of that interpretation remain uncertain.

Frequently asked questions

How can AI detect crossed-out words?

It analyses strokes that intersect text and uses geometry or learned segmentation to localise likely cancellations.

Is a strikethrough always a horizontal line?

No. Writers may use diagonal, zigzag, wavy or scribbled marks.

Why is a crossed-out word still important?

It can document correction, revision history or a change of answer.

Can AI read the original words under a heavy scribble?

Sometimes parts remain visible, but exact recovery cannot be guaranteed when the writing is obscured.

How is a strikethrough different from an underline?

The former typically intersects the word body; the latter often sits near the text baseline, though handwriting is ambiguous.

Does printed PDF text have strikethrough metadata?

Sometimes; scanned paper may contain only pixels, requiring visual detection.

Can a model know the order of pen strokes?

Not always from a single static scan.

What should a handwriting recogniser output?

The original reading where supported, the crossed-out status and the relevant source coordinates.

Should assessment software ignore all corrected answers?

No. Relevant marking rules and actual source evidence determine how corrections should be handled.

How should the method be tested?

Use annotated crossing marks, underlines, equations and different handwriting styles on independent pages.

Research and connected guides

Editorial note: All handwritten answers and correction examples are fictional. Strike-through detection studies do not establish the intention behind every mark or guarantee recognition of characters hidden by ink. The original page, annotations and applicable assessment or archival rules remain authoritative.