MATLAB: To flip an image block across main diagonal line y=x

diagonalreflectiontranspose

I have an image of size 256×256 and it is divided into 58081 overlapping blocks of size 16×16. I flipped each and every block vertically and horizontally using flipdim(image block, dimension)function. Is there any function to flip every block across the main diagonal line y=x?

Best Answer

transpose
img_block_diag = transpose(img_block);