Update classification of categories using expression
Update or add custom-created classes. The update or new class will be assigned if the expression is satisfied.
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 operators that can be used:
Equals -
=
And -
&
Or -
|
Less than -
<
Less or equal -
<=
Larger than -
>
Larger or equal -
>=
Different from
!=
The parameters that can be used:
Area
Length
Width
Circumference
Regularity
Roundness
Angle
D1
D2
X
Y
MaxBorderDistance
BoundingBoxArea
Pretreatments
Apply one or more pretreatments to spectrum, 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
Number
Number of pixels by a implicit and explicit given class
Expression:
[class A][ number > 10]
-> Number of pixels of Class A more than 10
[class B][ precentClassA <= 10]
-> Number of pixels of Class A less or equal to 10
Percent
Percent of pixels the total object, by a implicit and explicit given class
Expression:
[class A][ percent > 0.5]
-> percent of pixels of Class A more than 50%
[class B][ precentClassA <= 0.5]
-> percent of pixels of Class A less or equal to 50%
Connected
Number of pixels of the largest connected class-object within the object.
Expression:
[class A][ connected > 10]
-> Number of connected pixels of Class A more than 10
[class B][ connectedClassA <= 10]
-> Number of connected pixels of Class A less or equal to 10
Class
Compare predicted class with explicit given class
Expression:
[New Class][class = classA]
=> Create New Class if predicted class equals to class A[New Class][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)
Class expressions
For comparison based on a class related value.
Syntax:Implicit
- Within the class expressionExplicit
- Sets given class after name