GrainAutLine user manual

This documentation is a summary of the functions of GrainAutLine. They are divided into the following categories:

Before going on, we will have to clarify the Processing State Descriptor concept, which is the principal representation of the work you are doing.)

The Processing State Descriptor (PSD) concept

The PSD is an abstract collection of all information stored at a given time during your work. It consists of the followings:

A key concept of GrainAutLine is that every operation performed on the image is a transformation from a PSD into another one. See the processor descriptions and the examples later for further insights.

Application control

This is a short description on how to control the basic functions of the application.

Currently, the menu of GrainAutLine is very simple: you can open a file (may be an image for new work, or a PSD if you continue previous work), save a PSD, and run the selected processor (entirely or step-by-step).

Other user interface elements

The main windows area consists of the following parts:

The Layers also have an opacity which may be changed if the mouse is over the layer name. The 0% opacity if full transparency. There is a slight difference in the operation of 99% and 100% opacity: 100% covers everything below it, while 99% introduces a blending which makes deeper layers visible, especially if they also have high opacity. (100% opaque layers have still a transparent color which does not cover the layers below them.)

Pan and zoom in the editor

You can zoom with Ctrl-Scroll and move the image with the middle mouse button.

Colors used in the editor area

The editor blends the visible layers. This means that if there are multiple things visible in the same location, their color is blended.

Blobs can be shown in different colors:

Selection visualization modes

There are 3 modes for visualizing the set of selected blobs on the Selection layer:

You can change between these modes by pressing F9.

Selecting blobs

There are two ways to select blobs:

Best practices

Currently, the most appropriate selection and visualization mode is the following:

Global functions

Global functions are always available, independently of the currently selected processor. (We use LClick and RClick as abbreviations of left and right mouse clicks.)

Processors

In the following, all processors are described. Processors are usually selected and activated, but they may also react on mouse events and they may have their own settings.

Adaptive Double Threshold Segmentation (ADTS)

Takes the input image and applies the ADTS image processing algorithm to retrieve the grain boundaries. Result is drawn on the Aux.

AddSubAux

Adds or subtracts the content of the Aux to or from the Blobs. Blobs connected by the Aux are merged into one and blobs cut into peaces be the Aux are split into multiple blobs. If there are no blobs upon running this processor, a single blob covering the whole image is used as a starting point.

This processor is the most elementary tool for modifying the blobs. Using this, you can modify boundaries, add or subtract areas from blobs.

By selecting the “Move result to Aux” checkbox, the above operation is extended with an additional one: the border lines are all moved to the Aux and all blobs are erased. It can be used to edit all borders in the Aux easily. After that, that Aux can be subtracted. As the blobs are removed, the subtraction creates the blob set segmented by the contents of the Aux.

By selecting the “Move result to Aux” checkbox, the above operation is extended with an additional one: the border lines are all moved to the Aux and all blobs are erased. It can be used to edit all borders in the Aux easily. After that, that Aux can be subtracted. As the blobs are removed, the subtraction creates the blob set segmented by the contents of the Aux.

BlobMerger

Merges the blobs connected by the Aux in a smarter way than how the AddSubAux does. Blobs connected by a single connected area of the Aux are “glued” together by filling the gaps between them.

For example if several boundaries are detected where there is none, the small blobs can be merged quickly this way: with strokes on the Aux, connect the ones to merge (you may draw several strokes), and run this processor.

Fill Holes

Fills the inner holes in the selected blobs. It is used to remove border-like noises from the inner areas of the blobs after segmentations.

Query

Diagnostic processor, not meant to be used in the production environment. The functionality may change arbitrarily. Basically, it is used to retrieve various information about specific locations in the image during debugging of new algorithms.

AuxMorphology

Erodes the Aux in a smart way: the lines in the Aux are not allowed to be cut (preserves borders), and the erosion is only applied in areas where the original image is light. Assuming the grain borders to be dark, this processor can clean up drawing mistakes by removing the parts of border lines which are definitely not grain borders.

AutoCut

Slices a single selected blob into peaces closing the narrow passages between bigger, clear areas. The result is a new Aux which can be subtracted from the blobs to achieve the result. (This approach allows the user to check the result before really applying it.)

The algorithm identifies big enough clear areas (called sources) and searches for connections between them. If there is a narrow path between two sources, the narrowest passage is marked on the Aux.

Currently, AutoCut expects exactly 1 selected blob.

Skeleton

Creates the skeleton of the Aux. The skeleton is retrieved by narrowing the lines of the Aux to be a single pixel wide.

Examples on processing

Segmentation and minor corrections

In this example, we load an image, apply a standard segmentation algorithm, and then modify the segmentation at some points to clean up noises.

The image appears in the application.

At this point, many detected border lines appear, overlaid the image. (They are drawn on the Aux.)

Now, the blobs are shown in the editor. While you press the right mouse button, the blob below the mouse is highlighted. At this point, you may notice that some grains still belong to the same blob. (You can make them have different colors by pressing “C”. Pressing “C” multiple times rotates the colors.)

Now you can see the separated blobs my moving the mouse over them, as the automatic highlighting shows them as two separate blobs.

There may be some further noises inside the blobs, so you may want to select some of them and remove the inner holes.

Now you have a clean set of blobs which represent the grains in the image. This can be used for further statistical and classification tasks, but they are out of scope of the GrainAutLine application.

Compare results with older PSD and apply corrections