Showing results for 
Search instead for 
Did you mean: 

ippiWarpAffine and ippiGetAffineBound


I am trying to use the function ippiWarpAffine to perform certain transformation of an input image, but am having certain difficulties. Please correct me if i am wrong.

For starters to verify the working of the ippiWarpAffine function, i decided to use it to rotate an image. The affine transfomation matrix for rotation is as follows:

|X| = cos(theta) -sin(theta)
|Y| = sin(theta) cos(theta)

So i define my co-efficients as :
where dAngle is the angle say 10 degress, i.e. 0.1745 in radians
adAffineCoeffs[0][0] = cos(dAngle);
adAffineCoeffs[0][1] = -sin(dAngle);
adAffineCoeffs[0][2] = 0.0;

adAffineCoeffs[1][0] = sin(dAngle);
adAffineCoeffs[1][1] = cos(dAngle);
adAffineCoeffs[1][2] = 0.0;

When i use this in the function ippiGetAffineBound() to get me the bound of the transformed image, of a source image having size:
IppiRect srcRoi;
srcRoi.x = 0;
srcRoi.y = 0;
srcRoi.width =640;
srcRoi.height = 512;

i get the following bound values:
bound[0][0] = -88.732746465172
bound[0][1] = 0.00000000000000
bound[1][0] = 629.29247881179
bound[1][1] = 614.19636580279

Can i know the reason for these negative values. Or is there any mistake in my interpretation. Please help. Thanks in Advance.
0 Kudos
0 Replies