- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using the functionippiResize to increase the image size in each direction by a factor two. The interpolation method is linear interpolation.
Because the resizing factor is "2", I would expect that the pixel value f_in( x_in , y_in ) in the input image is equal tothe pixelvaluef_out ( 2*x_in , 2* y_in ) in the output image. E.g. something like that:
Input846
Output86456
Unfortunately it is not exactly the same. Because the error is getting worse at the end of the image, Isuspect that the sampling rate is not exactly "2". I attached an example (raw image, 16bit signed).
Here is my code. MaybeI am doing somthing wrong
// resize factors
int InWidth=500;
int InHeight=500;
int OutWidth=1000;
int OutHeight=1000;
double fx = 2.0f;
double fy = 2.0f;
IppiSize s = {InWidth, InHeight};
IppiRect sr = {0,0, InWidth, InHeight};
IppiSize d = {OutWidth, OutHeight};
// resize
IppStatus res=
ippiResize_16u_C1R( pInput,
s,
InWidth*sizeof( short ),
sr,
pOutput,
OutWidth*sizeof( short ),
d,
fx,
fy,
IPPI_INTER_LINEAR);
Thanks
Daniel
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
you need to replace call of ippiResize with call of new function, ippiResizeSqrPixel
Regards,
Vladimir
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page