This guide will show you how to use the different types of image segmentation that are available in Breeze. To see the list of available segmentation look at the document Segmentations .

The method “Segmentation by model” is covered in the tutorials Quantification of powder samples and Classification of nuts step 1, and that will not be covered in this guide.

General instructions

Views for setting up your segmentations

Study settings

One view is by using the menus available under the “Study settings”. Open this by pressing the “Edit” button for your study.

This view will be shown in all the examples in this user guide.

Analyse Tree

The other view is to open the “Analyse Tree” tab. Here you have a graphical presentation of the different steps in your segmentation. By clicking on a node in your “tree”, you can change the settings for it in the menu on the right. Under the picture of the tree you there is a menu to Add, move or remove nodes. The options in the “Analyse Tree” view are the same as under Study Settings.

Switching between different Segmentations

You can change the segmentation that you want to look at by using the menu under the table.


Intensity segmentation

Create a new Study in Record by pressing “Add”. Choose Tutorial and “Powder Quantification”.
Press OK

The view should look like this:

Press “Edit” button on the toolbar

Press “Add” button beside the “Analyse Tree” to add new Segmentation or Descriptor

Change “Method” to “Segmentation by Intensity”

Segmentation by Intensity uses a logical expression to segment the sample objects. The logical expression can compare different spectral bands with each other or by a set value of intensity. The spectral band variable format is b[band index] and starts with a “b” followed by the band index; for example, b10 mean band index 10.

The value from the band index is either pseudo absorbance value if data includes white and dark references if-else raw spectral value.

Change “Min area” size to 5000 to exclude small objects

Set “Expression” to b10 < 0.5. This means that band index 10 should be below the intensity of 0.5.

Press “Apply Changes” and then press “Up” button

The table view should look like this:

The yellow segmentation selection line is now around the plastic bag in the measurement preview.

By looking at the “Pixel Explore” tab and selecting a region inside the sample and a region from the background, you can compare the average spectral profiles for the different materials. You can then get an idea of the spectral bands where you have a big difference, and also what intensity value to set.

Grid and Insets segmentation

Press “Edit” button again

Select the “Object” node in the “Analysis Tree” and then Press “Add sub-node”

Change “Node type” to “Segmentation”.
Change “Method” to “Segmentation by grid and insets”

Change “Insets” to 30 (same as specifying 30;30;30;30 - Top;Left;Bottom;Right)
Change “Percent” to “true” (If the percent is false it will use insets as pixels)

Press “Apply Changes” and then press “Up” button

Change “Segmentation” to “Grid and insets” in the drop-down menu.
The view should then look like this.

An inset of 30% has been applied from each side. The sample has then been divided into a 3x3 grid creating 9 sub-sub-samples.

It’s easy to change between segmentations using the “Segmentation” menu

Coordinates segmentation
Press “Edit” again

This time select “Grid and Insets” node in the “Analysis Tree”.
Change “Method” to “Segmentation by pixel coordinates”

You can change the origo for the coordinate system. The default is in the upper left corner of the parent sample. The coordinates will by default be centered around origo.

Change “Origo” to “Parent object mass center”. The segmentation will now be in the center of the object.

In “Coordinate” you specify the size of the segmentation. The coordinate is written in the number of pixels for the 4 corners of the segmentation starting in the upper left (x1, y1), upper right (x2, y2), lower right (x3, y3), and finally lower left (x4,y4). In this example, we will not change the default (this will be a square of 50 pixels).

Press “Apply Changes” and then press “Up” button

Change “Segmentation” to “Coordinate” in the drop-down menu.
The view should then look like this

Manual segmentation

Create a new Study in Record (Press “Add”). Choose Tutorial and “Nut Classification”.
Press OK

The view should look like this:

Press “Go to measurement” button on the toolbar

Press “Pixel Explore” tab

Select area of interest in either “Variance scatter” or “Max variance image”

Press “Add Sample(s) from selection” button.

Samples are created from the selection and you are back in the “Table” tab

Adjust segmentation settings by toggling the right settings panel

Change for example the “Min area” to 50 and then press “Apply Changes”

The unwanted object can be removed by pressing the “Remove selected Samples(s)” button in the settings panel.

Representative spectrum

Go back “Up” to Study level and Press “Edit” again

Select the “Manual” node in “Analysis Tree” and Press “Add sub-node”

Change “Node type” to Segmentation

Change “Method” to “Segmentation by representative spectrum”

“Method” can be changed to (different methods for spatial distribution):
Evenly spread, Random, Random (Gaussian)
Set “Number of representative spectrum”

Press “Apply Changes” and return “Up”

Go to “Table” tab
Change Segmentation to “Representative Spectrum”

As you can see 25 pixels (i.e 25 spectra) have been selected from each sample.

Export segmentation

Press “Open” study to go to show groups

Select group to export, select “Export” tab, and select “Export spectral pixel data” (export the whole study by selecting the study instead of the group)
Press “Apply” button

Select folder to Export to and press “Next”

Choose segmentation to export

Choose “Format” (Raw or Matlab format)

Option: Select “Open files in Evince after export”

Requires that Evince is installed. You can also open the exported files in Evince manually.

Press “Finish”

The data is now segmented and exported to the selected folder

If “Open files in Evince after export” is selected, wait a few seconds and Evince will open and show “Data Import Wizard” with “Merge different files”

Finish the wizard and start working with the data in Evince

The Segmentation guide is now finished!

Feel free to test other segmentation options and play around with the Quantification of powder samples data.