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 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Image Analyst
el 10 de Dic. de 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 comentarios
Ver también
Categorías
Más información sobre Computer Vision with Simulink en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!