1.Introduction

Home | 1. Introduction

1. Introduction

medeaLAB Count & Classify is an image analysis system for color or grayscale images which is able to detect, count, measure and classify objects.

Due to its flexibility it is used for a wide range of applications in industry and research.

Our website http://www.medealab.de will give you an overview of medeaLAB applications.

medeaLAB Count & Classify works with all kinds of image sources:

Image files in various formats, analogue and digital video sources (video cameras, VCR, FireWire-, USB- or Ethernet-cameras), still image cameras (remote control of Canon™ and Olympus™ cameras), scanners (TWAIN interface) or video files.

medeaLAB Count & Classify may be combined with macroscopic and microscopic optics (camera mounted on microscope) due to its calibration capabilities (even perspective transformation). Processed images may be stored in various formats for documentation purposes (BMP, TIFF, GIF, PNG, JPG, JPEG2000 etc.).

Configuration of thresholds and search parameters is easily done using interactive and automatic methods, object detection is performed automatically. For each object many parameters are evaluated: area, form factor (roundness), mean gray/color value and variance, center of gravity, main axes, convexity, orientation, length of appendices etc.

For image enhancement medeaLAB offers many user configurable filter functions like smoothing, Laplace-, Median-Edge-filters etc.

All measurements may be carried out repeatedly based on a time schedule or external triggers in order to monitor dynamic changes of e.g. object area (growth rate) or color (decay).

Features for teachable classification may be chosen from a wide range of object parameters. All measured values and classification results are displayed in spreadsheets and may be exported to Microsoft Excel™ automatically.

The integrated database allows easy management of result data and custom report generation.

Our imaging system also offers many interfaces for input and output:

Recording data from external sensors via AD/DA converters, data exchange with laboratory management systems (OPC, ODBC, TCP/IP) or integration with PLC systems (Beckhoff™ Automation components, Siemens Simatic™).

© 2010 Medea AV GmbH


2.Installation

Home | 2. Installation

2. Installation

Minimum system requirements are:

- Personal Computer with Pentium 4 or better CPU

- Main memory: 256 MB

- Free disk space: 200 MB

- Operating system: Microsoft Windows 2000™, Windows XP™ or Windows Vista™.


2.1. Hardware and driver installation

The steps of hardware installation will depend on your system configuration.

If you use an analog video camera, it will be necessary to mount a Matrox™ framegrabber board to a PCI(e) slot in your computer. In case of FireWire or USB cameras the standard PC ports are used and only driver installation may be necessary. For digital still cameras using standard Windows interfaces no driver installation is necessary.

Please refer to specific “Installation Notes” delivered with your system.

In most cases the system will be delivered ready to use and no hardware configuration is necessary unless the whole system must be reinstalled. Please contact the medeaLAB Support Team before you try to reinstall the system on a PC.

Important information regarding all types of cameras:

No matter if the camera is switched on or off, never aim at the sun or other extremely bright objects. Otherwise blooming or smear may be caused.

Clean the CCD faceplate and / or lens very carefully. Do not clean the CCD or lens with strong or abrasive detergents. Use dry air, lens tissue or a cotton tipped applicator and ethanol.


2.2. Program installation

Important:

To install the software administrator rights are essential.

To install the medeaLAB Software put the installation CD into your drive. The medeaLAB setup starts automatically, otherwise start the installation by double clicking on the file setup.msi in the CD root directory. Choose “Typical” setup and follow the instructions.

Before you can use the medeaLAB software, you should also install all necessary drivers (see 2.1).

After installation you may have to restart your computer.


2.3. Registration

When starting medeaLAB for the first time the message “medeaLAB is not registered” appears. You may continue to work without registration for a period of 30 days (button “Continue unregistered”) or register your copy of medeaLAB Count & Classify choosing the “Register” button:

medeaLAB is not registered

For online registration you will need a valid email address and access to the internet. Follow the four steps in the “Register medeaLAB” dialog:

It is more convenient to use the computer where medeaLAB is installed for registration via internet and email, because you may easily copy and paste the ID number, WWW URL and registration code, but it is also possible to transfer the data to another computer (e.g. stored in a text file) and the registration information you receive back to the medeaLAB computer.

Important:

Registration data are only valid for the current Windows installation and the hard disk on which medeaLAB is installed. You may use the same registration code only for reinstalling medeaLAB under the same Windows installation at the same location (drive) as before. Registration information is stored together with all program settings. Therefore it is strongly recommended to save a backup copy of all program settings (see chapter “Maintenance”).


2.4. Basic software configuration

Before working with the program you may select paths for storing image files and exported data (see chapter “Maintenance” for default locations). After the program has started choose the menu command System / Options.

In the System Settings dialog edit the “Images” and “Data” paths:


3.Video and image settings

Home | 3. Video and image settings

3. Video and image settings

To load an image into medeaLAB Count & Classify you may initialize a live video source and take a snapshot, open an image file from disk, paste an image from the clipboard (menu option Edit / Paste As New Image) or capture an image via the TWAIN interface (menu command File / Acquire) from a connected digital camera or scanner (selected by menu command File / Select Source…).


3.1. Initialize live video

First you have to select a video source in the list on the toolbar:

Currently the following video sources are supported by medeaLAB (besides image files and TWAIN drivers):

