Also, if I take multiple image in different fluorescent channels (after staining the cells with some antibody/maker), how can I automatically quantitate the fraction of cells positive for each marker? Has anyone done something like this in Python? Or is there a library in Python that can be used to do this?
CellProfiler is written in python. But it may be more than you want, if you want to do the analysis coding yourself. But it would allow you to do most of what you have written, above.
Use scikits.image a nice little library for image processing in python with bindings to OpenCV (big computer vision C++ library). You can do segmentation with cvThreshold(). But this solution requires installing OpenCV which might be cumbersome.
Other approach is to use ImageJ - a very powerfull microscope image processing software. Fiji is its incarnation, in which you can write plugins in jython. See homepage of Albert Cardona for lost of usefull tutorials. Fiji has loads of different segmentation algorithms and you can test all to see which works best with your images. You can use macro recording to catch all needed class and function names, just do manually what you like and than copy and paste into your script/plugin. ImageJ API is also very useful resource.
As mentioned by Thouis, you can use CellProfiler. In fact you can just use usefull
functions, which you can find here.
Speaking of pure python solutions, scipy and numpy are very useful, especially ndarray.
Cross-posted on SO: http://stackoverflow.com/questions/5560507/cell-segmentation-and-fluorescence-counting-in-python