How to thin the image so as to make the thickness of the image to one pixel wide?

85 views (last 30 days)
Meghashree G
Meghashree G on 17 Feb 2016
Commented: Vijesh Soorya Rao on 22 Aug 2018
Hello,i have an image and i want to thin that word image so as to make the thickness of each word to one-pixel wide to make the stroke width uniform.Please help me.

Answers (2)

Image Analyst
Image Analyst on 17 Feb 2016
Try this
binaryImage = grayImage < 128;
% Remove small blobs;
binaryImage = bwareaopen(binaryImage, 500);
% Skeletonize
skeletonImage = bwmorph(binaryImage, 'skel', inf);
Make sure your image is actually gray scale, not color.
  7 Comments

Sign in to comment.


Walter Roberson
Walter Roberson on 17 Feb 2016
bwareafilt to remove the speckles. bwmorph() to skeletonize.
  1 Comment
Meghashree G
Meghashree G on 17 Feb 2016
Sorry sir..I dint get you..how do i make the image thickness one pixel wide??please help me with the code.Thank you

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!