- Video file: File in AVI format

- Camera (WDM): Digital video camera with Microsoft Windows® compatible WDM driver (e.g. USB or FireWire camera)

- MIL: Video source accessed through the Matrox Image Library (MIL), e.g. analog or CameraLink cameras

- Canon Powershot: digital still image cameras (Canon Powershot series)

- Canon EOS: digital still image cameras (Canon EOS Digital SLR series)

- Prosilica GigE: Prosilica Gigabit Ethernet cameras

To initialize the video system choose either Video / Initialize in the menuor click InVideo on the toolbar:

After initialization the live video will be displayed in the camera window. You can switch between the live mode (Live = continuously grabbing video frames) and the snapshot mode (Snapshot = freeze video) in the Video menu.

Toolbar: continuous Continuous image grabbing (live video) snapshot Snapshot (freeze video)

Notes:

Always select the live video mode to focus the image or adjust illumination.

If you prefer to work using the medeaLAB database (see chapter “Data management”), open the database before you initialize the video source. This way the video view will be displayed within the main database form.


3.2. Video options

Before working with the system for the first time or if you have changed the investigation object you should adjust the video settings. Choose menu command Video / Options and click the button Device Options. To view the result of the changes immediately the video system should be in live mode (continuous grabbing mode).

The options available depend on the imaging device connected to the system. Please refer to the appendix of this manual for a description of all available adjustment options.

In the Video Options dialog you may also record video sequences to a file (with optional video compression) using the buttons Capture Options and Start Capture.

If “Video File” is selected as an input source you will have to choose a video input file below Input File.


4.Setting of system parameters

Home | 4. Setting of system parameters

4. Setting of system parameters

To ensure optimal image processing by the medeaLAB system you should perform pixel calibration (4.1.), set the gray / color thresholds for object detection (4.2.) and object feature filters (4.3.).


4.1. Pixel calibration

1. Freeze video if in live mode (menu: Video / Snapshot, toolbar: snapshot ).

2. Choose Options / Calibration from the menu. The mouse cursor will change to crosshair shape.

3. Accurately draw a line between two points in the image of known distance (e.g. cell of known diameter or a millimeter scale) while keeping the left mouse button pressed.

4. When you release the mouse button the Calibration dialog will appear.

5. Use the Calibration dialog to transform the distance in pixels to a metric unit. Choose the relevant metric unit (µm, mm, cm). Type the length of the line you have drawn (e.g. 100 µm) into the right field below “Ratio”. For automatic calculation of concentrations (e.g. cells/ml) you also have to set the depth of the chamber or the fluid level. Type the depth (e.g. 10 µm) into the field “depth” of the calibration dialog.

6. Check size and area values of your investigation objects for plausibility (measured by e.g. Image / Search Object s after all adjustments in this chapter are done). If you get wrong values please try to repeat all steps of the pixel calibration.

Note:

To achieve good concentration results the field of depth of your optical system (range in which objects are in focus) should correspond to the chamber depth. If you use a chamber that is deeper than the field of depth of the optics, objects outside that field will not be visible clearly and therefore may be not counted by the medeaLAB system. This would result in concentration values being to low. You may compensate this effect by entering the field of depth of the optics rather than the chamber depth in the “depth” field of the calibration dialog.


4.2. Setting of the gray level or color intensity thresholds

There are two ways to adjust the gray level or color threshold values for object segmentation in the medeaLAB system:

- Automatic adjustment

- Manual adjustment using preview

In most cases you will only need the automatic method. It is also a good starting point if you want to do fine-tuning using the manual method.


4.2.1Automatic adjustment

Home | 4. Setting of system parameters | 4.2. Setting of the gray level or color intensity thresholds | 4.2.1 Automatic adjustment

4.2.1 Automatic adjustment

1. Make sure that you have selected live video mode, your investigation objects are in focus and well illuminated.

2. Take a typical snapshot of your objects from the live video or load an image from file or TWAIN source.

3. Choose the Options / Thresholds menu command and indicate whether the Object Appearance is Bright (against a dark background), Dark (against a bright background), Middle (against a dark and bright background) or Dark/Bright (background is in the middle). The correct setting is important because it is the only clue for the system which objects it should search for.

4. Click the Automatic button to set the thresholds automatically (with the parameter Offset the size of objects is increased after automatic adjustment, because the automatic method normally leaves the objects too small).

5. Click the Preview button to check the binarized image in the camera window. Your investigation objects should appear black on white background in preview mode:

Preview mode is ended by clicking the Preview button again.

Notes:

If you use a video image source, you may also watch the video images being binarized continuously: Just click the Pseudo Live button in Preview mode.

The automatic adjustment is done using the pixels in the current ROI (region of interest) area or the whole image if no ROI is set. For more information about regions of interest see “Selection of image regions” (chapter 5) below.


4.2.2Manual adjustment

1. Make sure that you have selected live video mode, your investigation objects are in focus and well illuminated.

2. Take a typical snapshot of your objects from the live video or load an image from file or TWAIN source.

3. Choose the Options / Thresholds menu command and indicate whether the Object Appearance is Bright (against a dark background), Dark (against a bright background), Middle (against a dark and bright background) or Dark/Bright (background is in the middle).

