Skip to content

Commit

Permalink
binarize: allow calling binarize from python code.
Browse files Browse the repository at this point in the history
There's not much of a reason to do this, and the API makes no effort
not to be clunky, but there's also not really a reason to prevent it.
  • Loading branch information
torque committed Jun 28, 2021
1 parent c4c72ac commit d26a4fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deqr/binarize.pxd
Expand Up @@ -14,4 +14,4 @@

ctypedef unsigned char uint8

cdef void binarize(uint8[::1] image, int width, int height, bint invert) nogil
cpdef void binarize(uint8[::1] image, int width, int height, bint invert) nogil
2 changes: 1 addition & 1 deletion deqr/binarize.pyx
Expand Up @@ -16,6 +16,6 @@ from . cimport binarize as bnz

cdef extern void qr_binarize(unsigned char *_img, int _width, int _height, int invert) nogil

cdef void binarize(bnz.uint8[::1] image, int width, int height, bint invert) nogil:
cpdef void binarize(bnz.uint8[::1] image, int width, int height, bint invert) nogil:
# this is in-place manipulation
qr_binarize(&image[0], width, height, invert)

0 comments on commit d26a4fe

Please sign in to comment.