Reputation: 8710
Hi I have a bunch of images. Let's assume all of them of the same size. The images have a black background and some quasi round green spots which represent fluorescence. I have to calculate the amount (in percentage) of fluorescence of each image. I.e. the area of green spots.
Any idea how to do this, for example in Java?
Upvotes: 1
Views: 5098
Reputation: 47233
This is a standard problem in image processing, and is called image segmentation. You will be able to find vast quantities of information about it.
In particular, this is a common problem in microscopic image processing, which is what you're doing. I think there might be canned operations to do it in ImageJ; if not, it would be a fairly simple macro in ImageJ, and since ImageJ is in java, you could write java code using ImageJ's libraries if you like.
I would suggest an approach in which you:
Instead of doing the K-means step, you could just pick a threshold from the histogram (look for the valley between the two peaks, say), and segment on that. Or use some sort of adaptive segmentation (comparing pixels to the median in their neighbourhood, say), but that will require some tuning.
Upvotes: 5
Reputation: 3852
A few thoughts:
Upvotes: 0
Reputation: 45670
You could e.g. use imagemagik, see http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=16177
Upvotes: 0
Reputation: 1371
I don't have the time to go into detail now, but I can outline the process for you:
Loop through the images
(NB: this is probably a very naive way to do it and there is loads of optimisation possible, but it should be a start)
Upvotes: 0