How to crop image from two added image
2 次查看(过去 30 天)
显示 更早的评论
Hello everyone, I hope you are doing well.
I have image which consists of two image. i want to crop the image and seperate the both image and save it in folder
I have attached the following image. it is basically consists of two image one is right and second is left as you can see
How can i do that in MATLAB![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1024170/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1024170/image.jpeg)
0 个评论
回答(2 个)
Image Analyst
2022-6-7
Try this
theImage = imread('splitImage.jpeg');
[rows, columns, numberOfColorChannels] = size(theImage)
midCol = round(columns/2)
leftImage = theImage(:, 1 : midCol, :);
subplot(1, 2, 1);
imshow(leftImage, []);
title('Left Half of the Image')
rightImage = theImage(:, midCol + 1 : end, :);
subplot(1, 2, 2);
imshow(rightImage, []);
title('Right Half of the Image')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!