Neural hardware for image processing