Characteristic values for runlength coding of regions.
The operator num_chord calculates for every input region from Regions the number of chords necessary for storing this region with the aid of runlength coding. Furthermore the so-called "K-factor" is determined, which indicates by how much the number of chords differs from the ideal of the square in which this value is 1.0.
The K-factor (KFactor) is calculated according to the formula:
KFactor = NumChords / sqrt(Area),wherein Area indicates the area of the region. It should be noted that the K-factor can be smaller than 1.0 (in case of long horizontal regions). The L-factor (LFactor) indicates the mean number of chords for each line index occurring in the region. MeanLength indicates the mean length of the chords. The parameter Bytes indicates how many bytes are necessary for coding the region with runlengths.
All features calculated by the operator num_chord are not rotation invariant because the runlength coding depends on the direction. The operator num_chord does not serve for calculating shape features but for controlling and analysing the efficiency of the runlength coding.
Regions (input_object) |
region(-array) -> object |
Regions to be examined. |
NumChords (output_control) |
integer(-array) -> integer |
Number of chords. | |
Assertion: 0 <= NumChords |
KFactor (output_control) |
real(-array) -> real |
Storing factor in relation to a square. | |
Assertion: 0 <= KFactor |
LFactor (output_control) |
real(-array) -> real |
Mean number of chords per line. | |
Assertion: 0 <= LFactor |
MeanLength (output_control) |
real(-array) -> real |
Mean length of chords. | |
Assertion: 0 <= MeanLength |
Bytes (output_control) |
integer(-array) -> integer |
Number of bytes necessary for coding the region. | |
Assertion: 0 <= Bytes |
The mean runtime complexity is O(1).
The operator num_chord returns the value TRUE if the input is not empty. If necessary an exception is raised.
threshold__, regiongrowing__, connection, fetch_chord
fetch_chord, chord_distribution