4. Click the Preview button to check the binarized image in the camera window. Your investigation objects should appear black on white background in preview mode. Clicking the button Pseudo Live in the preview mode shows the binary image in a live simulation (available only for video input sources).

5. If necessary, adapt the thresholds by using the [image] buttons for shrinking or increasing the object area in preview mode. These buttons work on all three color channels and change the threshold in steps of 5 units.

6. You may also do fine tuning in steps of 1 unit with the arrow buttons to the left and right of each color channel.

Example 1:

If Object Appearance is set to Dark, you can adjust only the lower levels and the high level sliders are disabled (see left picture below), because only the lower thresholds are used. Set the lower level to 20 for all channels (Red, Green, Blue).

Result: The system will count all pixels with values greater or equal 0 and less or equal 20 for all channels as object pixels.

Example 2:

If Object Appearance is set to Bright, you can adjust only the high levels and the lower level sliders are disabled (see right picture below), because only the high thresholds are used. Set the high level to 149 for all channels (Red, Green, Blue).

Result: The system will count all pixels with values greater or equal 149 and less or equal 255 for all channels (maximum value) as object pixels.

Object Appearance: Dark Object Appearance: Bright

Additional options:

Default: The Default button sets all low levels to 80 and all high levels to 240.

Learn Object: If the Learn Object mode is activated-you may adjust the thresholds automatically by moving the mouse cursor over objects with the left mouse button pressed. It is important not to touch background pixels during this mode.

Learn Back: If the Learn Back mode is activated-you may adjust the thresholds automatically by moving the mouse cursor over the background with the left mouse button pressed. It is important not to touch object pixels during this mode.

Expert: Access to the Threshold Expert Settings dialog, where you may store thresholds to a text file or load thresholds from a text file.


4.3. Using object features for identification and discrimination

Object features are describing e.g. area, shape, size and homogenity. They are calculated continuously during image processing. Using filters for these object features, contaminations may be excluded from the analysis by setting the upper and lower limits appropriately. For setting choose Options / Form Parameter from the menu:

Object parameters:

Area: area of an object calculated on the base of its contour in calibrated units.

Formfactor: Ratio calculated from object circumference and area, expressing the shape or

roundness (1.0 means perfect circle), without unit.

Length: length of object (longer main axis) in calibrated units.

Width: width of object (longer main axis) in calibrated units.

Color (Avg.): Mean color value of all object pixels.

Homogenity: uniform distribution of color/gray values inside object (calculated from variance values), without unit.

Convexity: ratio of object area and area of its minimum convex hull polygon, without unit.

Appendix: presence of processes (e.g. flagellum), unit is sensitivity of detection. Increase the sensitivity if not all of the objects having an appendix are detected.

Exclude:

Hit Boundary: If this option is checked, objects are not counted if their contour hits the border of the image or ROI (region of interest).

All object feature filters may be separately activated or deactivated using the checkbox in the column „Parameter”.

Edit the lower filter limit in the column “Min”, the upper filter limit in the column “Max” by clicking the left mouse button within the field. Both limits may be separately activated or deactivated using the checkbox in the “Action” column (to the right of the Min/Max column). The “Action” checkboxes are only visible in the current row (parameter “Width” in the picture above), in all other rows “+” is displayed if the filter limit is active and “-“ if not.

So with the settings on the above example screen only objects which meet the following conditions will be counted:

Area between 100 and 500 square units, formfactor above or equal 1.5, maximum length and width of 100 units, all other filters are switched off.

If you also want to evaluate the inner structure of objects, you may activate the following filters on the 2nd page (“Nucleus”) of the Formparameter dialog:

Object parameters:

Number of Nuclei: Number of nuclei (distinct regions) inside the object.

Cell/Nuclei Area Ratio: Ratio of cell area to the area of the nuclei, without unit.

Area: Area of nucleus in calibrated units.

Formfactor: Roundness of nucleus, without unit.

Color (Avg.): Mean color value of all nucleus pixels.

Homogenity: Uniform distribution of color/gray values inside nucleus (calculated from variance values), without unit.

On the 3rd page of the Formparameter dialog (“Parameter & Model”) options for contour analysis and five different object models are available:

Object parameters:

Holes: Subtract „holes“ (background inclusions) within objects from object area.

Isthmus Points: Identify constrictions and mark them.

Convex Analysis: Search object contours for convex segments and mark them.

Concave Analysis: Search object contours for concave segments and mark them.

Split Contour: Split contours into convex and concave segments thus creating new objects with results like aperture angle, endpoint distance, etc.

Cluster: Near objects are regarded as one (cluster object), depending on Maximum Distance.

Merge Contour: Objects cut apart by raster cell borders of raster ROIs will be merged if they meet several conditions.

Object Model:

Choose the method for segmentation which is appropriate to evaluate your objects:

Contour: Simple contour objects. Contours are the base for subsequent analysis.

Edge Object: Objects consist of corners connected by straight lines.

Ellipse: Contours are analyzed and fitted to ellipsoidal elements. This mode is used for approximation of plant leaves.

Skeleton: Objects are skeletonized, i.e. area is decreased until only a line remains (one pixel thick). Based on this skeleton object length and curvature may be evaluated. This option is best suited for measuring filamentous structures or fibers.

