I think there'll be the same issue as above in that the array with have to be either typedef'd as 2D or as 3D. Both can't be accommodated? I See the quick shift implementation overcomes using:
image = img_as_float(np.atleast_3d(image))
cdef cnp.ndarray[dtype=cnp.float_t, ndim=3, mode="c"] image_c = np.ascontiguousarray(image)
and pointers to the image data:
cdef cnp.float_t* image_p = <cnp.float_t*> image_c.data
Perhaps this is the way to go?