- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to rotate an image about its center preserving the entire rotated image.
Currently it looks like ippiRotateCenter will always clip the left and the bottom of the image when the rotated coordinates go negative. It looks like dstRoi MUST have a positive origin, hence a negative origin generates a ippStsSizeErr error.
The only solution I can see is to:
1) Calculate a much larger source image and place my existing source image into to it. This source image would be large enough that after rotation my original soure image would all exist in the realm of positive coordinates.
2) I would have to calculate a new center of rotation within the new source, and possibly a new angle of rotation (not sure about this), to achieve the same effect as rotating about the original center of rotation.
3) I would have to calculate the resultant quad in the destination image that represented the original source image and then define a new dest image from the subaoi of that quad.
This seem like a lot of trouble to go through, and I am hoping that I have just missed something in the documentation.
I am very new to the library and I believe there should be an easier way to do what I want, but I just cant see it. Please let me know if I am right or if there is an easier way.
Thanks,
Bob
Currently it looks like ippiRotateCenter will always clip the left and the bottom of the image when the rotated coordinates go negative. It looks like dstRoi MUST have a positive origin, hence a negative origin generates a ippStsSizeErr error.
The only solution I can see is to:
1) Calculate a much larger source image and place my existing source image into to it. This source image would be large enough that after rotation my original soure image would all exist in the realm of positive coordinates.
2) I would have to calculate a new center of rotation within the new source, and possibly a new angle of rotation (not sure about this), to achieve the same effect as rotating about the original center of rotation.
3) I would have to calculate the resultant quad in the destination image that represented the original source image and then define a new dest image from the subaoi of that quad.
This seem like a lot of trouble to go through, and I am hoping that I have just missed something in the documentation.
I am very new to the library and I believe there should be an easier way to do what I want, but I just cant see it. Please let me know if I am right or if there is an easier way.
Thanks,
Bob
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good News, I have found the answer to my question. The answer is to:
1) Use ippiGetRotateShift set to the center of the roi, and get xShift, yShift
2) Use GetRotateQuad to finds the bounds of the destination roi
3) Recalculate xShift -= roi.left, yShift -= roi.top
4) call ippiRotate with these new shift values and all is well.
Thanks
1) Use ippiGetRotateShift set to the center of the roi, and get xShift, yShift
2) Use GetRotateQuad to finds the bounds of the destination roi
3) Recalculate xShift -= roi.left, yShift -= roi.top
4) call ippiRotate with these new shift values and all is well.
Thanks

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