Institute of Microbiology

R - Focus

>> Focus >> Focus

A new window is opened. This window allows establishing the settings for recognition of images out of focus.


Focus problems are common with automated microscopes. Enhanced CellClassifier can recognize out of focus images and exclude them from further analysis. We use information from the CellProfiler module MeasureImageGranularity. In this module several rounds of image deconstruction and reconstruction are performed. After this, the difference between original and processed image is calculated. For images out of focus and for images with very little signal (for instance few nuclei) the difference after deconstruction and reconstruction will be small, for images with high contrast, the difference will be big.

An image will be randomly selected, and two channels of this image will be presented: channel 1 in the upper left corner, channel 2 in the upper right corner. The filenames are displayed below the channels. The diagram in the lower left corner displays the image granularity as a function of the number of nuclei (images with more nuclei tend to have a higher image granularity). The values for the current image are a blue filled square. Images trained to be in focus are open black squares, images trained to be out of focus open red squares.

Image Selection

Use the popup-menu below the images to select the images you want to display

Prediction window

This window displays either "In focus" or "Out of focus". Generally if the blue button in the diagram is above the line, the image is predicted to be in focus, otherwise out of focus. Adjust the "Slope" and the "Offset" of the blue line to make the predictions fit the data.

Focus and No Focus

Buttons are located in the middle of the image. You can decide, whether this image is in focus or out of focus. Enhanced CellClassifier memorizes this information.

Slope and Offset

With the right settings of the MeasureImageGranularity module, images in focus can usually be separated from images out of focus by a single line. Please type the slope and the offset of the line to achieve optimal separation.

Note: in this release of Enhanced CellClassifier there is no automatic fitting of this line.


Options: "Above" or "Below". In most cases, out of focus images have less focus objects and a lower image granularity. Therefore, the blue line separating in focus from out of focus images points from the lower left to the upper right in the diagram; out of focus images would be below this line. Therefore, the default value for the direction is "below". If "above" is chosen, objects above the blue line are labeled out of focus.

First Value and Maximum

The MeasureImageGranularity module produces 12 different values for the granularity spectrum (for 12 different rounds of image deconstruction and reconstruction with the standard settings). Depending on the application, it is either the first of these 12 values or the maximum that separates best images in focus from images out of focus. Please try both possibilities and compare the resulting plots.

Saved Measurements and Calculated Measurements

Enhanced CellClassifier uses the CellProfiler measurements saved in the CellProfiler-output file. If no acceptable separation between in focus and out of focus images can be achieved, it is worth trying new settings of the MeasureImageGranularity module.

If the user selects "Calculate measurements", the image granularity will be calculated after the images are loaded. Thereby, different settings can be tried directly in the current window without re-analyzing the data by CellProfiler. If the user selects "Saved measurements", the granularity values from the CellProfiler output files will be used.

After changing this checkbox, Enhanced CellClassifier asks, whether the images already trained should be recalculated or the information discarded. Recalculation might take some seconds or minutes, since all trained images will be reloaded and recalculated.

Change Settings

This option allows changing of the settings of the MeasureImageGranularity measurements; please check the CellProfiler-manual for a more detailed description. In our experience it is useful to change the subsample size and the size of the structuring element.


1) This button is only active if "Calculate measurements" is activated.

2) After changing the settings, Enhanced CellClassifier asks whether trained images should be recalculated. Recalculation will take a small amount of time but avoids another round of training.

Measure Image 1 and Measure Image 2

When the option "Calculate measurements" is selected, focus measurements (granularity measurements) are calculated for each image after loading. Calculations either refer to channel 1 (shown left on the Focus window) or channel 2 (shown right on the Focus window).

Navigate to image

>> Navigation >> Navigate to image

All image filenames are displayed. The user can now directly select an image. This facilitates finding good focus settings if certain wells are known to be out of focus.

Random, Next

After pressing "Focus" or "No Focus", another image will be selected and displayed. This new image will either be randomly selected (from images which have not been displayed in this session) or will be the image following the currently trained image.


Closes the Focus window and returns to the main program.

CC will ask, whether the current focus settings should be kept. If the user answers yes:

Will be stored and used in other CC windows.

Note: The "Calculate" mode is not available in the CC "Main window" or "Generate Excelfile" window. If the current saved granularity measurements are not helpful, but better settings have been found with the calculate module, the CellProfiler settings should be changed and a new round of image analysis started. 


Wichtiger Hinweis:
Diese Website wird in älteren Versionen von Netscape ohne graphische Elemente dargestellt. Die Funktionalität der Website ist aber trotzdem gewährleistet. Wenn Sie diese Website regelmässig benutzen, empfehlen wir Ihnen, auf Ihrem Computer einen aktuellen Browser zu installieren. Weitere Informationen finden Sie auf
folgender Seite.

Important Note:
The content in this site is accessible to any browser or Internet device, however, some graphics will display correctly only in the newer versions of Netscape. To get the most out of our site we suggest you upgrade to a newer browser.
More information

© 2015 Microbiology ETH Zürich | Imprint | Disclaimer | 23 December 2009