@@ -3,6 +3,9 @@ import numpy as np
def crop_or_pad(image, x_min, y_min, x_max, y_max, border_value=0):
"""
+ See Also:
+ translate_image
+
References:
tf.image.resize_image_with_crop_or_pad
@@ -15,6 +15,9 @@ def translate_image(image, x_shift, y_shift, border_value=0):
Returns:
ndarray: The translated image.
+ crop_or_pad
assert image.ndim in [2, 3]
assert isinstance(x_shift, int)