How to divide image into three equal parts?

5 views (last 30 days)
How to split an image in three equal parts. This image is one Image which contains 3 images layered beneth each other I've tried everything to split them but I'm having difficulties, please help. the size of this image is 1024x396 and its unit8
  5 Comments
Jurgen
Jurgen on 21 Apr 2013
Then they are not "layered" they are stacked. Have you tried imcrop()?

Sign in to comment.

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 20 Apr 2013
Edited: Azzi Abdelmalek on 20 Apr 2013
[n,m]=size(im) % im is your image
id=fix(n/3)
im1=im(1:id,:);
im2=im(id+1:2*id,:);
im3=im(2*id+1:n,:);
  3 Comments
Image Analyst
Image Analyst on 21 Apr 2013
Like he said, im is your image variable. In your code you might have read in an image with imread like this
im = imread(fullFileName);
What variable name are you using instead of im in your code?
Varian Adisuryo
Varian Adisuryo on 4 Aug 2016
Thank you Mr. Azzi your answer help me a lot

Sign in to comment.

More Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!