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

Best way to filter 16u using 16s function

Thomas_Jensen1
Beginner
518 Views
(Ipp 5.0)
I need to filter a 16u grayscale pixel buffer.
I want to use ippiFilter_16s_C1R.
Because of the signed/unsigned problem, the pixels are wrapping.
What would be the best way to do this?
Thomas
0 Kudos
3 Replies
Intel_C_Intel
Employee
518 Views

You could subtract 0x8000 from pixel values and than filter the image with all IPP 16s filters

If filter coeffs are normalized (sum==(1^-scaleFactor)) after filtering you could add back 0x8000

Thanks,

Alexander

0 Kudos
Thomas_Jensen1
Beginner
518 Views

Ok, I understand.

How does Intel think about 16 bit grayscale pixels generally? Is the current technical design that it is best to work with 16s? My app is using 16u for grayscale pixels. Why would 16s be better than 16u?

Or, should I keep my 16 bit pixels as 16s throughout my app?

I perform LUT (to 24bpp), filters, zoom, jpeg, bmp.

Thomas

0 Kudos
Intel_C_Intel
Employee
518 Views

Hi,

One problem is that 16u data are non negative. Many filters (es Sobel, Scharr etc) can produce negative result so the output can be either 16s scaled or 32s.

Another thing is "native" 16u filters (rather with 16s scaled output, or with 16u output for the kernel without negative elements). Now IPP does not have such filters. You could submit a feature request for such filters to Intel premier support, we had no such request before.

Alexander

0 Kudos
Reply