필터 지우기
필터 지우기

adding the pictures together

조회 수: 1 (최근 30일)
Oyewale Oyelami
Oyewale Oyelami 2011년 7월 20일
i have four cropped images...but i want to add them all together as one image with little spaces between them....anyone with head way...Thanks ahead

답변 (1개)

Jan
Jan 2011년 7월 20일
If you are talking about RGB images, which have all the same size and "add with little space" means to set them side by side with a black bar:
Img{1} = rand(100, 100, 3);
Img{2} = rand(100, 100, 3);
Img{3} = rand(100, 100, 3);
Img{4} = rand(100, 100, 3);
Img1to4 = cat(1, ...
cat(2, Img{1}, zeros(100, 10, 3), Img{2}), ...
zeros(10, 210, 3), ...
cat(2, Img{3}, zeros(100, 10, 3), Img{4}));
If you want something else, please take the time to explain the details.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by