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

image statistics

jeff_macdonald
Beginner
409 Views
Hello,

I am writing a background subtraction algorithm. I have 8u_C3 images as input, and I have the need to keep track of the square of these images. Thus I need to keep track of values that range from 0..65536. Should I be using 16u_C3 images to store the square of the image. I could convert the original image to 16u_C3 and then square it. As I understand, 16u_C3 is actually a 5-5-6 bit image, so I do not think that is what I need. I also need all the precision and do not want to use integer scaling. I also would like to avoid going to float images, and sticking with 16 bit per channel images. Is there even such a capability in IPP. If not, this type of functionality would be useful for computer vision.

Thanks.
0 Kudos
4 Replies
Vladimir_Dudnik
Employee
409 Views
Hi,
16u_C3 is not 5-6-5 format, it is 16-16-16 format, so probably you have necessary precision, right?
Regards,
Vladimir
0 Kudos
jpritts
Beginner
409 Views
Hi, I have a related question that is relevant to background subtraction. There is a lot of functionality available for 16s_C3, but not 16u_C3. Some examples include MulC, AddC. Fot MulC and AddC, what scenarios can you use 16s_C3 on16u_C3 data and expect correct results?
A second issue is that AddWeighted only works on one channel images. Is it possible to treat a 3 channel image as a 1 channel image? This would require constructing a mask that is 3x as large I think.
Thank you!
0 Kudos
Vladimir_Dudnik
Employee
409 Views
Hi,
you are right, there is some lack of 16u data support in ippIP component. And this is a resource question. Surely we can implement everything in single product, but of course it takes time and each new feature of course is a subject of prioritization. In this particular case, we already have similar functionality in ippSP component, so you can process two-dimensional images on row-by-row basis. And because of that it is in low priority to spend time for developemnt 2-D versions of these functions in ippIP component.
I think you are right, you should be able to use AddWeighted function on C3 image with using mask.
Regards,
Vladimir
0 Kudos
Intel_C_Intel
Employee
409 Views

Hi,

You can use ippiConvert_8u16u and ippiSqr_16u_C3 to get pixel squares. 3-channel image can be treated as 1-channel image of the same depth, roi.width should be tripled in this case.

AK

0 Kudos
Reply