Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It basically runs SWT on the image, and creates a 3d Lab histogram of the colors the SWT marked as text. Then it does a morphological dilation of 10 pixels and subtracts the original mask to get the colors of the pixels that represent the background.

Then it just binarizes the image by whether the internal histogram is larger than the corresponding value of the color on the external histogram.

It's a strategy that works quite well on machine-printed text, but probably less effective than existing strategies when it comes to scans or photographs.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: