Accounted for potential nans being created during the otsu calculation. Fixed triangle calc for integer overflow, and now correctly returns the calculated threshold rather than the index.
Accounted for potential nans being created during the otsu calculation. Fixed triangle calc for integer overflow, and now correctly returns the calculated threshold rather than the index.

sixy6e/image-processing