MPSImageHistogramEqualization throws assertion that offset must be < [buffer length]
问题 I'm trying to do histogram equalization using MPSImageHistogramEqualization on iOS but it ends up throwin an assertion I do not understand. Here is my code: // Calculate Histogram var histogramInfo = MPSImageHistogramInfo( numberOfHistogramEntries: 256, histogramForAlpha: false, minPixelValue: vector_float4(0,0,0,0), maxPixelValue: vector_float4(1,1,1,1)) let calculation = MPSImageHistogram(device: self.mtlDevice, histogramInfo: &histogramInfo) let bufferLength = calculation.histogramSize