Contour Segment: Contours are divided into convex and concave segments, depending on Object Parameters above.


5.Selection of image regions

All image processing functions may be limited to selected image regions (Regions Of Interest = ROI). Depending on your field of application you can choose from six different ROI types:

Menu Image / ROIs: Symbol on toolbar:

Rectangle

Parallelogram

Ellipse

Free Hand

Ring

Extra ROI special ROI type (useful only in multiple camera configurations)

Delete active ROI

Note:

You may draw multiple ROIs in one image (see picture below). All ROIs are saved and automatically restored, if a new image is loaded.

How to… | Actions
…create a rectangular or elliptic ROI: | Press the left mouse button at the upper left position in the image window, hold it, move the mouse cursor to the bottom right position and release the mouse button there.
…create a parallelogram ROI: | Press the left mouse button at the first corner position in the image window, hold it, move the mouse cursor to the second corner and release the mouse button there. Then move the mouse cursor to the third corner position and press the left mouse button. The fourth corner is automatically determined from the position of the other three corners and the ROI is drawn (only if all corners are inside the image)
…create a freehand ROI: | Either draw the border of the ROI with the left mouse button held down or select several edge points of the ROI by clicking the left mouse button. Clicking the right mouse button afterwards will close the ROI polygon.
…create a ring ROI: | Same as Ellipse, the width of the ring is adjustable in the Region of Interest (ROI) Control dialog (menu Image / ROIs / Modify)
…select a particular ROI: | Click with the left mouse button in it. An active ROI appears highlighted by a hatched border.
…resize ROI: | Drag the small black squares on the ROI border with the mouse (only ROIs of type rectangle or ellipse).
…move ROI: | Click with the left mouse button inside, hold the button and move the ROI to the new position (only within the image)
…delete ROI: | Select the ROI, then choose the menu command Image / ROIs / Delete or press the associated toolbar button or press DEL on the keyboard.

In order to create multiple ROIs of exactly the same size or to modify existing ROIs you may choose the menu command Image / ROIs / Modify, which opens the Region of Interest (ROI) Control dialog.

Image with two ROIs (1: Ellipse, 2: Parallelogram) and the Region of Interest Control dialog

Elements of the Region of Interest (ROI) Control dialog:

Position x/y and Size width/height:

In these fields the position relative to the top left image corner and the size of the active ROI is displayed (in pixel) and may be modified (button Modify).

Angle:

Angle of orientation (only elliptic ROI)

Width:

Width of ring (only Ring ROI)

Raster:

Rectangular ROIs may be devided into columns (x) and rows (y) of grid cells. This is useful for evaluation of object areas in each cell (e.g. plant trays)

Border:

Changes of the parameters above must be confirmed with the button Modify.

Color:

Display color of ROI.

Change Position:

Move ROI using the arrow buttons. You may also use the arrow keys of the keyboard.

If „Select Active“ is checked only the active (highlighted) ROI will be moved. If „Select All“ is checked all ROIs will be moved simultaneously.

Add (off/on):

Using the „Add“ mode you may create new elliptic ROIs of the specified size in the image by simple clicking the left mouse button. This is useful e.g. to mark multiple positions for inspection tasks. Click the Add on/off Button to toggle the „Add“ mode (the button displays the current state).


6.Methods for preprocessing image data

Home | 6. Methods for preprocessing image data

6. Methods for preprocessing image data

© 2010 Medea AV GmbH


6.1. Digital filters

Apply a filter directly on the active image window by using the menu Image / Filters. Note that filter operations are executed only in the active ROI.

You may choose from various filter methods for image enhancement:

The menu command Settings opens the Filter Settings dialog, which allows you to determine e.g. the kernel width of the filter operation and the number of iterations (repetitions):

The Canny Thresholds are parameters for the Lines filter (= line detection using the canny algorithm)

Note:

If the size of the kernel increases, the filter effect (e.g. Soften = smoothing) increases.

But if the neighborhood considered is too large, blurring and other unwanted effects might appear in the image. In case of smoothing (low-pass filtering) the selection of kernel width is a compromise between reduction of noise and a low blurring effect.

The last filter operation may be cancelled by the menu command Edit / Undo.


6.2. Image integration

If your image source is a video (from file or camera) and you have to work with low light intensities (e.g. fluorescence or x-ray imaging) you will often face the problem that your objects have low contrast or the images have a lot of background noise.

In this case you may use the function Image Integration, which computes the sum or average of an image series. Select Video / Image Integration from the menu to display the Image Integration dialog:

With the above settings the pixel intensities of next 3 video frames will be sumed up and then image capture will stop showing the result image for further processing.

X-ray image of animal scull

Image enhancement after integration (addition) of 3 video frames


6.3. Separation of object aggregations (conglomerates)

Separation of adjacent objects by conglomerate cutting may be used as a preprocessing step before object measurements in order to increase precision of object count results.

You may choose between two different algorithms:

- Convexity defect analysis

- Watershed analysis

Select Options / Object Filter / Conglomerate Cut from the menu to display the Conglomerate cutting dialog:

Convex Defect Analysis: searches for possible locations to split objects depending on convexity deviations of contours.

Watershed: objects are split using the Watershed algorithm, based on the topology of the image (gradients).

