View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Neuron counting

2.0 | 4 ratings Rate this file 8 Downloads (last 30 days) File Size: 11.4 KB File ID: #26798 Version: 1.6
image thumbnail

Neuron counting



27 Feb 2010 (Updated )

Count the number of fluorescent cells (tagged with GFP) on noisy background fluorescence

| Watch this File

File Information

% Matlab GUI for neuron counting
% frequency filtering to remove background fluorescence
% Otsu's method for thresholding, with user interaction
% Original image courtesy of Lan Guo


Image Overlay inspired this file.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.7 (R2008b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (10)
12 Sep 2016 Hirak Mazumdar

kindly upload it correctly. lots of student depends on your file.

Comment only
04 Jun 2015 Evan

Evan (view profile)

every button returns an error.

06 May 2014 David

David (view profile)

I really like the idea here, but I found too many problems right from the beginning. Every button that I push besides "browse" in the GUI returns an error.

To me, it's just not worth the time to dig through the code and try to fix this.

13 Nov 2013 muhammad

could you help me for making the 1- Please count number of peperoni. Using a GUIDE GUI based matlab function
your program is very useful to me.

20 Mar 2013 soonyong

13 Mar 2010 TIAN ZHOU

have you tried distance transformation before WST? there is a Matlab function BWout=bwdist(BWin).
i got this from my class notes by Prof. Alex Hartov

Comment only
10 Mar 2010 TIAN ZHOU

hi, Rob
sorry for rating my own code. it is really not my purpose. i thought you have to click 'submit' for the rating to come out. and i haven't found a way to delete it.
you are right about the data type. it is really something i should consider.
the property of the slide bar can be changed in the GUI. select the slide bar, right click and select property inspector, and change the min and max value to expend the range. you might get an error when the threshold value is negative or more than one. i am not sure if it will help.
i'll also comment out the top hat part. i have a newer version GUI but don't want to upload it since it is really a minor change.

have you considered resizing your image before processing? enlarge them so each cell will have more pixel?

Comment only
10 Mar 2010 Rob Campbell

Rob Campbell (view profile)

Thanks, I had looked at that link in the past. My problem is rather difficult because the cell bodies as small so I have few pixels to work with. Although they are touching, the pears are fairly easy to isolate because each pear is composed of a large number of pixels.

Your new GUI isn't working for me. It doesn't check whether the input is of the right type. e.g. my image was an int8 and under those circumstances the threshold slider doesn't work. I edited the code to convert the image to a double after loading but then something else broke.

You will find other users of this site consider it bad form for an author to rate their own submissions.

Comment only
05 Mar 2010 TIAN ZHOU

hi, Rob
thank you for the comments. that is what i am looking for.

i just uploaded a new GUI. hope you'll find it more user friendly.
to answer your question about the filtering parameter, it (i.e., the slide bar) changes the threshold values in the conversion from gray to BW.
if the bodies are touching, maybe the following link is useful to you

thank you

Comment only
05 Mar 2010 Rob Campbell

Rob Campbell (view profile)

Useful if cells are well separated but won't work for images were many cell bodies are touching. This problem is, naturally, difficult to solve.

GUI not particularly user friendly since it isn't obvious that buttons need to be pressed in a particular order. I can't see how filtering parameters can be changed from within the GUI.

Comment only
01 Mar 2010 1.2

GUI version was made

02 Mar 2010 1.5

include colormap for color image display

05 Mar 2010 1.6

new GUI interface, tophat for preprocessing, optional outlining colors

Contact us