Quantifying brightness

Hello, thank you for replying

I’m not sure if I did what you meant, that’s what I ended coming up with.

Is this right? Now I’m unsure on how to interpret what just happened

What do you mean by brightness?
Do you mean, you want to look at the white streaks in the image or the black streaks?
or are you interested in intensity of the white streaks?

Check this out: https://www.unige.ch/medecine/bioimaging/files/1914/1208/6000/Quantification.pdf

1 Like

I’m sorry. I should have been clearer on what I ment by thresholding. In Image there are two types of threshing. One for color in which case you should use RGB color space instead of HSB and for binary (grey scale) you should use the regular threshold in the adjust category. Also in plugins there is a trainable segmentation you could use.
As to what happened, because of the white of the background the settings you used eliminated some of you lighter pixels.
Since you have several shades of brightness I suggest you use the trainable segmentation. It is simple to use and will give you the data you are expecting.
Again I apologize for not being clearer. So try again, just don’t give up.


Sorry again, I got interrupted. But if you just want the numbers at each level of intensity you should just use the square tool to surround your image then go to analyze> historgram. When you list the output it will give you the numbers at each intensity.

1 Like

Strictly speaking: the answer to that question is Histogram. Make your Image > 8-bit and perform Analyze > Histogram. Press the List button to have the histogram as text. Select the "Histogram of " text version window, Select All, Copy and you have your data ready for a spreadsheet.

All other answers above are about segmentation. Maybe that is what you want, without having aksed for it, but the bare bones answer to your question as quoted here is “Histogram”. Gray scale histogram. All disclaimers about reproducibility of the image recording setup apply, of course.


thank you everyone, I did it both ways, histogram and what pr4deepr suggested, and both results were actually very similar. I ended up with those values

I got two more questions: Is there an unit for them?

And, if I’m interpreting this correctly, there is no difference between any of the plates, including the first two I posted, they are both “as bright”, given the stdev overlap, correct?

1 Like

You’ve essentially measured the mean intensity of the whole image in each case.
Mind if I ask what these images are and what you are looking for? Are you interested in the white streaks, black streaks, % of black on white or vice versa?

You can designate it as a.u. or arbitrary units as you are looking at the mean gray value.
@smith_robertj @eljonco, correct me if I am wrong about this.

In reference to your results, as @eljonco said, make sure your images are all recorded using the same setup: exposure, lighting and so on. I am not sure what these images are, but you can use a control, i.e., which does not have any of these streaks or artefacts? It does look like there is no difference.


As @pr2deepr says, arbitrary units could be a means of expressing the (average) intensity. This presumes a linear behaviour of the subject, ie. twice the intensity means twice the amount of matter you are interested in.

In science, it is common to calibrate your measured values against known quantities. Suppose the intensity of your images stems from fluorescence, you should have a dilution series that you measure with the same setup. Then you use the ‘calibrate’ function of ImageJ to link known concentrations to measured values.

Suppose you have images of snowfall, then intensity is most likely not linear; once a patch gets covered with snow, the intensity turns from dark (rock) to white (snow) but the intensity of snow will not change wether there is a mm or a meter of snow covering the rocks. The most you can expect from this type of measurement is the percentage area covered.
I can imagine for cloud imaging similar non-linear behaviour is present. In densitometry the relationship is a log scale, still useful if you calibrate properly.

So a lot depends on what actually is in your images. If you don’t leave us in the dark about the nature of your images, we might be able to give more useful information.


Thank for the thoughtful responses! Those are S. aureus cultures, grown in a inhibitory media and a non-inhibitory one. I don’t have a lot of experience with microbiology, and this is basically homework. Because I didn’t want to waste material on just an assignment, I improvised by measuring growth with ImageJ. I assume the growth is going to be inversely proportional to the the light that goes through the plates -as bigger growth leads to thicker layers. There are, of course, two problems: the plates had slightly different thickness of solid media (see L/48h and L/24h, which are supposed to be growth free plates) and I don’t have something to calibrate it to (as I have no idea how much light a.u. relates to number of bacteria grown). However, I supposed this second problem is ok, as long as I could see a difference between plates with inhibition and without it (in which case, I didn’t).

The pictures were taken with the exact same distance and lighting conditions though, so I’m not worried about that, the camera and the setups were done by a professional photographer

For your control, you could have a plate with just the agar/media which gives an idea of what the background is. The black bit looks like the S. aureus streaks/colonies. So, the best way to measure the growth will be to measure percentage area of the black part on the whole plate (Area fraction). This can be done by Thresholding and segmentation. If you have a plate with no colonies, you can figure out what the best thresholding is.

As far as I can tell, you don’t need to correlate a.u. to number of bacteria. Its a yes or no, hence the thresholding and segmentation.

I’m assuming these are spread plates and not ‘streak’ cultures. Won’t make sense to quantify this on streak cultures as there will be a lot of variability.

1 Like

