mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-12 12:30:16 +08:00
unwrap: Change 2D wrapper code from float to double.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
cdef extern void unwrap2D(float* wrapped_image,
|
||||
float* unwrapped_image,
|
||||
cdef extern void unwrap2D(double* wrapped_image,
|
||||
double* unwrapped_image,
|
||||
unsigned char* input_mask,
|
||||
int image_width, int image_height,
|
||||
int wrap_around_x, int wrap_around_y)
|
||||
|
||||
def unwrap_2d(float[:, ::1] image,
|
||||
def unwrap_2d(double[:, ::1] image,
|
||||
unsigned char[:, ::1] mask,
|
||||
float[:, ::1] unwrapped_image,
|
||||
double[:, ::1] unwrapped_image,
|
||||
wrap_around):
|
||||
unwrap2D(&image[0, 0],
|
||||
&unwrapped_image[0, 0],
|
||||
|
||||
@@ -92,6 +92,8 @@ def unwrap_phase(image, wrap_around=False):
|
||||
if image.ndim == 1:
|
||||
unwrap_1d(image_not_masked, image_unwrapped)
|
||||
elif image.ndim == 2:
|
||||
image_not_masked = np.asarray(image, dtype=np.float64, order='C')
|
||||
image_unwrapped = np.empty_like(image, dtype=np.float64, order='C')
|
||||
unwrap_2d(image_not_masked, mask, image_unwrapped,
|
||||
wrap_around)
|
||||
elif image.ndim == 3:
|
||||
|
||||
Reference in New Issue
Block a user