UsingippiHistogramRange_8u_C1R, I've found thatippiHistogramRange_8u_C1R slightly corrupts the input buffer (in manual it'sconst Ipp* pSrc). The corruption does not effect the returned histogram. Given a grayscale image, I'm using a binary mask to segment out the part of the image and compute the histogram. In the computation, the histogram vector has 128 elements, and there are 129 histogram levels, which is an array [1 : 2 : 255 256]. The input image for theippiHistogramRange_8u_C1R is 240 (height) by 352 (width), all pixels are ZERO's except masked pixels (grayscale values from 0 to 255). Displaying the input image before and after calling ippiHistogramRange shows the difference of few pixels, which must be ZERO's after executing ippiHistogramRange. You should see the corruption, if you call ippiHistogramRange in a "for" loop to compute histogram for each blob, extracted from the same image.