- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All examples for ippiResizeSqrPixel contain srcROI started in point (0,0) like below
For arbitrary start point (x, y) function returns value ippStsNoOperation, to avoid this I use next code
Intel IPP - 6.0.2.074
Core 2 Duo T9300
Windows Vista SP1
Visual Studio 2005
[cpp]Ipp8u* srcData;
IppiRect srcROI = {0, 0, width, height};[/cpp]
For arbitrary start point (x, y) function returns value ippStsNoOperation, to avoid this I use next code
[cpp]IppiRect srcROI = {x, y, width, height};System specifications:
...
srcData += widthStep * srcROI.y + srcROI.x;
IppiRect newSrcROI = {0, 0, srcROI.width, srcROI.height};
[/cpp]
Intel IPP - 6.0.2.074
Core 2 Duo T9300
Windows Vista SP1
Visual Studio 2005
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is expected and correct use of IPP function. The ROI parameter specify size of rectangle of interest and pSrc is pointer to the first pixel of that rectangle.
Vladimir
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If this is expected as correct use of IPP function.
Please explain, why ippiResize support source ROI pointed to arbitrary (x,y) not only to (0,0)?
Also why ippiResizeSqrPixel contains IppiRect structure in prototype if it use only width and height parameters? I think IPP has another type for such purposes - IppiSize, which contains inside only width and height.
For example, please take a look to destination parameter of ippiResize function
Please explain, why ippiResize support source ROI pointed to arbitrary (x,y) not only to (0,0)?
Also why ippiResizeSqrPixel contains IppiRect structure in prototype if it use only width and height parameters? I think IPP has another type for such purposes - IppiSize, which contains inside only width and height.
For example, please take a look to destination parameter of ippiResize function
[cpp]Ipp8u* pDst, int dstStep, IppiSize dstRoiSize[/cpp]here you may see dstRoiSize.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Yuriy,
The API of the function ippiResizesqrPixeldiffers from the interface of the function ippiResize because it use other algorithm for several interpolating modes. Also we consider thatsource and resultant images are located in independent systems of co-ordinates.
The API of the function ippiResizesqrPixeldiffers from the interface of the function ippiResize because it use other algorithm for several interpolating modes. Also we consider thatsource and resultant images are located in independent systems of co-ordinates.
The destinationpixels are mapped back to the sourceimage and interpolated if get to it. It looks approximately so:
For (I = dstROI.y; I < dstROI.y + dstROI.height; I++) {
For (J = dstROI.x; J < dstROI.x + dstROI.width; J++) {
xCoordSrc = 1 / xFactor * (I + 0.5) - xShift / xFactor;
yCoordSrc = 1 / yFactor * (I + 0.5) - yShift / yFactor;
if (pixel (xCoordSrc, xCoordSrc)is in srcROI) {
interpolate;
}
}
}
Regards,
Beg
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