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

Image Processing with a negative stride?

yaddayadda22
Beginner
273 Views
Hi,

I've come across an urgent issue for a client while pulling images from a webcam and doing some processing on them. I call numerous image processing functions, like ippiConvert, Rgb2Gray, Norm's, etc. What I found is that jpg's read from disk in my app using vc++ come out as top-down images, with a positive stride. Processing images from disk works great.

However, images pulled from the webcam come through as a negative stride, or bottom-up images. Can the performance primitive functions handle this? I'm guessing it should work fine, as long as the stride matches the image dimensions and color depth...

I'm finding the output of my processing remains unchanged despite changing input images from the webcam.

Any comments or suggestions would be appreciated.

Thanks
Matt
0 Kudos
1 Reply
Intel_C_Intel
Employee
273 Views
Hi Matt:

I think negative strides are not allowed, so imo your best bet is to use the inplace mirror functions before working with the images. Alternatively, you can delay the flip until rendering/saving (e.g., blit, GL, jpeg write, etc) without overhead. Keeping track of flip-noflip versions requires diligence and might complicate things, so using the mirror operation might be faster and less error prone.

Tilman.
0 Kudos
Reply