PCNN binary segment transform - functions moved to library