manipulating image for counting microbial cells

View: New views
3 Messages — Rating Filter:   Alert me  

manipulating image for counting microbial cells

by Chuck Pepe-Ranney :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
I am wondering if I can use PIL to manipulate some fluorescent microscopy images.  Specifically, I will have two images of the same field but each will be taken under different emission filters.  What I need to do is loop through the pixels in the first image multiply each pixel's intensity by a factor then divide it by the intensity of the spatially corresponding pixel in the second image.  There are more steps to follow but they are seemingly routine image manipulation tasks.  The images will be in tiff format.  Would PIL be a suitable solution to this problem?
Thanks for the help in advance,
- Chuck

_______________________________________________
Image-SIG maillist  -  Image-SIG@...
http://mail.python.org/mailman/listinfo/image-sig

Re: manipulating image for counting microbial cells

by David Berthelot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I do some pretty fancy image manipulation and I use numpy + PIL to do my processing. What you are describing can easily be achieved by using those packages together.


From: Chuck Pepe-Ranney <cpepera@...>
To: image-sig@...
Sent: Monday, September 21, 2009 2:28:04 PM
Subject: [Image-SIG] manipulating image for counting microbial cells

Hello,
I am wondering if I can use PIL to manipulate some fluorescent microscopy images.  Specifically, I will have two images of the same field but each will be taken under different emission filters.  What I need to do is loop through the pixels in the first image multiply each pixel's intensity by a factor then divide it by the intensity of the spatially corresponding pixel in the second image.  There are more steps to follow but they are seemingly routine image manipulation tasks.  The images will be in tiff format.  Would PIL be a suitable solution to this problem?
Thanks for the help in advance,
- Chuck


_______________________________________________
Image-SIG maillist  -  Image-SIG@...
http://mail.python.org/mailman/listinfo/image-sig

Re: manipulating image for counting microbial cells

by Dan Halbert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Chuck Pepe-Ranney wrote:

> Hello,
> I am wondering if I can use PIL to manipulate some fluorescent
> microscopy images.  Specifically, I will have two images of the same
> field but each will be taken under different emission filters.  What I
> need to do is loop through the pixels in the first image multiply each
> pixel's intensity by a factor then divide it by the intensity of the
> spatially corresponding pixel in the second image.  There are more
> steps to follow but they are seemingly routine image manipulation
> tasks.  The images will be in tiff format.  Would PIL be a suitable
> solution to this problem?
I don't claim to be an expert, but here are some suggestions. You can do
simple manipulation in PIL. See for instance the ImageChops, ImageMath,
etc. modules. Also take note of the "pixel access object", new in PIL
1.1.6, described under "load" in
http://www.pythonware.com/library/pil/handbook/image.htm.

Another alternative is to do the image manipulation in numpy/scipy. Also
new in PIL 1.1.6 are operations to convert PIL images to and from numpy
arrays. See asarray() and fromarray() here:
http://effbot.org/zone/pil-changes-116.htm.

Yet another alternative for sophisticated image manipulation is OpenCV,
a C/C++ library with several python interfaces. OpenCV 1.0 is
well-documented in an O'Reilly book. OpenCV 2.0 just came out in beta
(the beta is called 1.2, for some reason), and has an improved python
interface which I have not looked at yet.

Dan
_______________________________________________
Image-SIG maillist  -  Image-SIG@...
http://mail.python.org/mailman/listinfo/image-sig