combining small image to a large image
이전 댓글 표시
I am trying to merge small images into a large image by copying the small images' matrix to a single matrix While when i try copying, the result is not as I expected, the part of the large matrix is as the same as the image. The size of the small image is 13X39,hence i set it manually for testing
tryq=imread([folder '/' num2str(i+1) ' ' num2str(j+1) 'temp.jpg '])
figure(2)
imshow(tryq)
figure(3)
finalImage(1:13,1:39,:)=tryq;
imshow(finalImage);

댓글 수: 5
Walter Roberson
2014년 4월 24일
I am not sure what result you are expecting that is different from what you got?
What did you initialize finalImage to be?
Chan
2014년 4월 25일
Image Analyst
2014년 4월 25일
That's because it's a double. Try this
finalImage=zeros(row*blocksize(1),column*blocksize(2),3, 'uint8');
Chan
2014년 4월 25일
Image Analyst
2014년 4월 25일
Can you mark my Answer below as Accepted then? Thanks in advance.
답변 (1개)
Image Analyst
2014년 4월 24일
0 개 추천
Attached is a demo for copying a small image onto a larger one. In my demo, the small image is actually chosen from part of the large image, but it could just as well be a totally separate image.
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!