tags:

views:

17

answers:

1

Hello, I have a method that does some processing on an IplImage and the method works as it should if the image is 640x480 pixels. But if it is 480x640 pixels, it does't not... because the image needs to be rotated to become 640x480 again, but then I need to rotate it back to 480x640 or translate ther coordinates taken from cvHaarDetectObjects to 480x640.

Can anybody tell me how can I do this?

thanks!!

+2  A: 

Try transpose followed by flip. The flip is needed because transpose leaves an mirrored image when compared to the results of a rotation. If the algorithm can work with the mirrored image directly, I would recommend simply flipping the coordinate values of the detection result, rather than flipping the input image.

(Disclaimer: I haven't tried transpose or flip on multi-channel images)

rwong