Binarize
Convert images to black and white.
Process:
- Convert the image to grayscale.
- Remove low frequencies (e.g. shadows)
- Apply threshold with OTSU's method
Smart Black & White
Input | Output |
---|---|
![]() | ![]() |
$ ./flatcv imgs/page.png bw_smart imgs/page_bw_smart.png
Loaded image: 384x256 with 1 channels
Executing pipeline with 1 operations:
Applying operation: bw_smart
→ Completed in \d+.\d+ ms \(output: 384x256\) (regex)
Final output dimensions: 384x256
Successfully saved processed image to 'imgs/page_bw_smart.png'
$ git diff --quiet imgs/page_bw_smart.png
Smart and Smooth (Anti-Aliased) Black & White
Input | Output |
---|---|
![]() | ![]() |
$ ./flatcv imgs/page.png bw_smooth imgs/page_bw_smooth.png
Loaded image: 384x256 with 1 channels
Executing pipeline with 1 operations:
Applying operation: bw_smooth
→ Completed in \d+.\d+ ms \(output: 384x256\) (regex)
Final output dimensions: 384x256
Successfully saved processed image to 'imgs/page_bw_smooth.png'
$ git diff --quiet imgs/page_bw_smooth.png