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

Convert float image to integer image

danielwang1971
Beginner
511 Views

Hello,

I would like to know if there is a function convert float image to integer image in IPP.

Best regards.

0 Kudos
4 Replies
danielwang1971
Beginner
511 Views

Also, I would like to know if there is a function convert from integer image to float image to in IPP.

Best Regards,

0 Kudos
Vladimir_Dudnik
Employee
511 Views

Hello,

I'd encourage you (and highly recommend) to start from looking product documentation where you can find description of what functionality is available here and how to use it.Alternatively, simple grep through IPP header filesalso mayhelp...

IPPAPI ( IppStatus, ippiConvert_32f8u_C1R,
( const Ipp32f* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize, IppRoundMode roundMode ))
IPPAPI ( IppStatus, ippiConvert_32f8u_C3R,
( const Ipp32f* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize, IppRoundMode roundMode ))
IPPAPI ( IppStatus, ippiConvert_32f8u_AC4R,
( const Ipp32f* pSrc, int srcStep, Ipp8u* pDst, int dstStep,
IppiSize roiSize, IppRoundMode roundMode ))
IPPAPI ( IppStatus, ippiConvert_32f16s_C1R,
( const Ipp32f* pSrc, int srcStep, Ipp16s* pDst, int dstStep,
IppiSize roiSize, IppRoundMode roundMode ))
IPPAPI ( IppStatus, ippiConvert_32f16s_C3R,
( const Ipp32f* pSrc, int srcStep, Ipp16s* pDst, int dstStep,
IppiSize roiSize, IppRoundMode roundMode ))
IPPAPI ( IppStatus, ippiConvert_32f16s_AC4R,
( const Ipp32f* pSrc, int srcStep, Ipp16s* pDst, int dstStep,
IppiSize roiSize, IppRoundMode roundMode ))
IPPAPI ( IppStatus, ippiConvert_32f16s_C4R,
( const Ipp32f* pSrc, int srcStep, Ipp16s* pDst, int dstStep,
IppiSize roiSize, IppRoundMode roundMode ))

Regards,
Vladimir

0 Kudos
danielwang1971
Beginner
511 Views

Hello Vladimir,

Thank you your help.

My other question is that I have a Integer image andI want to divide a constant so that to get a float imageinrange (0 1).

But the function DivC don't support integer to float. Can you give me a suggestion?

Best regards,

Daniel

Vladimir Dudnik

0 Kudos
Vladimir_Dudnik
Employee
511 Views

there are two approaches
1. you can convert data to Ipp32f and do calculation in floating point
2. you can use fixed point arithmetic. IPP integer functions (ippiDivC for example) do provide scaling (read more about that in IPP documentation).

Vladimir

0 Kudos
Reply