Home Unnecessary pixels from binary image?
Reply: 0

Unnecessary pixels from binary image?

user539
1#
user539 Published in April 26, 2018, 5:28 am

Can someone help me remove these unnecessary pixels on my binary image? I already tried setting all values to 0 and 255 only, yet it's still the same.

Instead of white, I used gray value for the picture so that the other unnecessary pixels will be more visible.

Here is just a simple code snippet on the processing of the image..

rgb = cv2.imread('test.jpg',0)
ret,otsu = cv2.threshold(rgb,220,255,cv2.THRESH_BINARY)
cv2.imwrite("output.jpg",otsu)

test.jpg output.jpg

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.316389 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO