Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Looks like the skull is always on the outside of the image, and it’s always well-separated from the brain.
Approach 1: First principles
Draw a line across the centre of the image and stop when you find the first white pixel – this will be part of the skull. Find all pixels connected to that pixel. Remove them and you are left with the brain.
Approach 2: Use the image processing toolbox
This is the “connected components segmentation” problem. MATLAB’s image processing toolbox has a
bwconncomp()function that enumerates connected components in a black and white image. See this tutorial about how to count grains of rice in a photo – very similar problem.