title: Finding "dots" or foci in images with low contrast
body: <p>I have stained cells with an antibody and I am interested in counting the number of foci or "dots" per cell. The image below is from channel 1
  <img src="https://i.stack.imgur.com/urJ3W.png" alt="enter image description here">
  and represents nucleus of the cell and only regions within this disk shaped objects are of interest.</p>
  
  <p>The image below, for the same view as above but for a separate channel that stains small disk shaped regions or "dots"</p>
  
  <p><img src="https://i.stack.imgur.com/Cu4He.jpg" alt="enter image description here"></p>
  
  <p>I hope that you can see dots, some of high intensity and some of low intensity. I am trying to count these using matlab (image processing toolbox) but I have not been successful. </p>
  
  <p>This is what I have so far </p>
  
  <pre><code> filenameDAPI='http://i.stack.imgur.com/urJ3W.png';
   DAPI=imread(filenameDAPI); % nuclei
   nuclei_bin=imfill(im2bw(DAPI,graythresh(DAPI)),'holes');
   nuclei_bin=bwareaopen(nuclei_bin,2000); % filter out small regions
   filenameTRITC='http://i.stack.imgur.com/Cu4He.jpg';
  
   TRITC=imread('http://i.stack.imgur.com/Cu4He.jpg'); % dots
  
   Th=graythresh(TRITC); % threshold that finds nuclei
   Th2=graythresh(TRITC(TRITC&gt;Th)); % threshold that finds foci
   FOCI=im2bw(TRITC,Th2);
  
   % now filter FOCI by size
   minArea=2; maxArea=200; % threshold to remove spurious foci
   FOCI_labeled=bwlabel(FOCI,8);
   FOCI_props=regionprops(FOCI_labeled,TRITC,'Area'); 
   A=[FOCI_props.Area];
   keepIndices=find(A &gt;= minArea &amp; A &lt;= maxArea);
   FOCI_mask=ismember(FOCI_labeled,keepIndices);
   FOCIfiltered=FOCI.*FOCI_mask; 
  
   outline_FOCI=bwperim(FOCIfiltered);
   overlay_FOCI=imoverlay(TRITC,outline_FOCI,[1 .1 .3]);
  
   subplot(2,2,1); imshow(TRITC); 
   subplot(2,2,2); imhist(TRITC)
   subplot(2,2,3); imshow(FOCIfiltered);
   subplot(2,2,4); imshow(overlay_FOCI)
  </code></pre>
  
  <p>And the resulting picture is shown here:
  <img src="https://i.stack.imgur.com/o7eQw.png" alt="enter image description here">
  Unfortunately, the result shown in subplot (2,2,4) is not so good--many real dots are missed while spurious dots are identified. </p>
  
  <p>I would be grateful if  someone can help me improve the dots.</p>
  
  <p>Thanks
  Lee</p>