- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 );Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I used wrong parameters. Sorry.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page