- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using WarpAffineLinear to rotate a image.
Using tiles for parallel processing works fine, except when my source image its not full in continued memory. For this cases source region it's need but I can't find any function to request for the source image area that would be used to compute the transform in a target area. Of course I can use a inverse transform for this but I would never now witch area it's need with precession and more if bordertype its ippBorderRepl and target ROI it's out of the source image.
In any case this calculations are made internally by the library so it should be accessible, for this cases as it's available for resize using ippiResizeGetSrcRoi functions.
Regards
Alexander Brazda
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alexander,
To compute source ROI for the processed destination tile for WarpAffine with Linear interpolation you can use the function ippiGetAffineBound for the inverse transform. This function computes vertex coordinates of the smallest bounding rectangle for the transformed ROI.
The source ROI can be computed by the following formulas:
IppiRect srcRoi; srcRoi.x = floor(bound[0][0]); srcRoi.y = floor(bound[0][1]); srcRoi.width = ceil(bound[1][0]) + 1 - srcRoi.x; srcRoi.height = ceil(bound[1][1]) + 1 - srcRoi.y;
Best regards,
Valentin
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page