MATLAB: Drawing bounding box for the skew text regions bounding boxconvex hullImage Processing Toolboxskew I want to draw the bounding box for the skew text regions. Like the given Image. Best Answer 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. Related SolutionsMATLAB: Edit drawing bounding box See my image segmentation tutorial http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 where I find bright objects and get their bounding boxes. MATLAB: How to find the leftmost and rightmost white pixel in a binary image in Matlab Lots of ways. For example call bwconvhull() and then regionprops to get bounding box.binaryImage = bwconvhull(binaryImage, 'union');props = regionprops(binaryImage, 'BoundingBox');leftColumn = props.BoundingBox(1);topRow = props.BoundingBox(2);Or simply use find()[rows, columns] = find(binaryImage);leftColumn = min(columns);topRow = min(rows); Related QuestionHi, I need to get the X,Y coordinates of white pixels area. can anyone help me to do this,pleaseExtraction of rectangular blob from binary imageRearrange Binary regions based on centroidsCould anyone help me pleaseBounding Box largest rectangleHow to calculate Area ?
Best Answer