Adding code to segment 16-bit images. Changes to adaptive binarization for speedup. Note:Lot of other code breaks with change to 16bit.