invert(Img)

For image inversion in horizontal and vertical direction
115 Downloads
Updated 15 Apr 2015

View License

To invert the image laterally, and upside down.
Then, those images are subplot in one figure window for viewing.
Hopefully, you enjoy with this.

function Fp=invert(Img);

Flip_updown=Img(end:-1:1,:);
Flip_lateral=Img(:,end:-1:1);

figure(1);
subplot(1,3,1), imshow(Flip_updown), title('Upside Down');
subplot(1,3,2), imshow(Img), title('Original Image');
subplot(1,3,3), imshow(Flip_lateral), title('Laterally Inverted');

Cite As

Walter O'Brien (2026). invert(Img) (https://www.mathworks.com/matlabcentral/fileexchange/50510-invert-img), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0