Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 1.05 KB

File metadata and controls

13 lines (10 loc) · 1.05 KB

Charecter Segmentation

Character/ image segmentation code to separate characters inside a circle from the sample images. This doesn't require the use of training data.
sample input:
1

sample output:
result1

The code provided collects all the sample images and stitches them together for result.
A minimum satuaration of 128 set first, then contours are made to detect the circular region and everything except that region is masked out.
Then Kmeans segmentation algorithm is run over this region, which is basically assigning same colors to region that are close enough and have same pixel value.
Assuming that the background circle has more area than the inside character, then number of pixel of each color is counted and everything except the least appearing values are masked out. Which is our output image extracted from the circular region.