ROIROTATE was designed to avoid the 'black corners' typical of MATLAB's imrotate function, which are apearing from its behaviour of padding by zeros of the space outside the image borders prior to the rotation. This is possible if the image to be rotated is part of a bigger image, because there is enough information to fill the corners.
Great, but there is one small but important bug! When calculating the padding, it doesn't convert from degrees to radians, which means that occasionally it will not pad the images enough. Just make sure you edit the padX and padY variables and it will work beautifully!
12 Nov 2003
31 Oct 2008
Degrees are now converted to radians before image processing.