Study of Document Layout Analysis Algorithms

Relative Study of Document Layout Analysis Algorithms for Printed Document Images

Don't use plagiarized sources. Get Your Custom Essay on
Study of Document Layout Analysis Algorithms
Just from $13/Page
Order Essay

Divya Kamat, Divya Sharma, Parag Chitale, Prateek Dasgupta

 
ABSTRACT
In the following survey paper, the different algorithms that could be used for document layout analysis have been studied and their results have been compared. For the removal of image mask, Bloomberg’s algorithm and CRLA have been described. For the purpose of text segmentation, we have studied the Recursive XY Cut algorithm, RLSA and RLSO algorithms.

Introduction

Physical layout analysis of printed document images is the first step of the OCR conversion. For the OCR to work effectively, we need to provide an input wherein no images are present in the document i.e. the image contains only text. If this is not done properly, the OCR will return garbage values. To avoid this, we have discussed two algorithms, Bloomberg’s Algorithm and CRLA that could be used for the removal images from the document images.
The next step is the text segmentation wherein we find the text blocks inside the document. The coordinates of these text blocks are then passed as input to the OCR. To perform this segmentation, we have discussed the recursive XY cut algorithm, the RLSA and RLSO algorithms.

Removal of Image from Document

The first step in the document layout analysis is to remove the images present in the original document. We will be discussing the Bloomberg’s algorithm along with its variations and the CRLA algorithm for image removal.

Bloomberg’s Algorithm

The Bloomberg’s algorithm is primarily used to find the image mask of halftone images. The implementation of this algorithm uses basic morphological operations. The algorithm has the following steps:

In the first step, the binarization of the input image is performed.
Next, 4×1 threshold reduction is performed twice using threshold T=1.
4×1 threshold reduction is performed using T=4.
4×1 threshold reduction is performed using T=3.
Opening the image with a structural element of size 5×5.
Next, 1×4 expansion of the image is performed twice.
Next the union of overlapping components of the seed image obtained from step 6 with the image obtained from step 2 is performed.
Dilation with structural element 3×3 followed by 1×4 expansion which is performed twice.
The halftone mask obtained from step 8 is then subtracted from the binarized input image.

The main issue with Bloomberg’s algorithm is that it is unable to distinguish between text and sketches (i.e. line drawings) in a printed document image.

Enhanced CRLA Algorithm

CRLA stands for Constraint Run Length Algorithm. In this algorithm we apply horizontal and vertical smoothening to the document image to get a clear separation between text and images in the document.
Enhanced CRLA is used to smooth out only the text part in the image and avoid smoothening of non-textual part of the document image.
Algorithm:

Label the connected components in the document image.
Classify the components with respect to their heights as follows:

Height less than or equal to 1 cm, label it as 1

Height between 1 and 3 cm, label it as 3
Height greater than 3 cm, label it as 3
Apply horizontal smoothening to the components with label 1 only.
Apply vertical smoothening to the components with label 1 only.
Logically AND the two images obtained previously.
Apply horizontal smoothening to the output image of AND operation.
Calculate Mean Black Run Length
Calculate the Black Run Length (BRL) row-wise for the region under consideration.
Maintain a Black-White Transition Count (TC) for the region.
Calculate Mean BRL as MBRL= (BRL/TC).
Calculate Mean Transition Count
Maintain a Black-White Transition Count (TC) for the region.
Calculate W, the width of the region.
Calculate Mean TC as MTC=(TC/W)
Extract the components from the image with label 1 having values of MBRL and MTC in the acceptable range for the typical document image.
Apply horizontal smoothening to the components with label 2 only.
Apply vertical smoothening to the components with label 2 only.
Logically AND the two images obtained previously.
Apply horizontal smoothening to the output image of AND operation.
Calculate MBRL and MTC.
Extract the components from the image with label 2 and 3 having values MBRL and MTC in the acceptable range for the typical document image.

At step 9 we extract the text part of the document image and at step 15 we extract the non-text part of the document image.
The main advantage of the CRLA algorithm is that clear separation of text and non-text part of the document image. It also works for sketches as well as halftones effectively. It has considerably less complexity as selective smoothening is done.
However, after the removal of the non-textual part of the document image, some stray pixels remain the image. The connected components in the halftone image whose height is less than 1cm are assumed as text elements in the algorithm. This results in presence of unwanted components in the final image.

