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.
Vlad Atanasiu (2019). Fill corners of rotated image (https://www.mathworks.com/matlabcentral/fileexchange/1825-fill-corners-of-rotated-image), MATLAB Central File Exchange. Retrieved .
great job tnx
thanks a lot
Bug removed. Thanks Mathew!
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!
Published as Matlab toolbox (.mltbx file).
Degrees are now converted to radians before image processing.