call image processing function
use arrays instead of unboxed vectors for histogram