Text Segmentation

The next step in the document layout analysis is the segmentation of text into text blocks that could be provided as input to the OCR. The following algorithms have been studied for this:

Recursive XY Cut algorithm

The recursive XY cut algorithm is used for obtaining text blocks from an image that does not contain any images from the original printed document. The XY cut algorithm works in the following way:

The bounding boxes of the image are calculated.
Next we calculate the horizontal and vertical projections of the image.
After calculating the projections, we then perform X cuts on all the valleys in the horizontal projections which have a value greater than the threshold th.
Next we perform Y cuts in between these X cuts at all the valleys in the vertical projections which have a value greater than the threshold tv.
We repeat the steps 3 and 4 until there are no further X or Y cuts possible in a region.

One of the problems with XY cut algorithm is that there is no method to find a threshold that will work for all the documents. Instead, a new threshold needs to be determined for each document and this cannot be done without manual intervention.
Another major issue with the recursive XY algorithm is the time complexity. The recursive XY cut algorithm requires a large time to complete execution. Despite these disadvantages, this algorithm successfully separates the text blocks provided that a manual threshold is provided.

RLSA

The Run-Length Smoothing Algorithm (RLSA) works on black & white scanned images of documents. It finds runs of white pixels and converts them into black pixels whenever they are less than a given threshold. The RLSA works in four steps:

In the first step, we perform horizontal smoothing. For this, we scan the image row-wise and then replace lengths of white pixels by black pixels if they are less than a threshold th.

In the second step, we perform vertical smoothing. For this, we scan the image column-wise and then replace lengths of white pixels by black pixels if they are less than a threshold tv.

Next, we perform logical ANDing of the images obtained from the first and second steps.

Then we perform horizontal smoothing on the image obtained from step 3 with a threshold ta.

RLSO

A simplified version of the RLSA, RLSO (Run-Length Smoothing with OR) works as follows:

In the first step, we perform horizontal smoothing. For this, we scan the image row-wise and then replace lengths of white pixels by black pixels if they are less than a threshold th.
In the second step, we perform vertical smoothing. For this, we scan the image column-wise and then replace lengths of white pixels by black pixels if they are less than a threshold tv.
Next we perform a logical OR operation on the images obtained from the first and second step.

The RLSA algorithm returns rectangular frames of documents with Manhattan Layouts. On the other hand, RLSO algorithm also works well with non-Manhattan layouts. The problem with both RLSA and RLSO is that the threshold for smoothing needs to be determined manually. Also the threshold required for each document image is different and it is almost impossible to be determined manually.

Conclusion

We have compared the above given algorithms for the document layout analysis. During our research we found that, while Bloomberg’s algorithm faces problems for images that contain sketches, CRLA faces problems for images that contain extremely small non-textual elements.
We also observed that the recursive XY Cut algorithm and RLSA both do not work on printed documents having non-Manhattan layouts. On the other hand, the RLSO algorithm gives comparatively better results for Manhattan as well as non-Manhattan layouts. However, all three algorithms mentioned above face the common problem of manual threshold determination which is document specific.

References

Syed Saqib Bukhari, Faisal Shafait and Thomas M. Bruel, “Improved Document Image Segmentation Algorithm using Multiresolution Morphology”

Jaekyu Ha and Robert M. Haralick, Ihsin T. Philips, “Recursive XY Cut using Bounding Boxes of Connected Components” , Third International Conference on Document Analysis and Recognition, ICDAR, 1995

Stefano Ferilli, Teresa M.A. Basile, Floriana Esposito, “A histogram-based Technique for Automatic Threshold Assessment in a Run Length Smoothing-based Algorithm”, ACM, 2010.

Hung-Ming Sun, “Enhanced Constrained Run-Length Algorithm for Complex Layout Document Processing”, International Journal of Applied Science and Engineering, 2006

 

What Will You Get?

We provide professional writing services to help you score straight A’s by submitting custom written assignments that mirror your guidelines.

Premium Quality

Get result-oriented writing and never worry about grades anymore. We follow the highest quality standards to make sure that you get perfect assignments.

