Replaced cpu code with ArrayFire implementation for Otsu