Bologna University/Image Acquisition and Elaboration


Image Acquisition

Using the experimental set up illustrated here, we obtain short film segments of our fluorescent bacteria; then, with an apposite software, we extract several frames from each of them. Examples of images we get are shown below.


Image Elaboration

Since we need to know how much of the total image area is occupied by bacteria, we process the images with our segmentation algorithm implemented in Matlab.

Here are the processing phases:

  • the RGB image is read and the green channel is extracted;
  • a morphological top hat filtering is performed on the grayscale image;
  • by means of an adaptive threshold, the image is tranformed in a binary one;
  • the distance between every point and the nearest black pixel is calculated;
  • on this last image the watershed algorithm is applied: every pixel is assigned a label, depending on the segmentated region it belongs; then, every labeled region is represented with a different colour, as in the images shown below;


  • the area of every segmented region is calculated, checking that the summation of these areas (including the background) balances the image total area;
  • two complementary matrices are created:

-ImageWithOutBackground, containing the intensity positive values corresponding only to pixels recognised as bacteria, with zeros elsewhere; -ImageBackground, which contains the intensity positive values of pixels recognised as background, with zeros as other entries;

  • with a summation over all the ImageWithOutBackground matrix' entries, the total intensity is obtained;
  • dividing this value by the total bacteria area, the output is the normalized intensity we use to compare the fluorescence of different kinds of bacteria.