フィルターのクリア

Drawing bounding box for the skew text regions

2 ビュー (過去 30 日間)
Y.L.K KHUMAN
Y.L.K KHUMAN 2017 年 12 月 4 日
回答済み: Image Analyst 2017 年 12 月 4 日
I want to draw the bounding box for the skew text regions. Like the given Image.

採用された回答

Image Analyst
Image Analyst 2017 年 12 月 4 日
Use bwconvhull() and regionprops()
binaryImage = grayImage < 128; % Threshold.
joinedBlobs = bwconvhull(binaryImage, 'union'); % Get convex hull of all blobs.
props = regionprops(joinedBlobs, 'BoundingBox'); % Find bounding box.
boundingBox = props.BoundingBox; % Pull from field of structure into 1x4 vector.
You'll have to get rid of that outer black box first though so that you have ONLY the letters and not some frame or boundary.
To determine angle of skew, you might look at the radon transform. Demo attached.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by