Threshold methods - ignore white

Hi,

I am using scikit-image threshold algorithms (yen, isodata, otsu…) in a high throughput system but sometimes the algorithm fail. I tried to threshold the problematic images with ImageJ where I can choose an “Ignore white pixels” option and then this gave my expected results (without the option, same results as with scikit-image). Is there a possibility to add this step in Python? I am not exactly sure what means to ignore those pixels

Many thanks in advance

Found an old post in a mailing list: https://mail.python.org/pipermail//scikit-image/2014-September/003547.html

skimage.filter.threshold_otsu(image[image != 0], nbins=256)

Thanks a lot, works like charm!