Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® Integrated Performance Primitives
- How to get source bounds for target bounds for AffineTransform

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Alexander_Brazda

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-02-2016
02:23 PM

36 Views

How to get source bounds for target bounds for AffineTransform

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

1 Reply

Valentin_K_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-03-2016
08:25 AM

36 Views

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

For more complete information about compiler optimizations, see our Optimization Notice.