Turn on suggestions

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

Showing results for

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

siddy

Beginner

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

03-09-2011
05:38 PM

43 Views

WarpAffine

transform obtained from an external source, and I am trying to use

this to resample an Image using WarpAffine. The transformation parameters

were calculated with reference to a center different from the origin. Since

WarpAffine has no parameter to specify thre center of the transform, I wanted

to know what sequence of steps I should pass my coeff[2][3] through, to ensure

that the transformation applied to the image is around the same center with

reference to which it was derived.

Thanks,

Sid.

Link Copied

3 Replies

siddy

Beginner

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

03-10-2011
11:17 AM

43 Views

I though a bit more about the problem, and I figured out

that I will have to recenter the coordinates, i.e X-C, prior to

applying the resampling on the grid. To restate,

If the usual approach for resampling is X' = AX, where A is the

transform and X is the image grid (giving f(X') actually), how do

I go about implementing X' = A(X-C) using available ip primitives,

where C is the center of the transform.

Thanks again,

Sid.

Yuri_Tikhomirov__Int

New Contributor I

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

03-10-2011
11:50 PM

43 Views

Let affine transform is

xD = c00*xS + c01*yS + c02

yD = c10*xS + c11*yS + c12

The coordinates of centers are (xScenter, yScenter) and (xDcenter, yDcenter).

So we should use:

xD = c00*(xS-xScenter) + c01*(yS-yScenter) + xDcenter

yD = c10*(xS-xScenter) + c11*(yS-yScenter) + yDcenter

Then the desired coefficients are

02 = xDcenter - c00*xScenter - c01*yScenter

12 = yDcenter - c10*xScenter - c11*yScenter

Thanks,

Beg

siddy

Beginner

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

01-03-2012
05:38 PM

43 Views

Let me rejuvenate this thread, with reference to my latest thread regarding getAffineTransform for a quadilateral:

if the initial quad of Q = {(xi,yi), i=0,1,2,3}, and the final quad is Q'= {(x'i,y'i), i = 0,1,2,3}, and coeffs[2][3]

are obtained by ippiGetAffineTransform between Q and Q', to what center are this coeffs referred to? Am i right

in thinking : (x2-x1)/2 and (y2-y1)/2 ?

Thanks

Sid.

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

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