Skip to main content
Skip table of contents

Update classification (descriptor)

Update or add custom-created classes. The update or new class will be assigned if the expression is satisfied.

TIP The last Expression can be TRUE which will imply that the last expression will always be assigned if all above evaluates as false

Parameters

Classification descriptor

Choose the classification descriptor to modify.

Expression

Choose a class from the category and write the expression for it.

The standard operators that can be used:

Standard arithmetic (+,-,/,* …) and comparison operators (=,>,< …) as well as some mathematical expressions (…) and constant values can be used in expressions.

Expand to see all available operator

Arithmetic Operator

Description

-

Subtract

+

Add

/

Divide

*

Multiply

%

Modulo

^

Raised to a power

Comparison Operator

Description

=

Equal to

|

OR

TRUE if any of the conditions separated by OR is TRUE

&

AND

TRUE if all the conditions separated by AND is TRUE

!=

<>

Not equal to

<

Less than

<=

Less than or equal to

>

Greater than

>=

Greater than or equal to

Function operator

Description

SQRT(N)

SIN(N)

COS(N)

EXP(N)

LOG(N)

LOG10(N)

AVG(N)

ROUND(N)

Constants

Description

TRUE

Always evaluates to TRUE

FALSE

Always evaluates to FALSE

INF

token value

PI

approximated to 3.14159

Also pixel specific operators available are:

Operators

Description

Class

ClassA

Compare predicted class with explicit given class

Class = ClassA compares the assigned class with class A

Connected

ConnectedClassA

Number of pixels of the largest connected class-object within the object. ClassA optional to compare to explicit class A

percent

percentClassA

Percent of pixels the total object, by a implicit and explicit given class

Number

NumberClassA

Number of pixels by a implicit and explicit given class

VAR("NAME", NUM)

For assigning variables values which can be updated at runtime. The default value will be restored after each Play-run.

iswireN

XRAY ONLY Wire detection algorithm using kernel N

Class expressions

For comparison based on a class related value.

Syntax:
Implicit- Within the class expression
Explicit - Sets given class after name

The parameters that can be used:

  • Area

  • Length

  • Width

  • Circumference

  • Regularity

  • Roundness

  • Angle

  • D1

  • D2

  • X

  • Y

  • MaxBorderDistance

  • BoundingBoxArea

For details on each available property see: Object properties Details

Pretreatments

In button-up applied order ⬆️ , meaning UV is applied first then Center and so on.

  • Savitzky-Golay

  • Derivative

  • SNV (Standard Normal Variate)

  • Logarithm

  • Center

  • UV (Unit Variance) scaling

For more on each type of pretreatment see: Pretreatments

Replace

✅ Replace the classification column in the table.

⬜ Do not replace the classification column in the table instead adds a new column.

Example

Spatial descriptor

Expression:

roundness < 10 & area > 5


Bands

Indexing with 1 based index in band list.

Expression:

(b10 > 1.5 | b15 < 2) & b20 <= 1.2

  • b10 > 1.5

    • spectral band at index 10 has intensity (reflectance or absorbance) value strictly above 1.5

  • b15 < 2

    • spectral band at index 15 has intensity (reflectance or absorbance) value strictly below 2

  • b20 <= 1.2

    • spectral band at index 20 has intensity (reflectance or absorbance) value equal to or below 1.2

Normal rules of mathematical expression evaluations are applied with regards to parenthesis.


Number

Number of pixels by a implicit and explicit given class

Expression:

  • number > 10

    • Number of pixels of Class A more than 10 then expression will evaluate to class A

  • precentClassA <= 10

    • Number of pixels of Class A less or equal to 10 then expression will evaluate to class B


Percent

Percent of pixels the total object, by a implicit and explicit given class

Expression:

  • percent > 0.5

    • percent of pixels of Class A more than 50% then expression will evaluate to class A

  • percentClassA <= 0.5

    • percent of pixels of Class A less or equal to 50% then expression will evaluate to class B


Connected

Number of pixels of the largest connected class-object within the object.

Expression:

  • connected > 10

    • Number of connected pixels of Class A more than 10 then expression will evaluate to class A

  • connectedClassA <= 10

    • Number of connected pixels of Class A less or equal to 10 then expression will evaluate to class B


Class

Compare predicted class with explicit given class

Expression:

  • class = classA

    • Create NEW_CLASS if predicted class equals to class A

  • class != classB and class != classNone

    • Create NEW_CLASS if predicted class is not class B and not no class

No class is specified as classNone


Wire detection

Wire detection algorithm using kernel

Syntax:

iswire + kernel size, default is 3.

Expression:

iswire, iswire3, iswire5


Variables

For assigning variables values which can be updated at runtime. The default value will be restored after each
Play-run.

Syntax:

var("Variable name", Default value)

Expression:

var("Variable A", 10)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.