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.
Also pixel specific operators available are:
Operators | Description |
---|---|
| Compare predicted class with explicit given class |
| Number of pixels of the largest connected class-object within the object. |
| Percent of pixels the total object, by a implicit and explicit given class |
| Number of pixels by a implicit and explicit given class |
| For assigning variables values which can be updated at runtime. The default value will be restored after each Play-run. |
| XRAY ONLY Wire detection algorithm using kernel |
Class expressions
For comparison based on a class related value.
Syntax:Implicit
- Within the class expressionExplicit
- 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 classA
precentClassA <= 10
Number of pixels of Class
A
less or equal to 10 then expression will evaluate to classB
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 classA
class != classB and class != classNone
Create
NEW_CLASS
if predicted class is not classB
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)