Calculates the grayscale histogram of an image. If the input is a color image, its luminance histogram will be calculated.
- Input image.
- A coordinate frame for the rectangle in the world coordinate system.
- The size of the rectangle in which the histogram is calculated. If size is undefined (either width or height is NAN), the histogram is computed from the whole image. Otherwise the region of interest is determined by size and frame.
- Grayscale histogram vector. The length of the vector depends on the dynamic scale of the input image, but is always at least 256.