How to perform skull stripping using matlab?
Ältere Kommentare anzeigen
I would like to do a project on skull stripping. What is the effective method to perform skull stripping/removal? Could anyone help me in getting code for that?

This is my image sir.
2 Kommentare
Matz Johansson Bergström
am 28 Jan. 2015
Bearbeitet: Matz Johansson Bergström
am 28 Jan. 2015
Maybe you should change the term "Skull stripping" to a more generic term like "3d slice visualization". You might get more help that way.
manasa
am 28 Jan. 2015
Akzeptierte Antwort
Weitere Antworten (4)
Alfonso Nieto-Castanon
am 28 Jan. 2015
5 Stimmen
Assuming that you do not have simply that slice but the entire MRI scan (e.g. a filename.nii or filename.img file) I would suggest using SPM (this is Matlab software). Applying segmentation to your structural volume will generate a number of masks (files named c#filename.nii) indicating the different tissues of interest.
To perform skull-stripping you typically want to keep the grey-matter, white-matter, and CSF masks (masks c1filename.nii to c3filename.nii, respectively) and remove everything else. You can do this after segmentation simply using SPM 'imcalc' option and multiplying your original structural volume by the sum of these masks (c1- to c3).
Image Analyst
am 28 Jan. 2015
2 Stimmen
To strip/remove the skull, look for my code and search for things like skull and brain in this Answers forum. I know I gave a demo for this some time back. A quick check didn't find my demo but I didn't look at a lot of questions on this, and there are a lot of them. I did find one answer I gave and it seems valid for your case.
To strip the skull you threshold it so that you get the skull separated - not connected to the brain. Then you label it with bwlabel() and then use ismember() to isolate the region with label 1, which should be the skull assuming it's the outermost object (no letters or annotation present in the image). Or you can use ismember to extract out everything with labels 2 and up to get everything except the skull.
Attach your image and attempt at coding that up for more help.
2 Kommentare
Chandita Nath barbhuyan
am 2 Mär. 2017
Bearbeitet: Image Analyst
am 2 Mär. 2017

How to remove the white skull region outside?
Image Analyst
am 2 Mär. 2017
Adapt my attached skull stripping demo.
Matz Johansson Bergström
am 28 Jan. 2015
Bearbeitet: Matz Johansson Bergström
am 28 Jan. 2015
1 Stimme
Magdalena Gierczynska
am 7 Okt. 2020
0 Stimmen
Hi, I have a question. I understand everything to "%Erode away 15 layers of pixels.". You used erosion to reduce border pixels, but what exactly happen in "% Mask the gray image"? On the next image you show "skull stripped image", how? I don't understand this part of code. Can you explain me? I will be greatful.
5 Kommentare
Magdalena Gierczynska
am 7 Okt. 2020
What mean "~" in your code?
Image Analyst
am 7 Okt. 2020
In code, ~ means inverse. So if the expression immediately after the ~ is false, using ~ will produce a true value. And vice versa
% Example 1
t = true;
f = ~t; % f will have a value of false
% Example 2
f = false;
t = ~f; % t will have a value of true
% Example 3
mask = grayImage < 100; % mask is true if pixels have values less than 100
invertedMask = ~mask; % invertedMask is true if pixels have a value >= 100
Ayush singhal
am 22 Mai 2021
Hello, I have a simikar doubt reagarding this.
I have two images. one with stripes and another object with stripes. I would like to extract the object from these two images. These two are uint8 images. Also I want to find the depth of the object by showing images in the surf plot.
Could you give some hint?
I have used imsubtract but it won't give the desire results.
Pprs3 = imread('P1000571-min.JPG'); % Colour Image
Pprs1 = rgb2gray(Pprs3); % Grayscale Image
x = 0:size(Pprs1,2)-1;
y = 0:size(Pprs1,1)-1;
[X,Y] = meshgrid(x,y); % Coordinate Matrices (Not Necessary)
figure(1)
meshc(X, Y, Pprs1) % Mesh Plot
grid on
xlabel('X')
ylabel('Y')
zlabel('Intensity')
colormap(jet)
hold on
a = imread('P1000578-min.JPG'); % Colour Image
b = rgb2gray(a); % Grayscale Image
x = 0:size(b,2)-1;
y = 0:size(b,1)-1;
[X,Y] = meshgrid(x,y); % Coordinate Matrices (Not Necessary)
figure(2)
meshc(X, Y, b) % Mesh Plot
grid on
xlabel('X')
ylabel('Y')
zlabel('Intensity')
colormap(jet)
hold on
c = imsubtract(Pprs1,b);
x = 0:size(c,2)-1;
y = 0:size(c,1)-1;
[X,Y] = meshgrid(x,y); % Coordinate Matrices (Not Necessary)
figure(3)
meshc(X, Y, c) % Mesh Plot
grid on
xlabel('X')
ylabel('Y')
zlabel('Intensity')
colormap(jet)
In the attachment, images are given.
Image Analyst
am 22 Mai 2021
@Ayush singhal, can you please start a new thread and I'll answer it there?
Ayush singhal
am 23 Mai 2021
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
