Skip to main content
Known Participant
March 31, 2011
Open for Voting

P: Provide image analysis for Microbiology

  • March 31, 2011
  • 15 replies
  • 809 views

I would love to see a count of discreet selections in an image. My main motivation is biology research, where it is often vital to perform cell counts in an image.

It's incredibly easy to create a selection of luminescent cells on a plate via channels or the color range tool, and both methods account for variations in cell shape really well. But there's no way to see how many selections have been made. I really don't want to count to 30,000 by hand, even with the count tool!

Attached: A plate sample! 🙂 Would be great to have an "Add count" option that let me set min and max size or luminosity and then drop the result into the measurements log.

Image is not available

15 replies

Known Participant
March 31, 2011
Sure! I can list some of the cell colony counting criteria from the top of my head right now, and I'll also shoot a few emails around and ask for additional suggestions. (I am an Instructional Media Specialist for a university in New England. I work with faculty and students on media aspects of research and class projects across every discipline)

The biology researchers I've worked with are predominantly interested in 2 types of image analysis: population count and viability count (usually in %). They are typically concerned with bacterial cell colonies, which are usually counted by hand.
The attributes they need:

~identify cell by color difference (or inversely, blank area in a field of color).
~identify expected cell attributes of area and roundness
~distinguish cells in cluster-forms (if cells are cluster-form type cells)
~identify cells that overlap
~identify sample cell shape and look for pattern matches
~allow for 2 or more cell-types by color in the same image (viability measurements)

The term I've heard tossed around regarding some of the techniques for identifying overlaps and clusters is "Algebraic Topology"

There are a few proprietary utilities from microscope manufacturers to assist with counting, but Photoshop is often needed to prepare images for analysis.

Attached also, one of the more alarmingly difficult images someone brought to be last Friday, with spindle-shaped cells.


Image is not available

Foster Brereton
Adobe Employee
Adobe Employee
March 31, 2011
While David's comment is simply brilliant, I'm also interested to hear what other algorithms/utilities/etc would make Photoshop a more robust image analysis tool for you. A prioritized list would be best, but anything you can throw at us wouldn't hurt, either. Thanks!
Known Participant
March 31, 2011
David--that's about as ingenious as I've ever seen. What a way to think outside the box!

(I'd still love to see a formalized image analysis tool built-in, but this just about solves it in the meantime!)
Foster Brereton
Adobe Employee
Adobe Employee
March 31, 2011
Wow David -- slick!
Known Participant
March 31, 2011
Threshold the image. (or the selection in Quick Mask mode)
Scale it to 200% using nearest neighbor resampling
Load a channel as a selection.
Convert the selection to a work path using a tolerance of 0.5 pixels

Run this script: (paste the code into notepad/textEdit and save with a .jsx extension)

alert(activeDocument.pathItems[0].subPathItems.length)