Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Globally change np to cnp if cimported
- Loading branch information
Showing
30 changed files
with
953 additions
and
900 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
cimport numpy as np | ||
cimport numpy as cnp | ||
|
||
|
||
ctypedef cnp.uint16_t dtype_t | ||
|
||
|
||
cdef int int_max(int a, int b) | ||
cdef int int_min(int a, int b) | ||
|
||
|
||
# 16-bit core kernel receives extra information about data bitdepth | ||
cdef void _core16(np.uint16_t kernel(Py_ssize_t *, float, np.uint16_t, | ||
Py_ssize_t, Py_ssize_t, Py_ssize_t, float, | ||
float, Py_ssize_t, Py_ssize_t), | ||
np.ndarray[np.uint16_t, ndim=2] image, | ||
np.ndarray[np.uint8_t, ndim=2] selem, | ||
np.ndarray[np.uint8_t, ndim=2] mask, | ||
np.ndarray[np.uint16_t, ndim=2] out, | ||
cdef void _core16(dtype_t kernel(Py_ssize_t *, float, dtype_t, | ||
Py_ssize_t, Py_ssize_t, Py_ssize_t, float, | ||
float, Py_ssize_t, Py_ssize_t), | ||
cnp.ndarray[dtype_t, ndim=2] image, | ||
cnp.ndarray[cnp.uint8_t, ndim=2] selem, | ||
cnp.ndarray[cnp.uint8_t, ndim=2] mask, | ||
cnp.ndarray[dtype_t, ndim=2] out, | ||
char shift_x, char shift_y, Py_ssize_t bitdepth, | ||
float p0, float p1, Py_ssize_t s0, Py_ssize_t s1) except * |
Oops, something went wrong.