You are here

How can I calculate pixel intensity in an ROI?

I'm looking for suggestions on how I can use GIMP to calculate pixel intensity in an ROI. This kind of function is frequently used in gel electrophoresis analysis, where the software will identify gel bands and calculate relative concentration based on pixel intensity. I'm actually analyzing microscope images, but the principle is the same. I need to calculate the average intensity of pixels within a specific region. Any suggestions?

I would also be very interested in what you mentioned. Would be glad, if someone has an idea. greets, Benjamin

What I could think about a stupid way to do it is by means of histogram, as follows: 1. Highlight a blank lane of gel or background and check the limits of pixels in the histogram, say 170-255. The smaller figure will be used later. 2. Move the same rectangular mask to a lane containing one band. Redo the histogram. This time you should see more pixels distributing on the left side of the histogram, i.e. smaller number of the scale. 3. Move the right limit to 170, the number obtained in step 1 which serves as the lightest gray color to be discarded. 4. Move one step more to 171, and you should see the pixel number changed. Record the difference. 5. Subsequent move of the right limit until all have counted. (Up to this step I think I'm stupid enough to do this!) 6. Here comes the core: for 171, say there is 5 pixels. The "quantity of protein / nucleic acid" at this particular level of gray corresponds to 5 x (255-171+1) = 425. 7. Calculate similarly for different gray levels having pixels, and add them all. This would be the final "band intensity". Here comes to my problem that how could we obtain a list of numbers of pixels at particular gray level for such calculation, but not by moving the limits one by one with my own hands. My way is not doable for many bands on the gel.

Can you provide a sample image and what you are looking for as a result? This should be easy enough to script. -Rob A>
Subscribe to Comments for "How can I calculate pixel intensity in an ROI?"
Get Plugin Updates