title: Matlab segmentation of CT scan
body: <p>I have an image similar to this: <a href="http://bjr.birjournals.org/content/84/Special_Issue_3/S338/F9.large.jpg" rel="nofollow noreferrer">this http://bjr.birjournals.org/content/84/Special_Issue_3/S338/F9.large.jpg</a></p>
  
  <p>I want to segment only the aorta(where the arrow is pointing) and get rid of the rest of the anatomy. I'm new to matlab and not sure how to start. </p>
  
  <p>So far I have this:</p>
  
  <pre><code>clear all;
  img = imread('~/Desktop/aorta.jpg');
  img1 = rgb2gray(img);
  imgh = histeq(img1);
  bw = im2bw(imgh,.9);
  remove = bwareaopen(bw,5000);
  l = bwlabel(remove);
  s = regionprops(l, 'perimeter');
  </code></pre>
  
  <p>My thought was to use the perimeter value to compare to the roundness and use ismember to exclude the rest, but I'm not sure how to implement that and I couldn't find any good examples explaining how to.</p>
  
  <p>Can somebody explain how to do that? Also, is this strategy the best way to do this? Thanks!</p>