1 min readNov 7, 2018
you can check the above git link
You set a predefined value say 5, When we moving over each row of the image, if you encounter adjacent white pixels(255’s) less than the predefined value(5). We will turn them into black pixels(0's).
Ex: input — 0 255 255 255 255 255 0 255 255 0 0
output — 0 255 255 255 255 255 0 0 0 0 0