I have segmented the file (I) into 4 parts (A, B, C, D) as shown in the matlab code below. How to rejoin theses file. Could u please help as I am working on medical images.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I=imread('cameraman.tif'); subplot 334 imshow(I); [r c p]= size(I); %r-rows,c-columns,p-planes A=I(1:r/2,1:c/2,:); B=I(1:r/2,c/2+1:c,:); C=I(r/2+1:r,1:c/2,:); D=I(r/2+1:r,c/2+1:c,:); subplot 332 imshow(A); title('Image part 1'); imwrite(A, 'FirstPart.tif'); subplot 333 imshow(B); title('Image part 2'); imwrite(A, 'SecondPart.tif') subplot 335 imshow(C); title('Image part 3'); imwrite(A, 'ThirdPart.tif') subplot 336 imshow(D); title('Image part 4'); imwrite(A, 'ForthPart.tif')
0 Kommentare
Antworten (1)
Image Analyst
am 10 Dez. 2016
Did you know you're writing out A every single time? You're not writing out B, C, and D. Once you fix that, you can just stitch them together after using imread()
A = imread('FirstPart.tif');
B = imread('SecondPart.tif');
C = imread('ThirdPart.tif');
D = imread('ForthPart.tif');
fullImage = [A,B;C,D];
0 Kommentare
Siehe auch
Kategorien
Mehr zu Computer Vision with Simulink finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!