Experienced Writers

Our writers have experience in dealing with papers of every educational level. You can surely rely on the expertise of our qualified professionals.

On-Time Delivery

Your deadline is our threshold for success and we take it very seriously. We make sure you receive your papers before your predefined time.

24/7 Customer Support

Someone from our customer support team is always here to respond to your questions. So, hit us up if you have got any ambiguity or concern.

Complete Confidentiality

Sit back and relax while we help you out with writing your papers. We have an ultimate policy for keeping your personal and order-related details a secret.

Authentic Sources

We assure you that your document will be thoroughly checked for plagiarism and grammatical errors as we use highly authentic and licit sources.

Moneyback Guarantee

Still reluctant about placing an order? Our 100% Moneyback Guarantee backs you up on rare occasions where you aren’t satisfied with the writing.

Order Tracking

You don’t have to wait for an update for hours; you can track the progress of your order any time you want. We share the status after each step.

image

Areas of Expertise

Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.

Areas of Expertise

Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.

image

Trusted Partner of 9650+ Students for Writing

From brainstorming your paper's outline to perfecting its grammar, we perform every step carefully to make your paper worthy of A grade.

Preferred Writer

Hire your preferred writer anytime. Simply specify if you want your preferred expert to write your paper and we’ll make that happen.

Grammar Check Report

Get an elaborate and authentic grammar check report with your work to have the grammar goodness sealed in your document.

One Page Summary

You can purchase this feature if you want our writers to sum up your paper in the form of a concise and well-articulated summary.

Plagiarism Report

You don’t have to worry about plagiarism anymore. Get a plagiarism report to certify the uniqueness of your work.

Free Features $66FREE

  • Most Qualified Writer $10FREE
  • Plagiarism Scan Report $10FREE
  • Unlimited Revisions $08FREE
  • Paper Formatting $05FREE
  • Cover Page $05FREE
  • Referencing & Bibliography $10FREE
  • Dedicated User Area $08FREE
  • 24/7 Order Tracking $05FREE
  • Periodic Email Alerts $05FREE
image

Our Services

Join us for the best experience while seeking writing assistance in your college life. A good grade is all you need to boost up your academic excellence and we are all about it.

  • On-time Delivery
  • 24/7 Order Tracking
  • Access to Authentic Sources
Academic Writing

We create perfect papers according to the guidelines.

Professional Editing

We seamlessly edit out errors from your papers.

Thorough Proofreading

We thoroughly read your final draft to identify errors.

image

Delegate Your Challenging Writing Tasks to Experienced Professionals

Work with ultimate peace of mind because we ensure that your academic work is our responsibility and your grades are a top concern for us!

Check Out Our Sample Work

Dedication. Quality. Commitment. Punctuality

Categories
All samples
Essay (any type)
Essay (any type)
The Value of a Nursing Degree
Undergrad. (yrs 3-4)
Nursing
2
View this sample

It May Not Be Much, but It’s Honest Work!

Here is what we have achieved so far. These numbers are evidence that we go the extra mile to make your college journey successful.

0+

Happy Clients

0+

Words Written This Week

0+

Ongoing Orders

0%

Customer Satisfaction Rate
image

Process as Fine as Brewed Coffee

We have the most intuitive and minimalistic process so that you can easily place an order. Just follow a few steps to unlock success.

See How We Helped 9000+ Students Achieve Success

image

We Analyze Your Problem and Offer Customized Writing

We understand your guidelines first before delivering any writing service. You can discuss your writing needs and we will have them evaluated by our dedicated team.

  • Clear elicitation of your requirements.
  • Customized writing as per your needs.

We Mirror Your Guidelines to Deliver Quality Services

We write your papers in a standardized way. We complete your work in such a way that it turns out to be a perfect description of your guidelines.

  • Proactive analysis of your writing.
  • Active communication to understand requirements.
image
image

We Handle Your Writing Tasks to Ensure Excellent Grades

We promise you excellent grades and academic excellence that you always longed for. Our writers stay in touch with you via email.

  • Thorough research and analysis for every order.
  • Deliverance of reliable writing service to improve your grades.
Place an Order Start Chat Now
image

Order your essay today and save 30% with the discount code Happy