How to find the margin in an image of the text document?
6 views (last 30 days)
Show older comments
Poornima Gokhale
on 17 Dec 2015
Commented: Image Analyst
on 5 Sep 2021
I have a sample of handwriting. And I want to find the left, right and top margin[i.e., the space between the starting of the writing and the edge of the paper to the left is the left margin]. Please help me with the code.
0 Comments
Accepted Answer
Image Analyst
on 17 Dec 2015
Did you try to threshold and then use regionprops(L, 'BoundingBox')?
If the shadows on the paper are a problem then call edge() first and then get the bounding box from the edge image.
13 Comments
Image Analyst
on 5 Sep 2021
Then I still don't know what you mean by "without converting it into rgb." when it's already RGB. What does "margin" mean? You forgot to post an image where you show the wounds and the margin. Please do so in a new thread and outline them in red or something.
I suggest you post your two images in a new thread, your own, rather than here in @Poornima Gokhale's discussion.
Image Analyst
on 5 Sep 2021
I don't want to answer your question in @Poornima Gokhale's discussion. So like I said, start your own question somewhere else (NOT here) and I'll answer there. @Poornima Gokhale probably doesn't care about your problem.
More Answers (0)
See Also
Categories
Find more on Image Data Workflows in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!