Opencfu, User Manual: Quentin Geissmann, Department of Animal and Plant Sciences, University of Sheffield, Website

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

OpenCFU, User Manual

Quentin Geissmann,
Department of Animal and Plant Sciences,
University of Sheffield,
[email protected]

website

May 14, 2012

Abstract
OpenCFU is a completely open-source lightweight application de-
signed to enumerate clustered circular objects such as bacterial colonies.
It can handle digital pictures as well as live stream from a video de-
vice/webcam. OpenCFU is cross-platform, fast, reliable and allows
the user to implement intuitive filters. A video demonstration is avail-
able here.

Contents
1 Installation 2
1.1 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 OS X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 The interface 3

3 Selecting a mode 4
3.1 Using images . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1.1 Recommendations . . . . . . . . . . . . . . . . . . . . . 4
3.1.2 Loading images . . . . . . . . . . . . . . . . . . . . . . 4
3.2 Using a video device . . . . . . . . . . . . . . . . . . . . . . . 5

1
4 Save results 5

5 Mask 5
5.1 Auto detection of circles . . . . . . . . . . . . . . . . . . . . . 5
5.2 User defined circle . . . . . . . . . . . . . . . . . . . . . . . . 5
5.3 User defined tetragon . . . . . . . . . . . . . . . . . . . . . . . 6

6 Threshold 6

7 Filters 6
7.1 Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
7.2 Hue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

8 Known problems 7

9 License 7

1 Installation
OpenCFU is primarily developed under Linux1 . Even if the software will
perform better under this platform, a Windows version is available (and a
MacOSX one will be compiled at some point).

1.1 Linux
The best is to compile your own version. With the folowing instructions it
should be fast and straitforward:

• First, install the developmental version of gtkmm-2.4 from the reposi-


tory. For instance, in Ubuntu:
sudo apt-get update
sudo apt-get install build-essential libgtkmm-2.4-dev

• You also need to install OpenCV-dev (2.3 or higher) as explained here.

• Download the last OpenCFU version from the website.

• Then in the terminal (assuming you are in the same directory as the
downloaded archive):
tar -xvf OpenCFU-xxxx.tar.gz
1
Linux is a productive and free operating system very suitable for sciences. It is nowa-
day very easy to install some distributions and I encourage you to do so.

2
cd OpenCFU-xxxx/
Where xxxx is a version number.
make
Finally,
sudo make install
will install OpenCFU on your system.

1.2 Windows
Simply execute the setup available for download.

1.3 OS X
Not yet available.

2 The interface

3
The interface contains two parts: the panel at the left and the image at the
right. The panel displays information about the data being processed and
allows the user to change some processing variables such as mask, threshold
and filters. The main function of the image is to immediately show the user
the consequences of different sets of defined variables. Its other purpose is
to allow visual confirmation of the processing result. Each counted colony is
circled and one can also zoom in the image using the mouse scroll.

3 Selecting a mode
It is possible to work either from a list of pre-existing images or to use a
video device and count objects in real time. Using video capture can be
advantageous as it removes the necessity of taking a picture of each plate
before counting the colonies.

3.1 Using images


OpenCFU supports usual image formats (i.e. jpeg, png, tiff, bmp and
others).

3.1.1 Recommendations
The general recommendations concerning image acquisition and processing
apply equally to OpenCFU:

• Avoid out-of-focus and over-exposed images.

• Try to maximise the contrast between background and objects.

• Ensure no writing or dust is present on the field.

• When possible, work with raw images (compression such as jpeg can
generate artefacts).

3.1.2 Loading images


To load images, click on “mode” (which is initially set to “standby”) and
choose the “Image file” option. An interactive dialogue should appear so the
user can browse his folders and select multiple images. If a new list is to be
loaded later, it can either replace the current one or be appended to it.

4
3.2 Using a video device
OpenCFU can also analyse frames from video devices such as webcams. After
choosing this mode, the user is asked to define which device to use (if several
are available). The highest possible resolution is taken by default.
Using a video device such as a webcam can be problematic with certain
illuminators which generate flickering. To reduce this issue, the user can
select a value between 0 and 100 of “anti-flickering”. High values make the
capture more robust but less responsive.

4 Save results
A summary of the results can be written in a csv (comma separated) file.
Each line contains the image name, the number of counted objects and the
surface analysed (in kpixels), respectively. By clicking on “Select result
file. . . ” its location can be defined. Then, with each click on “Write” or
“Write and next”, the file is written and saved. Clicking only on “next” does
not save any data. The user can write a name for each analysed image, but,
by default, the name in the result file will be the same as the image name.
In video capture mode, the default image names are “Image-1”, “Image-2”,
“Image-3”. . . OpenCFU does not append an extension “.csv” to your result
file; you have to write the complete name including the extension yourself.

5 Mask
By using a mask, the user can analyse only the relevant part of the image.
It is sometimes necessary to apply a mask to images such as pictures of Petri
dishes. Currently, OpenCFU proposes three types of mask.

5.1 Auto detection of circles


If this option is selected, the program will attempt to find a large and circular
object (i.e. a Petri dish) and use is as a mask. If needed, the margin can
be adjusted. Although this process is fairly robust, it is not flawless and a
“wrong mask” can sometimes be generated.

5.2 User defined circle


The other alternative is to define a mask manually. If this option is activated,
the user will simply have to click consecutively on three points in the image

5
and OpenCFU will calculate the circle matching them.

5.3 User defined tetragon


In the same manner, the user can choose to apply a polygonal mask. When
this option is selected, a mask can be defined by clicking in the four corners
of the desired tetragon.

6 Threshold
OpenCFU assumes that the objects to count are darker than the background.
Otherwise, the “Inverted” box must be ticked. In either case, the “Threshold
value” can be adjusted with the same consequences: increasing it will result
in losing weakly contrasted objects, while reducing the threshold enhances
the sensitivity. Whilst changing the threshold, a short preview is displayed;
instead of the usual image, the detected objects will appear in blue.

7 Filters
In its current version, OpenCFU does not give access to the features of each
counted object (which are however internally calculated). Instead, it allows
the user to apply filters.

7.1 Size
The counted objects are assumed to be circular and consequently their size
can be summarised by their respective radii. The user can simply define a
range of size, in pixels, in order to keep only the relevant objects.

7.2 Hue
It is also possible to discriminate between objects according to their colour/hue.
When changing this filter, the image will display the average hue of the de-
tected objects.The range of hue selected is also visually indicated by a spec-
trum.

6
8 Known problems
Going back and forward from “standby”(or “image”) to video mode will
increase the memory requirement of the program. This bug depends on
OpenCV and is likely to be fixed soon.

9 License
OpenCFU is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
OpenCFU is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABIL-
ITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License General
Public License version 3.

You might also like