Image scaling

Image scaling


I'm trying to scale the pixel intensities of an image between [0 - maxValue]. But I experience tremendous rounding error with the operation. I'm attaching the code snippet. I would appreciate if anyone can tell me if there is something I can do about it.

Ipp8u maxValue, minValue;
ippiMin_8u_C1R(inputImageUSC, imgSize.width, imgSize, &minValue);

ippiSubC_8u_C1RSfs(inputImageUSC, imgSize.width, minValue, outputImageUSC,imgSize.width, imgSize, 0);

ippiMax_8u_C1R(inputImageUSC, imgSize.width, imgSize, &maxValue);

ippiDivC_8u_C1IRSfs(maxValue, outputImageUSC, imgSize.width, imgSize, 0);

maxValue = 255;
ippiMulC_8u_C1IRSfs(maxValue, outputImageUSC, imgSize.width, imgSize, 0);
Thanks very much,

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You may contact us via Intel Premier Support for issue resolution, please submit a detailed report with your test case, so we can look into it.


Madhu, can you call ippiScale function?

I done with it

Leave a Comment

Please sign in to add a comment. Not a member? Join today