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

Stride value for RGB Planar image

sribug
Beginner
553 Views
Hi,
I need to use ippiCopy_32f_C3P3R to convert an RGB image pixel order image to planar. I have to use this planar image and perform certain operations on each of the color planes.
But I am not sure what value of stride for the RGB Planar image to be given in ippiCopy_32f_C3P3.

This is the info I have:
1. I have a RGB(pixel order) image pointed by pSrc of size (width*height)
2. I allocated memory for RGB Planar image as follows:

for (int i = 0; i < 3; i++)

{

pImageBuff = ippiMalloc_32f_C1(width, height, &stride);

}

should the width and height be same as the RGB(pixel order) image here?

3. I use the ippi Copy function convert from c3 to p3 with the strid evalue for RGB planar taken from step2.

Can anyone please let me know if I am going wrong anywhere.


0 Kudos
1 Reply
Gennady_F_Intel
Moderator
553 Views

yes, as it seems to me, all stuff you are doing is correct.

One note - please pay attention thatstridewill not be exactly equalwidth*heightbecause of

ippiMalloc (width,height,StepBytes)allocates a memory block aligned to a 32-byte boundary.

therefore each stride == stepBytes *height

--Gennady

0 Kudos
Reply