Sensitivity: Range is 0 – 10 (10 means highest sensitivity).

Reduce sensitivity, if objects are split into too many parts.

Example 1:Conglomerate cutting using Convex Defect Analysis with sensitivity = 5 results in 15 objects

Example 2:Conglomerate cutting using Convex Defect Analysis on the same image with sensitivity = 0 results in only 12 objects


7.Basic steps for counting and measuring objects

Home | 7. Basic steps for counting and measuring objects

7. Basic steps for counting and measuring objects

Before executing measurements the following system settings (chapter 4) should be adjusted:

- System calibration (Pixel calibration)

- Gray level / color thresholds

You can only execute measurement functions of the Image menu, if an image window is active (click on the image window to activate it).


7.1. Counting objects using contour analysis

How to get an idea of how to set reasonable lower and upper form parameter limits for counting contour objects:

Activate only the checkboxes for „Area” and „Formparameter” in the Options / Formparameter dialog on the page „Object”. Make sure that no other object parameters are selected on the dialog pages.

Then start a measurement using the menu command Image / Search Objects. Object area and form will be listed in a table.

Count evaluation

The system will mark contours of all objects within form parameter limits in red, all others in green. In the title bar of the table window the number of objects counted is displayed. By clicking on a table row, the corresponding object in the image will be surrounded by a box. Vice versa, when clicking on an object in the image, the corresponding table row will be highlighted.

By this, get an impression of appropriate maximum and minimum area and “formfactor” parameter limits. With some tolerance, use the area and formfactor values occuring in the measurement to adjust the Min and Max columns of the Formparameter dialog according to your needs.

If unwanted objects are listed in the table (e.g. dirt or detritus) you may have to narrow the limits of your filter settings.

If some objects of interest are not listed, you may have to widen the limits of the filter settings.

Fine adjustment

Even if thresholds and filters are set appropriately, it might occur that individual objects are excluded from the analysis (thus, marked in green), whereas occasionally an unwanted object will be included (thus, marked in red). In these cases, click on one of the objects with your left mouse button (the object will be marked by a box), then click the right mouse button and select “Include Object” or “Exclude Object” from the menu. Based on your changes, the system will automatically adjust parameter limits.

If you want to separate adjacent objects, use the Conglomerate Cutting functions (chapter 6.3).


7.2. Counting coherent objects using blob analysis

Blob analysis will mark all object pixels and is suitable for measuring e.g. the total object area.

Start the measurement using the menu command Image / Search Blobs. The results will be displayed in a table.

Results of the Search Blobs function


7.3. Measuring area fractions within ROIs

This method counts all object pixels (within thresholds) in relation to ROI area. This is useful for e.g. quantitative fluorescence evaluations.

First define one or more ROIs (chapter 5), then start measurement using the menu command Image / Integration (ROIs). The results for all ROIs will be displayed in a table.

ROI Measurement (three freehand ROIs) to determine the area rate of bright fiber material (Object%) in different samples


7.4. Length measurement

For length measurements of filamentous objects (e.g. roots, fibers) two different methods are available in medeaLAB Count & Classify. It depends on your image and object properties, which method yields best results.

The first method is contour based, i.e. first object borders will be detected (similar to the method in chapter 7.1) and then the maximum object extend within these borders will be determined (see blue lines in the image below):

Activate only the checkbox for “Length” in the Options / Formparameter dialog on the page „Object” (not “Width”, parameters „Area” and „Formfactor” are optional). Make sure that no other object parameters are selected on the dialog pages and the Object Model “Contour” is selected on the 3rd page of the Formparameter dialog (“Parameter & Model”).

Then start a measurement using the menu command Image / Search Objects. Object axes will be marked by a blue line and crosses and length will be listed in the result table.

Root length measurement using the contour based method (with additional object filter ‘area > 1000’)

The second method is skeleton based:

Select “Skeleton” as “Object Model” on the 3rd page of the Formparameter dialog (“Parameter & Model”).

Then start a measurement using the menu command Image / Search Objects. Object axes will be marked by a red line and length will be listed in the result table.

Root length measurement using the skeleton based method


7.5. Manual object counting

This is a helper function in order to avoid wrong count results. After selecting the menu command Image / Count Manual you may click on single objects. The objects are marked with a cross and assigned a number and a counter will be incremented. You may also undo a single object selection with the Remove button.


8. Object classification

medeaLAB offers features for flexible object classification. First you teach the system which objects belong to which user defined class. During this selection process a statistical classification scheme is computed, which will be used in subsequent automatic classifications.

We will demonstrate these abstract processes as follows:

Example: Classifying seeds as germinated

Image with some of the seeds already germinated:

First you have to decide which object features are characteristic for germinated seeds and select them for evaluation.

We clearly see that germinated seeds differ from other objects (detritus and ungerminated seeds) in

- area (they have grown)

- form (irregular shapes)

- color (greenish appendices)

Therefore in the Form Parameters dialog we check at least “Area”, “Formfactor” and “Color”. We do not have to set lower or upper feature limits (Action), but you should check Exclude - Hit Boundary, because it is not possible to classify partial objects.

Now you should execute a test for object detection using the menu command Image / Search objects.

If the objects desired are not marked correctly and listed in the table please check for the right Thresholds and retry.

