Function amdinfer::pre_post::centerCrop

Function Documentation

inline cv::Mat amdinfer::pre_post::centerCrop(cv::Mat img, int height, int width)

Image preprocessing helper. Crops the input img from center to a specific dimension specified.

Parameters
  • img – Image which needs to be cropped

  • height – height of the output image

  • width – width of the output image

Returns

cv::Mat: Image cropped to required shape