http://didawiki.cli.di.unipi.it/doku.php/magistraleinformaticanetworking/spm/start
2.3 Histogram Thresholding
This module performs histogram thresholding on an image. Given an integer image I and a target percentage p, it constructs a binary image B such that Bi,j is set if no more than p percent of the pixels in I are brighter than Ii,j . The input data are therefore the matrix I and the percentage p. The thresholding must be applied to a stream of input images.
Please check out the file SPM1718_project_LanpeiLi.pdf for all the details
Thanks.