added possibility to count black pixel and exclude them from Histogram computation