The next step is to teach the system which objects belong to a class. Activate the image window and open the Classes dialog using Options / Class definition on the menu.

At the first time no class is defined, so type a name for your new class in the Classname field and click Add. As a default the Area feature is added automatically to the Included features list for the new class.

You now may add features characteristic for your objects from the Available features list with the ß- button (or remove from the Included features list with the -à button).

In our example we add Form and Color Green besides Area. At least these features should have been selected for evaluation in the Form Parameters dialog before. You are free to select more features for evaluation in the result table but only the mentioned three features will be used for classification.

Select the features you want to learn (i.e. modify its statistical descriptors Min, Max, Avg, Dev) in the Features list and switch to the Learn Mode by clicking the button Learn.

The dialog should now appear like in the picture on the left and a message appears in the Status line indicating the Learn Mode.

Now click on objects in the image which belong to the “Germinated” class and watch the statistical descriptors change. You will not have to select all of the objects, but it is a good idea to include objects representing the whole variety of the “Germinated” seeds class (e.g. with short and long primary root).

After teaching enough objects leave the Learn Mode by clicking Learn again and the Status message will disappear.

You may set all descriptor values of the current class to 0.0 using the Reset button, if you have to teach this class again from the beginning.

If you execute the menu command Image / Search objects again now, you will notice the new column “Class” in the result table and some of the objects should be classified as “Germinated” (objects not fitting into any of your classes are displayed as NC = Not Classified).

“Germinated” objects are marked with a green border, which was selected as the color for this class (using the Color button right to the Classname in the Classes dialog)

Strategies for optimal classification results:

If germinated seeds are not classified correctly as “Germinated” (but e.g. as “NC”), add these objects to the “Germinated” class in Learn Mode.

If objects that do not belong to the “Germinated” class are misclassified as “Germinated”, try the following:

1. Assign more suitable objects to the “Germinated” class in order to improve the statistical descriptors for this class

2. Create and teach also classes for the objects not classified (NC). This will lower the risk of misclassification, because an object is assigned to the class to which it fits best.


9.Time series measurements

Home | 9. Time series measurements

9. Time series measurements

To start a time series measurement use the menu command Measure / New or the toolbar button: START.

First select a measurement method:

AD Measurement = analog values from an A-D converter as a data source

Video measurement = image analysis results as a data source

Before you can start a time series measurement, you will have to create a new file or open an existing one which will hold your measurement data.

In the Open New File dialog you may select an existing file (which will be overwritten) or type a new filename.


9.1. Measurement Options for image analysis

On the Measurement Options tab please select the measurement method (source of data values) and time parameters:

For the X-axis of the resulting chart you may choose between time scale and measurement count.

medeaLAB offers you the following image analysis measurement methods to retrieve data values for the Y-Axis:


9.1.1 AreaChannel

The area of the largest object in the image from the selected video channel (on multiple camera systems) is measured. The area is calculated from the object contour. If you have defined multiple Regions Of Interest (ROIs) only the first one will be used.

If this method is selected you may also specify one or more video channels in the list below (Chan = channel).


9.1.2AreaAOI

Home | 9. Time series measurements | 9.1. Measurement Options for image analysis | 9.1.2 AreaAOI

9.1.2 AreaAOI

As with the method above the area of the largest object is measured, but in one or more ROIs selected in the list below (AOI1, AOI2,…).


9.1.3MeanColor

Home | 9. Time series measurements | 9.1. Measurement Options for image analysis | 9.1.3 MeanColor

9.1.3 MeanColor

The mean color / gray values of the ROIs selected in the list below are measured.


9.1.4Distribution

Home | 9. Time series measurements | 9.1. Measurement Options for image analysis | 9.1.4 Distribution

9.1.4 Distribution

The mass distribution of objects in the image is measured. The center of gravity of each object is calculated and their distribution is analyzed.


9.1.5Curvature

Home | 9. Time series measurements | 9.1. Measurement Options for image analysis | 9.1.5 Curvature

9.1.5 Curvature

The maximum curvature of the largest object in the selected ROI is measured.

The curvature will be determined from tangents approximated to the object contour (calculated from n/2 contour points on each side of the current contour position where n is the total fit width).

Curvature measurement – with markers on object end points and point of maximum curvature.


9.1.6Growth

Home | 9. Time series measurements | 9.1. Measurement Options for image analysis | 9.1.6 Growth

9.1.6 Growth

The translation of the center of gravity of the largest object between subsequent images is measured.

The translation value is the euclidean distance between the center point at measurement start and its current position.

If a ROI is defined, it will be moved after each measurement so that the ROI center matches the object center.


9.2. Signal Control

On the Signal Control tab you may find advanced options for triggering external devices during measurements.


9.3. Configuration

On the Configuration tab you may choose options for image handling:

Create AVI File: save images of all measurements to digital video file (AVI format)

Save BMP File: save each measurement image to bitmap file (BMP format)

Activate Filter: smooth each image before measurement


9.4. Start the measurement

Start the measurement using the menu command Measure / Start.

Chart of brightness data measured over a time period of 7 days and 13 hours (the time axis is scaled automatically).

You may interrupt a time series measurement at each point in time by choosing the menu command Measure / Stop.


