how to segment image into 4 equivalent parts ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
marwa za
am 8 Okt. 2018
Kommentiert: marwa za
am 9 Okt. 2018
how can I segment an image (brain) into 4 parts or 2 parts like the following figure ?
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 9 Okt. 2018
Try this:
[rows, columns, numberOfColors] = size(yourImage);
midRow = round(rows/2);
midCol = round(columns/2);
upperLeft = yourImage(1:midRow, 1:midCol, :);
lowerLeft = yourImage(midRow+1:end, 1:midCol, :);
upperRight = yourImage(1:midRow, midCol+1:end, :);
lowerLeft = yourImage(midRow+1:end, midCol+1:end, :);
figure;
subplot(2, 2, 1);
imshow(upperLeft);
subplot(2, 2, 2);
imshow(lowerLeft);
subplot(2, 2, 3);
imshow(upperRight);
subplot(2, 2, 4);
imshow(lowerLeft);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Legend finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!