centercrop
-
Description: Performs center cropping on the input image.
-
Parameters:
- img (
np.ndarray
): The input image to be center cropped.
- img (
-
Returns:
- np.ndarray: The cropped image.
-
Example:
import docsaidkit as D
img = D.imread('lena.png')
img = D.imresize(img, [128, 256])
crop_img = D.centercrop(img)The green box indicates the center cropped area.