Flip image from one side to another
이전 댓글 표시
Once you upload a picture into matlab is there anyway that you can take the one half, for example the left half and flip it onto the right side while leaving the original left side? I want to create the mirror image of one side and put it on the other
답변 (1개)
Chad Greene
2017년 3월 13일
It's not entirely clear what you're asking, but try flipdim to flip an image; use horzcat to join two images. Here's an example you can run:
I = imread('peppers.png');
subplot(2,2,1)
imshow(I)
title 'original image'
% Flip left/right:
Ir = flipdim(I,2);
subplot(2,2,2)
imshow(Ir)
title 'flipped image'
% Join the original and flipped images:
IIr = horzcat(I,Ir);
subplot(2,2,3:4)
imshow(IIr)
title 'joined images'

카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!