- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I run into an issue with ROI specification in the above functions. Here's an example to illustrate the problem:
IppiRect srcROI = { 0, 0, 400, 300 };
coeff[0][0] = 0.55333333333333334;
coeff[0][1] = 0.0;
coeff[0][2] = 0.0;
coeff[1][0] = 0.0;
coeff[1][1] = 0.55333333333333334;
coeff[1][2] = 0.0;
double bound[2][2];
ippiGetAffineBound(srcROI, bound, coeff);
Basically, the transformation scales the source by a factor of 0.55333333333333334 along both axis, hence bound should read:
bound[0][0] = 0.0;
bound[0][1] = 0.0;
bound[1][0] = 221.333333333333336;
bound[1][1] = 166.000000000000002;
Instead, I got the following values:
bound[0][0] = 0.0;
bound[0][1] = 0.0;
bound[1][0] = 220.78000000000000;
bound[1][1] = 165.44666666666666.;
Looks like the function is computing based on a source size of { 399, 299 } instead of { 400, 300 }. Is the ROI specification supposed to exclude the end pixels for both axis?
Thanks in advance for any answers.
IppiRect srcROI = { 0, 0, 400, 300 };
coeff[0][0] = 0.55333333333333334;
coeff[0][1] = 0.0;
coeff[0][2] = 0.0;
coeff[1][0] = 0.0;
coeff[1][1] = 0.55333333333333334;
coeff[1][2] = 0.0;
double bound[2][2];
ippiGetAffineBound(srcROI, bound, coeff);
Basically, the transformation scales the source by a factor of 0.55333333333333334 along both axis, hence bound should read:
bound[0][0] = 0.0;
bound[0][1] = 0.0;
bound[1][0] = 221.333333333333336;
bound[1][1] = 166.000000000000002;
Instead, I got the following values:
bound[0][0] = 0.0;
bound[0][1] = 0.0;
bound[1][0] = 220.78000000000000;
bound[1][1] = 165.44666666666666.;
Looks like the function is computing based on a source size of { 399, 299 } instead of { 400, 300 }. Is the ROI specification supposed to exclude the end pixels for both axis?
Thanks in advance for any answers.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
there is answer from our expert:
The model of geometrical functions Rotate, Shear, WarpAffine, WarpBilinear, WarpPerspective is the next - the pixel is consider as point not a square socoordinates {0, 0, 399, 299} corresponds to ROI {0, 0, 400, 300}
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladimir,
Thanks for the reply. Appreciate it.
Thanks for the reply. Appreciate it.

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