View all glossary terms

Technology and architecture

Layout Analysis Explained: The Process That Decides How a Document Is Read, Complete Guide

Korea Deep LearningPublished

Layout analysis is the process of determining where the regions of a document page are, such as titles, body text, tables, figures and headers, and arranging those regions in the order a person would read them.

Why Reading Order Matters

Sentences come out scrambled.

You may have extracted text from a document and found the content jumbled. Sentences from the left and right columns of a two-column report alternate, or values from a table get inserted between body sentences.

The cause is usually the reading order. Scanning from top to bottom and left to right breaks down immediately in documents with split columns or tables. People recognize columns from headings and treat tables as separate, but without that judgment, even accurate character reading produces results that are not useful. Layout analysis performs that judgment.

Precise Definition of Layout Analysis: How It Differs from Character Recognition

Character Recognition and Layout Analysis, Three Axes of Difference

First, the target differs. Character recognition targets letters. Layout analysis targets the regions that letters form and how those regions are arranged.

Second, the goal differs. The goal of character recognition is to transcribe accurately. The goal of layout analysis is to determine what is where and in what order it should be read.

Third, the metric differs. Character recognition is measured by character accuracy. Layout analysis is measured by whether all regions were found and whether their positions are accurate. One public-document evaluation confirmed that all evaluated elements were detected and their positions located accurately.

The two are not alternatives. Recognition results only carry meaning once the order is set, and regions only get their content once recognition is done. In practical pipelines, layout analysis comes first and character recognition is layered on top.

Four Judgments Layout Analysis Makes

Four Judgments Made During Processing

First, it identifies the region type. It decides whether a region is a title, body text, table, figure or header. Letters of the same size play different roles depending on their position and surrounding context.

Second, it sets region boundaries. It decides where one table ends and the next paragraph begins. Difficulty rises with tables that have no ruling lines and with paragraphs separated only by whitespace.

Third, it determines the reading order. When multi-column layouts, inserted figures and footnotes are mixed together, the order has to be decided, and people can get confused by it too.

Fourth, it builds the hierarchy. Deciding which body text falls under which section heading greatly increases usefulness in later search and structuring.

Practical Application of Layout Analysis

Place It at the Front and Measure Its Performance Separately

Layout analysis sits at the front of the pipeline, so a region missed here is not recovered later. For that reason, its performance should be measured separately from character recognition.

When measuring, separate how many regions were found from how accurate their positions are. Detection often works well while reconstruction inside tables is weak, so do not merge the two values into one number.

Set Expectations by Document Type

General reports, government forms and tax returns have completely different layout characteristics. In a tax return, the table is the body and the guidance sentences sit inside the table. Reports have a clear hierarchy of headings and body text.

When choosing validation documents, reflect this difference, or the actual performance will not show. Measuring with only one type leads to unexpected results when the system is used with other documents.

Layout Analysis in the Korean Context

Korean government forms pack tables, guidance sentences and circled-number item markers densely onto one page. Since a table cell is often guidance on how to fill in the form rather than data, judging the region type is especially important.

Document condition also sets requirements. Faxed copies come in skewed, cut off at the top, and with faint ruling lines. For such documents, skew correction and noise removal should be included before layout analysis.

Deciding the Reading Order Is the Core

The harder part of layout analysis is not dividing regions but deciding the order. People naturally judge where to start reading by looking at the page, but that judgment splits in multi-column documents and in structures where a table sits inside another table.

Getting the order wrong changes the results significantly. If a two-column report is read through the left column only partway before jumping right, the sentences mix and the meaning is lost. A footnote that interrupts the middle of a paragraph breaks its argument. Headers and footers mixed into the body repeat the same phrase on every page and lower search quality.

So when checking performance, look at whether the order is correct as well as how many regions were found. One public-document evaluation confirmed element detection and position accuracy together, but that value is a separate metric from order accuracy.

Frequently asked questions

Is character recognition alone not enough?

Without a set reading order, sentences get mixed up. This is especially true for multi-column documents and documents with tables.

How is performance checked?

Check the number of detected regions and their position accuracy separately from character recognition. Merging them into one number hides where the problems are.

Which regions can be distinguished?

Titles and section headings, body text, tables, figures, charts, equations, lists, captions, headers, footers, footnotes and similar elements are distinguished.

Can skewed scans be processed?

Yes, but skew correction should be in place upstream for stable results. When evaluating adoption, check the preprocessing configuration.

Can multi-column documents be processed?

Yes, but order determination is difficult for this structure. Be sure to include such documents in the validation set and check them.

How are headers and footers handled?

They are identified as elements distinct from body text and marked separately. Without this distinction, the same phrase repeats on every page and search quality drops.

Send one document with a complex structure and we will return the region detection results as they are.

Contact us