calcHist(&channels[i], 1, 0, Mat(), hist_before[i], 1, &256, 0);其中‘&256’报错,(用中文回答
时间: 2024-05-25 20:18:59 浏览: 8
images, channels, mask, histSize, ranges, accumulate=None)
The calcHist() function is used to calculate the histogram of an image. It takes the following parameters:
- images: a list of the images for which the histogram is to be calculated.
- channels: a list of the channels to be used for the histogram calculation.
- mask: an optional mask to be applied to the image.
- histSize: a list of the number of bins for each channel.
- ranges: a list of the range of values for each channel.
- accumulate: an optional flag to indicate whether the histogram should be accumulated or not.
The function returns a histogram for each channel specified in the channels parameter. The histogram is a one-dimensional array with length equal to the number of bins. The values in the array represent the number of pixels in the image that fall into each bin.