Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.

IPL::ComputeHisto for signed images

dario_ramos
Beginner
617 Views

Hi guys,

I'm trying to use IPL's (version 2.5) ComputeHisto function for a signed image. At first, I got a "key < 0" error. I solved it passing IPL_DEPTH_16S to iplCreateImageHeader (the image is 16 bits signed). But now I get this:

(srcImage->depth & IPL_DEPTH_SIGN) || (srcImage->depth == IPL_DEPTH_32F)

If I understood right, this means IPL can't compute a histogram for signed images... Is this really true? If it is, could anyone suggest an alternative?

0 Kudos
2 Replies
dario_ramos
Beginner
617 Views
RTFM! In the IPL Reference, Appendix A, Table A-9, it says that ComputeHisto only supports 1u, 8u, and 16u. So I'll have to implement this myself...
0 Kudos
renegr
New Contributor I
617 Views
Where's the problem? You can use also the unsigned histogram function and interpret the lower half as the positive values, the upper half as the negative ones (1->1; 2->2; ...; 32767->32767; 65535->-1; 65534->-2 ...)
0 Kudos
Reply