region extraction from a text document Image

I have a image(binary image already extracted from Input Image) in which I have to extract the paragraph for example from"Apart from my to....from me"this paragraph I want to extract and similarly "during the war to...German reparation" how should I do I have extracted the body from input Image
Page_body.png

2 commentaires

praveen rai
praveen rai le 7 Mar 2019
any suggestion anyone want to give or anything addtional should I add so that anyone can help me please tell me
KSSV
KSSV le 7 Mar 2019
Try ocr...

Connectez-vous pour commenter.

 Réponse acceptée

Image Analyst
Image Analyst le 7 Mar 2019

0 votes

You need to scan your document with something like stdfilt() with the proper size window to identify blocks of text. It will have high values, whereas smooth areas like photos and white space will have low values, Then you can threshold the stdfilt image and use bwareaopen() to look for appropriate sized areas or use regionprops and look for rectangular shaped areas.

1 commentaire

It will get you the entire block of text. If you want to find paragraphs within that, it looks like you can scan down the image, getting the block sum as a function of column number. The columns that start paragraphs will have a lower sum since there are no pixels there.

Connectez-vous pour commenter.

Plus de réponses (1)

KSSV
KSSV le 7 Mar 2019
Modifié(e) : KSSV le 7 Mar 2019
I = imread('Page_body.png');
results = ocr(I);
str = results.Text

5 commentaires

praveen rai
praveen rai le 7 Mar 2019
its giving error on line "str= results.Txt(saying no appropriate method)
basically I want bounding box on those two paragraph in that image
Typo error...it should be
str = results.Text
Edited the code.
praveen rai
praveen rai le 7 Mar 2019
sorry I typed here wrong but i copy your code and paste as it is so error is giving my matlab
KSSV
KSSV le 7 Mar 2019
i have dited thw code....try again..
praveen rai
praveen rai le 8 Mar 2019
ya thnx but what u sent I dont want that

Connectez-vous pour commenter.

Catégories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by