Community
cancel
Showing results for 
Search instead for 
Did you mean: 
shyaki2007
Beginner
72 Views

ippiResize_8u_C1R problem?

I tried using ippiResize_8u_C1R to resize a 16x18 image to a 4x6 image. The source image has 9 lines of 0x0a and 9 lines of 0x64. Surprisingly, the resized image contains all 0x0a. Did I use the function properly? Thanks.

Ipp8u x[16*18], y[4*6];

IppiSize srcsz={16,18}, dstsz = {4,6},dstroi={4,6};

int srcstep = 16, dststep = 4;

IppiRect srcroi={1,1,16,18};

//ini

int

i,j;

for (i = 0;i<9;i++)

{

for (j=0;j<srcsz.width;j++)

{

x[i*srcsz.width+j] = 0x0a;

}

}

for (i = 9;i < srcsz.height;i++)

{

for (j=0;j<srcsz.width;j++)

{

x[i*srcsz.width+j] = 0x64;

}

}

ippiResize_8u_C1R

( x, srcsz, srcstep, srcroi, y, dststep, dstroi, (double)srcroi.width/dstsz.width ,(double)srcroi.height/dstsz.height, IPPI_INTER_LINEAR );

0 Kudos
1 Reply
rxie1
Beginner
72 Views

I used wrong parameters. Sorry.
Reply