Community
cancel
Showing results for 
Search instead for 
Did you mean: 
81 Views

two questions about image resize ippiResizeSqrPixel

1-
neighbourhood pixels and interpolation models:
some interpolation models require neighbourhood pixels of source pixels (work like filters). what is the request ofippiResizeSqrPixel() for this neighbourhood pixels? does the ipp need that neighbourhood pixels exist like for filter operation or can handle that?
2-
resized image and interpolation models:
the functionippiGetResizeRect() takes interpolation as a parameter. does the result can be actually effected by the interpolation model? documentation says:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////

all geometric transform functions (except those which perform inverse warping operations) handle ROIs with the following sequence of operations:

  • transform the rectangular ROI of the source image to quadrangle in the destination image;
  • find the intersection of this quadrangle and the rectangular ROI of the destination image;
  • update the destination image in the intersection area.
//////////////////////////////////////////////////////////////////////////////////////////////////////
so the resized image in destination should correspond to the intersection of source ROI via the transformation
x' = xFactor * x + xShift
y' = yFactor * y + yShift
and the destination ROI.
Better said, i expect that a pixel in destination is in the resized image iff:
- is in destination ROI
- is counterimage is in source ROI
so i cannot see why this can be effected by interpolation model.
What am I doing wrong?
Thanks in advance

0 Kudos
3 Replies
Chao_Y_Intel
Employee
81 Views


Hello,

ippiResizeSqrPixel does not look the filter function. For filter function, user need to handle the the border extension. ippiResizeSqrPixel will consider the border internally, and users does not need to extend these data.

I am checking with the function owner on why it needs interpolation in ippiGetResizeRect function, and hopefully provide more information here.

Thanks,
Chao

Yuri_Tikhomirov__Int
New Contributor I
81 Views

Hello,

The parameter interpolation can affect the size of destination rectangle because there are edge smoothing features in resize functionality - IPPI_SMOOTH_EDGE and IPPI_SUBPIXEL_EDGE in addition to one of the general interpolating mode.
For example you can see the difference with interpolation == IPPI_INTER_LINEAR and with interpolation ==(IPPI_INTER_LINEAR | IPPI_SUBPIXEL_EDGE)

Thanks,
Beg
81 Views

Thanks for the support
Reply