- Threshold: binaryImage = grayImage < 128;
- call imclose to connect nearby letters: binaryImage = imclose(binaryImage, true(7));
- call regionprops and ask for BoundingBox measurements = regionprops(binaryImage, 'BoundingBox');
- call rectangle() or plot() to draw the box.
How to enclose a line using regionprops and rectangle function
3 次查看(过去 30 天)
显示 更早的评论
Dear Image analyst,
I am having two english text lines. I want to enclose individual lines in a rectangle with red color. Can you tell me how can i do this using regionprops and rectangle function.
Waiting for your reply
Suvendra
0 个评论
回答(1 个)
Image Analyst
2014-1-8
A simplistic way (probably too simplistic):
Give it a shot. Come back if you can't figure out that algorithm (though I've given 3 out of 4 lines of it so it should be easy to finish the rest of it).
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 GPU Computing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!