10. Data management

© 2010 Medea AV GmbH


10.1. Data export

medeaLAB Count & Classify offers two file formats for table data export and direct data transfer to Microsoft Excel.


10.1.1 Export to file

Choose the menu command File / Export / ASCII File to write the current table data to a plain text file.

Choose the menu command File / Export / CSV File to write the current table data to a “comma separated value” (CSV) text file with “,” as a delimiter between values.


10.1.2 Export to Microsoft Excel™

Choose the menu command File / Export / Excel to transfer the current table data to a Microsoft Excel™ spreadsheet. This transfer method does not need a file for data storage, but Microsoft Excel™ is started automatically and a new spreadsheet with the medeaLAB data is created. Therefore Microsoft Excel™ must be installed on your system. The transfer is controlled via the export script “export.txt” (this file should be in your script directory – usually located in the Windows XPâ directory “C:\Documents and Settings\All Users\Application Data\Medea AV\MedeaLAB\script” or the Windows Vistaâ directory “C:\ProgramData\Medea AV\MedeaLAB\script” ).

Result table data in medeaLAB

Same result table data after execution of the File / Export / Excel command


10.2. Database management

For data management the Microsoft Access™ database medealab.mdb is installed together with the program. All single measurement results are stored into this database for later analysis, reporting or export.

Measurement results are grouped into measurement series. You may also assign additional information to each measurement series.

Open the Database window with the menu command File / Open Database or the leftmost icon on the database toolbar:

The database toolbar offers buttons for navigating through the database, adding or deleting records and printing reports.

Description of the buttons from left to right:

Open database, show first record, show previous record, show next record, show last record, create new record, delete current record, count manual (by mouseclicks), show report.

A window with the current measurement data and buttons to execute measurements is displayed to the left of the image window after opening the database.

Measurement:

Information on the current measurement like name of associated measurement row and used parameter set (profile)

Results:

Count (number of objects), computed area and classification values

Count button:

Creates a new database record, executes measurement and stores results in the new record

Repeat button:

Executes measurement and stores results in the current record

Save Image checkbox:

If checked the image used for measurement will be stored as a JPG file in the images subdirectory (for later analysis or documentation)

Measurement number:

Index of the current measurement and number of measurements in the current measurement row

You may add, change and switch between measurement rows using the menu command Database / Measurement Rows…

Each time you execute a measurement using the Count button you will be prompted for a descriptional text for this measurement:

You may skip editing the description by simply pressing the <RETURN> key or clicking the OK button (clicking Cancel will abort the measurement).

All measurements of a measurement row may be displayed in a table view (menu command Database / Show Table) or as a formatted report (especially for printouts, menu command Database / Print Report…).


10.3. Reports

A report with the measurement data of the current measurement row will be generated if you select the menu command Database / Print Report…

or the button [image] in the toolbar.

medeaLAB supports two different mechanisms of report generation:

- Reports assembled from HTML templates (*.htm, *.html) containing placeholders for result data. This method is most suitable for generating reports with formatted text and logo images.

- Reports generated by loading a template Excel file (*.xls) remotely to Microsoft Excel™ and transferring result data directly to the spreadsheet. This method is best suited if you want to analyze your results statistically afterwards.

