Local Otsu Filter Demo


Local Otsu Filter Demo is a binary program containing most of the concepts described in the Paper “Investigating the Power of Integral Histograms for Document Images, a Binarization Case Study”. The program contains also benchmarking extensions and all intermediary images can be dumped for preview.


This program is provided as a mean of demonstrating the exact performance of a specific published method works. Investigating the Power of Integral Histograms for Document Images, a Binarization Case Study If using it in any scientific context that is published please cite the article.


This binary is based on experimental code and could seriously corrupt your filesystem, specially if you dont have a good understanding of how the command line parameters work. You are advised to use it in a sand-boxed environment.


This program will run in a win32 command line environment or under wine in unix environments. All library dependencies are statically linked so it should rum under almost all win32 environments. The software was cross-compiled under the M cross environment


lof_demo.exe(command line win32 binary)



-h | –help t: boolean Print this help message. Default value: 0

-v | –verbose-level t: integer Verbocity level integer. 0: least verbose , 10: most verbose. . Default value: 0

-H | –height t: integer The window height. 0 means the minimal input image dimension.. Default value: 0

-w | –width t: integer The window width. Default value: 0

-b | –bitdepth t: integer The number of most significant that will be taken in to account. allowed values 8 to 2. Default value: 8

-r | –reduce t: integer How many times should the window be reduced by half. Default value: 5

-i | –input t: string list The input file name, a TIFF file, Of maximum 3MPixels. .

-s | –out-image-suffix t: string the suffix that will be appended to the input image to save the binary image. The .tiff at the ends should be omited as it will be added automatically. Default value: out

-t | –tmp t: string The directory where output files will be stored. It must end in / and it has to exist. If NA is passed no output images will saved. Default value: NA

-o | –output t: string The path on which the benchmark will be writen. The file will be opened for append. Default value: /tmp/report.txt

-f | –filter t: string list The filter operator one or more of [median,otsu].

Example usage assuming a graylevel image graytext.tif:

wine lof_demo.exe -f otsu -i graytext.tif