How can i divied brain tumor image to 9 image for same image
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Daleel Ahmed
el 2 de Ag. de 2018
Comentada: Daleel Ahmed
el 3 de Ag. de 2018
I1=I(1:size(I,1)/2,1:size(I,2)/2,:); I2=I(size(I,1)/2+1:size(I,1),1:size(I,2)/2,:); I3=I(1:size(I,1)/2,size(I,2)/2+1:size(I,2),:); I4=I(size(I,1)/2+1:size(I,1),size(I,2)/2+1:size(I,2),:);
5 comentarios
jonas
el 3 de Ag. de 2018
"Ok No problem"
So, can you put some effort into your work? People are trying to help you. Reading your most recent reply to IA's answer genuinely made me laugh.
Respuesta aceptada
Image Analyst
el 3 de Ag. de 2018
OK, here it is:
grayImage = imread('cameraman.tif');
[rows, columns, numberOfColorChannels] = size(grayImage);
row1 = round(rows / 3)
row2 = round(rows * 2 / 3)
col1 = round(columns / 3)
col2 = round(columns * 2 / 3)
i11 = grayImage(1:row1, 1:col1);
subplot(3, 3, 1);
imshow(i11);
i12 = grayImage(1:row1, col1+1:col2);
subplot(3, 3, 2);
imshow(i12);
i13 = grayImage(1:row1, col2:end);
subplot(3, 3, 3);
imshow(i13);
i21 = grayImage(row1+1:row2, 1:col1);
subplot(3, 3, 4);
imshow(i21);
i22 = grayImage(row1+1:row2, col1+1:col2);
subplot(3, 3, 5);
imshow(i22);
i23 = grayImage(row1+1:row2, col2:end);
subplot(3, 3, 6);
imshow(i23);
i31 = grayImage(row2:end, 1:col1);
subplot(3, 3, 7);
imshow(i31);
i32 = grayImage(row2:end, col1+1:col2);
subplot(3, 3, 8);
imshow(i32);
i33 = grayImage(row2:end, col2:end);
subplot(3, 3, 9);
imshow(i33);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/193008/image.png)
Más respuestas (1)
Image Analyst
el 3 de Ag. de 2018
Editada: Image Analyst
el 3 de Ag. de 2018
That's basically it, just use 9 equations instead of 4, and 1/3 and 2/3 instead of 1/2.
Or see the FAQ for a more general situation: https://matlab.wikia.com/wiki/FAQ#How_do_I_split_an_image_into_non-overlapping_blocks.3F
4 comentarios
Ver también
Categorías
Más información sobre Image Data Workflows 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!