For both methods you will have to select a template file first (menu command Database / Select Report Template…, otherwise the Print Report… command will lead to the message: “Error in report”.


10.3.1 HTML reports

If you select the menu command Database / Print Report… after selecting an HTML report template a report window is displayed in medeaLAB.

At the bottom of this window you will see this button row:

Print: shows the “Print Options” dialog and allows printouts.

Save: saves the report in HTML, MHT (web archive) or TXT (unformatted text) format.

Copy to clipboard: copies the whole document to the Windows clipboard (you may then paste it directly into e.g. Microsoft Word™)

Close will close the report window.

A right mouse click in the report window will give you additional menu options (e.g. print preview).

A medeaLAB HTML report template file consists of normal HTML code with placeholder keys enclosed in {} into which medeaLAB fills in report data.

medeaLAB is shipped with two sample HTML report template files (count.html and lemna.html) in the MedeaLAB\Data subfolder (see chapter “Maintenance”).

Please contact the medeaLAB support if you want to modify existing templates or create new ones.


10.3.2 XLS reports

If you execute the menu command Database / Print Report… after selecting a XLS report template Microsoft Excel™ will be started automatically and the report data will be inserted into the template.

A medeaLAB XLS report template file is a normal Excel spreadsheet. The name of the current measurement row will be inserted into cell B2, the measurement data in the cells starting in row 4. This behavior is controlled by the script file Report.txt located in the MedeaLAB\Script subfolder (see chapter “Maintenance”).

medeaLAB is shipped with a sample XLS report template file (Report_Template.xls) in the MedeaLAB\Data subfolder (see chapter “Maintenance”).

Please contact the medeaLAB support if you want to modify existing templates or create new ones.


11. Maintenance

It is strongly recommended to frequently save backup copies of the medeaLAB settings as well as of your data.

During installation of medeaLAB Count & Classify the folder “Documents and Settings\All Users\Application Data\Medea AV\MedeaLAB” (Windows XP) or “ProgramData\Medea AV\Medealab” (Windows Vista) is created on the installation drive to store the settings of program modules and your data.

Where medeaLAB stores information by default:

Windows XP:

Folder | Contents
Documents and Settings\All Users\Application Data\Medea AV\Medealab | Program settings, registration information and profiles (INI-, XML-, AOI- and CLASSES-files)
Documents and Settings\All Users\Application Data\Medea AV\Medealab\data | Database (MDB-file), report templates (XLS- and HTML-files)
Documents and Settings\All Users\Application Data\Medea AV\Medealab\images | Stored image files
Documents and Settings\All Users\Application Data\Medea AV\Medealab\script | Script files for automating tasks

Windows Vista (and later):

Folder | Contents
ProgramData\Medea AV\Medealab | Program settings, registration information and profiles (INI-, XML-, AOI- and CLASSES-files)
ProgramData\Medea AV\Medealab\data | Database (MDB-file), report templates (XLS- and HTML-files)
ProgramData\Medea AV\Medealab\images | Stored image files
ProgramData\Medea AV\Medealab\script | Script files for automating tasks

You may easily backup all medeaLAB settings and result data by making backup copies of the whole MedeaLAB folder and its subfolders.


12. Communication with external devices

In the Utilities menu you may find options for communication with external devices.

medeaLAB Count & Classify is able to import data from several types of A/D converters (menu option Utilities / Select Hardware). The external sensor connection is configured via the Utilities / Sensor / Setup dialog.

medeaLAB Count & Classify is also able to communicate with the medeaLAB precisionScan and medeaLAB trayScan devices. See www.medealab.de for more information on this devices.

The medeaLAB precisionsScan illumination and motor driven facilities are controlled via the Utilities / Scan Chamber dialog (only available if driver is installed and device is connected):

(explanation in the precisionScan User Manual shipped together with the device)


medeaLAB Count & Classify Image Analysis System - User Manual

Home | medeaLAB Count & Classify Image Analysis System - User Manual

medeaLAB Count & Classify
Image Analysis System
User Manual

Medea AV GmbH

Am Weichselgarten 23

D-91058 Erlangen

Germany

www.medealab.de

Software Version: 6.6 - Date: February 2010

Copyrights and Trademarks

is a product of

Medea AV Multimedia und Software GmbH

© 1998-2010 Medea AV GmbH All rights reserved

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of Medea AV GmbH. The information contained herein may be changed without prior notice.

Microsoft, Windows, Excel and Word are registered trademarks of Microsoft Corporation.

HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

All other product and service names mentioned are the trademarks of their respective companies.

Data contained in this document serves informational purposes only. National product specifications may vary.These materials are subject to change without notice. These materials are provided by Medea AV GmbH for informational purposes only, without representation or warranty of any kind, and Medea AV GmbH shall not be liable for errors or omissions with respect to the materials. The only warranties for Medea AV GmbH products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

Contents:

1. Introduction................................................................................................... 5

2. Installation..................................................................................................... 7

2.1. Hardware and driver installation....................................................................... 7

2.2. Program installation....................................................................................... 7

2.3. Registration................................................................................................. 7

2.4. Basic software configuration........................................................................... 8

3. Video and image settings................................................................................ 10

3.1. Initialize live video....................................................................................... 10

3.2. Video options............................................................................................. 10

4. Setting of system parameters.......................................................................... 12

4.1. Pixel calibration.......................................................................................... 12

4.2. Setting of the gray level or color intensity thresholds........................................ 13

4.2.1 Automatic adjustment............................................................................... 13

4.2.2 Manual adjustment................................................................................... 14

4.3. Using object features for identification and discrimination................................... 15

5. Selection of image regions............................................................................... 19

6. Methods for preprocessing image data............................................................... 21

6.1. Digital filters.............................................................................................. 21

6.2. Image integration........................................................................................ 22

6.3. Separation of object aggregations (conglomerates)........................................... 22

7. Basic steps for counting and measuring objects................................................... 25

7.1. Counting objects using contour analysis.......................................................... 25

7.2. Counting coherent objects using blob analysis.................................................. 26

7.3. Measuring area fractions within ROIs.............................................................. 26

7.4. Length measurement................................................................................... 27

7.5. Manual object counting................................................................................ 28

8. Object classification....................................................................................... 29

9. Time series measurements............................................................................... 33

9.1. Measurement Options for image analysis.......................................................... 33

9.1.1 AreaChannel............................................................................................ 34

9.1.2 AreaAOI.................................................................................................. 34

9.1.3 MeanColor............................................................................................... 34

9.1.4 Distribution.............................................................................................. 34

9.1.5 Curvature............................................................................................... 34

9.1.6 Growth................................................................................................... 34

9.2. Signal Control............................................................................................. 34

9.3. Configuration............................................................................................. 34

9.4. Start the measurement................................................................................ 35

10. Data management.......................................................................................... 36

10.1. Data export............................................................................................... 36

10.1.1 Export to file........................................................................................... 36

10.1.2 Export to Microsoft Excel™......................................................................... 36

10.2. Database management................................................................................. 36

10.3. Reports..................................................................................................... 38

10.3.1 HTML reports........................................................................................... 38

10.3.2 XLS reports............................................................................................. 38

11. Maintenance................................................................................................. 40

12. Communication with external devices................................................................. 41