@ahojnnes : I understand the need of inline function here, but in this specific case it would become less readable(messy / out of flow?) with so many(11 in all) input arguments : 

`cdef inline void _check_consecutive(double[:, ::1] image, int i, int j, double current_pixel, char[:] bins, char check_state, char other_state, int n, double corner_response, int[:] rp, int[:] cp):`