MATLAB Answers

how to join two image

422 views (last 30 days)
Ibrahim Thorig
Ibrahim Thorig on 13 May 2014
I have two fragments of one image, i want join these two piece. someone please tell me how to join these two fragments.
thanks in advance

Answers (2)

Benjamin Avants
Benjamin Avants on 13 May 2014
You should use the cat() function.
if your images are A and B and you want to merge them so that you get AB (A on the left with be on the right) the command looks like this:
newImg = cat(2,A,B);
If you want A on top of B:
newImg = cat(1,A,B);
Hey, Once we have used concatenation, how can we deconcatenate to obtain the exact previous images?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by