ImageContainer.crop_center#
- ImageContainer.crop_center(y, x, radius, **kwargs)[source]#
Extract a circular crop.
The extracted crop will have shape
(radius[0] * 2 + 1, radius[1] * 2 + 1).- Parameters:
- y
int|float Coordinate of the crop along the
heightdimension in the pixel space. If afloat, it specifies the relative position and must be in [0, 1].- x
int|float Coordinate of the crop along the
widthdimension in the pixel space. If afloat, it specifies the relative position and must be in [0, 1].- radius
int|float|tuple[int|float,int|float] Radius along the
heightandwidthdimensions, respectively.- kwargs
Any Keyword arguments for
crop_corner().
- y
- Returns:
ImageContainer– The cropped image of sizesize * scale.