- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I want to rotate an image on its center. I am trying to use ippiRotateCenter. The below code I have written does not perform what I expect. I also attach the input image, the result I get with the below code and the result of matlab's imrotate function. I think matlab's result is ideal. Any idea is welcome.
[bash] int inputWidth = 512; int inputHeight = 512; int rotWidth = 725; int rotHeight = 725; double angle = 45.0; int stepBytesRot; Ipp32f* inputRotated = ippiMalloc_32f_C1(rotWidth, rotHeight, &stepBytesRot); IppiSize srcSize = { inputWidth, inputHeight }, dstSize = { rotWidth, rotHeight }; double xCenter = floor((double)inputWidth/2); double yCenter = floor((double)inputHeight/2); IppiRect srcRect = { 0, 0, inputWidth, inputHeight}; IppiRect dstRect = { 0, 0, rotWidth, rotHeight}; int interpolationType = IPPI_INTER_NN; sts = ippiRotateCenter_32f_C1R(inputImage, srcSize, stepBytesInput, srcRect, inputRotated, stepBytesRot, dstRect, -angle, xCenter, yCenter, interpolationType); assert(sts!=ippStsNullPtrErr); assert(sts!=ippStsSizeErr); assert(sts!=ippStsStepErr); assert(sts!=ippStsInterpolationErr); assert(sts!=ippStsRectErr); assert(sts!=ippStsWrongIntersectQuad);[/bash]
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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