those are my plates with no inoculation (24h and 48h ones) which are pretty bad since they seem to have different volumes of solid media (they are the L/48H and L/24H plates on the graph I posted above)

How do I do the thresholding?

Oh and yes, those are spread plates! As I know, it is not usual to quantify spread plates either is it? Hence why I’m doing this improvisation with ImageJ!

The background is fairly uniform. On second thought, you may not need the blank agar plates.

  • Convert your image to 16-bit
  • Image->Adjust->Threshold
  • Make sure dark background is
  • (Default threshold seems to work well) If not, adjust it till the bacterial growth appears white and the rest of the picture is black (background).
  • Click Apply
  • Go to Analyze-Set Measurements-> Only Tick Area Fraction
  • Go to Analyze->Measure

The %area that comes up in the Results Window will be the percentage area of the bacterial growth in the whole picture (even the edges of the picture outside the agar plate). This may not be ideal as the picture dimensions can change.

If you want to be accurate (which I would recommend), you can draw a circle around the agar plate after thresholding and then click Measure. It will express it as a percentage of bacteria or white pixels within the circle rather than the whole image. This way even if the picture dimensions change, as long as you express it as percentage area of the agar plate you should be fine. The only issue is that you have to make sure you are consistent with the circling of the agar plates.

1 Like

Amazing! thank you very much! Do I use the auto threshold for all images though (because it gives me a different value on each image)

By the way, would you mind if I put your names in my acknowledgments list of my assignment?

1 Like

With the threshold, adjust the sliders till you are confident that all bacterial growth is selected. The autothreshold may work for most, but not all images.

I think its ok… Not sure if there should be anything to consider… Regardless, appreciate the acknowledgement!

Apart from the area apparently being enough to get your measures, this remark leads to the explanation of log relation in densitometry (as that is what you essentially describe: the light taken away by a certain concentration of dye/solids/bacteria).

If a single layer of bacteria takes away e.g. 50% of the light, in a 2- layer situation the second layer will also take away 50% of its incident light. But the incident light to the second layer was only 50% of the intensity the light incident to the first layer. So the amount of light getting through is 50% of 50%, so 25%.

In the above explanation every layer of bacteria a photon has a 50% chance of passing through, or getting absorbed.

Another layer of bacteria will take away yet another 50% so you are left with only 12.5% of the original incident light. See there the log relation.


So, if it is transmittance you want to measure, you first need to transform your images to OD. Otherwise your data is not linear. One of the ways for such transform is OD=-log(Itransmitted/Iincident)
I transmitted is simply the pixel value , while the incident light may be estimated differently (maximal grey value of the empty background, average grey value of the background or (my personal favorite) modal value of the background). The mathematical operation can be implemented via Processing>Math>Macro or be sequential division,log transform and inversion. Don’t forget to transform to 32 bit before that.


@eljonco and @Stoyan_Pavlov raise very good points. It also illustrates why analysing agar plates like this may not necessarily be the best practice for accurate quantification. This especially applies if your agar plates are over confluent (i.e., multi layered). I think that is perfectly fine to use the extent of area covered by the bacteria as a measure of bacterial growth for initial assessment.

A better experimental design could have been to make a standard curve of some sorts and see if there is any linearity:

  • Perform serial dilutions
  • Make pour plates with each serial dilution
  • Perform colony counts using the normal technique (counting colonies from the plate where colonies are distinguishable) and establishing what the bacterial count/mL is for the original sample (background
  • Perform ImageJ analysis on the agar plates and get area fraction.
  • Plot area fraction against CFU/mL for each serial dilution, and check for correlation.

You may have to do this for 24 hour and 48 hour as well. This will establish

  • if there is any linearity?
  • and if so, which dilution ranges have the best linearity with CFU/mL

Again, am sure there are some issues with this method, but making sure the plates are not overconfluent is a good way to negate the problem with multilayered growth. Again, it depends on bacterial strain I think…

As this is a assignment, I’m not sure how much more you are supposed to do, but use the points raised by the others as criticisms of your method. To account for some modicum of error, you could express your treated plates as percentage of control…

I think doing this in liquid media and measuring OD is the best way for accurate quantification.


Excellent points @pr4deepr.

IF you are going the OD way, don’t forget that this also involves checking the proper monochromatic wavelength used for measurement; don’t use white light.

Suppose the bacteria only absorb the red part of the spectrum, the OD only should be measured with the complementary light, that is green. Otherwise only part of the incident light spectrum is taken away and less precise (if at all correct) measurements will result.

Ideally, you want to measure at the wavelength where difference in absorption the bacteria and the medium is largest: the maximum absorbance for the bacteria, minimum for medium. Given that your “empty” dish is yellow, its complementary colour is not the best choice for illumination.


Thanks for pointing that out @eljonco ! I was just about to update my answer to emphasize on this.
As a workaround one could use only the Green channel of an RGB image, but of course using a filtered light or even narrow band with known wavelength parameters is the best decision.

1 Like

A post was split to a new topic: Analysis of changing fluorescence over time