How to find the margin in an image of the text document?

6 次查看(过去 30 天)
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.

采纳的回答

Image Analyst
Image Analyst 2015-12-17
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 个评论
Image Analyst
Image Analyst 2021-9-5
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
Image Analyst 2021-9-5
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by