Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Image scaling

madhu_lsu
Beginner
805 Views
Hi,
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,
Madhu.
0 Kudos
3 Replies
Ying_S_Intel
Employee
805 Views
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.

Thanks,
Ying
0 Kudos
borix
Beginner
805 Views
Madhu, can you call ippiScale function?
0 Kudos
ids-removed222
Beginner
805 Views
MulC
I done with it
0 Kudos
Reply