Table Of Contents
Table Of Contents

fixed_crop

mxnet.image.fixed_crop(src, x0, y0, w, h, size=None, interp=2)[source]

Crop src at fixed location, and (optionally) resize it to size.

Parameters:
  • src (NDArray) – Input image
  • x0 (int) – Left boundary of the cropping area
  • y0 (int) – Top boundary of the cropping area
  • w (int) – Width of the cropping area
  • h (int) – Height of the cropping area
  • size (tuple of (w, h)) – Optional, resize to new size after cropping
  • interp (int, optional, default=2) – Interpolation method. See resize_short for details.
Returns:

An NDArray containing the cropped image.

Return type:

NDArray