This commit is contained in:
CaCO3
2023-02-20 23:58:58 +01:00
parent e4f59f3846
commit c098a63849
11 changed files with 25 additions and 229 deletions

View File

@@ -1,220 +0,0 @@
# Configuration Parameter Details
### [MakeImage]
```
[MakeImage]
LogImageLocation = /log/source
WaitBeforeTakingPicture = 5
LogfileRetentionInDays = 15
Brightness = -2
;Contrast = 0
;Saturation = 0
ImageQuality = 5
ImageSize = VGA
FixedExposure = true
```
| Parameter | Meaning | Options/Examples |
| ----------------------- | ------------------------------------------------------------ | ---------------- |
| LogImageLocation | location for storing a copy of the image | |
| WaitBeforeTakingPicture | waiting time between switch on the flash-light and taking the image in seconds | |
| LogfileRetentionInDays | Number of days, for which the log files should be stored | 0 = keep forever |
| Brightness | Adjustment of the camera brightness (-2 ... 2) | |
| Contrast | NOT IMPLEMENTED | |
| Saturation | NOT IMPLEMENTED | |
| ImageQuality | Input image jpg-compression quality 0 (best) to 100 (lowest) | 5 = default |
| ImageSize | Input Image Size from Camera | only VGA, QVGA |
| FixedExposure | If enabled, the exposure settings are fixed at the beginning and the waiting time after switching on the illumination will be skipped | |
### [Alignment]
```
[Alignment]
InitialRotate = 179
InitialMirror = false
SearchFieldX = 20
SearchFieldY = 20
AlignmentAlgo = Default
FlipImageSize = false
/config/ref0.jpg 104 271
/config/ref1.jpg 442 142
```
| Parameter | Meaning | Options/Examples |
| ------------------------ | ------------------------------------------------------------ | ------------------------------------- |
| InitialMirror | Option for initially mirroring the image on the original x-axis | |
| InitialRotate | Initial rotation of image before alignment in degree (1...359) | |
| FlipImageSize | Changes the aspect ratio after the image rotation to avoid cropping of the rotated imaged | |
| /config/refx.jpg 98, 257 | Link to reference image and corresponding target coordinates | file link is relative to SD card root |
| SearchFieldX/Y | Search field size in X/Y for finding the reference images [pixel] | |
Here two reference images are needed. Therefore rotation and shifting can be compensated. As the alignment is one of the most computing time using part, the search field needs to be limited. The calculation time goes quadratic with the search field size.
### [Digits]
```
[Digits]
Model=/config/digits.tfl
ModelInputSize 20, 32
LogImageLocation = /log/digit
LogfileRetentionInDays = 2
number1.digit1 292 120 37 67
number1.digit2 340 120 37 67
number1.digit3 389 120 37 67
number2.digit1 292 180 37 67
number2.digit2 340 180 37 67
```
| Parameter | Meaning | Options/Examples |
| ---------------------- | ------------------------------------------------------------ | ------------------------------------------ |
| Model | Link to the CNN-tflite file used for AI-image recognition | |
| ModelInputSize | Image input size for the CNN-Network [pixel] | needed to resize the ROI to the input size |
| LogImageLocation | storage location for the recognized images, including the CNN-results in the file name/location | |
| numberX.digitY | ROI for the corresponding digit in the aligned image. <br />More than one number can be specified. Therefore the name consists of a naming of the number (`numberX`) and the region of interest (`digitY`) - separated by `.` | |
| LogfileRetentionInDays | Number of days, for which the log files should be stored | 0 = keep forever |
| LogImageLocation | location for storing a copy of the image | |
### [Analog]
```
[Analog]
Model=/config/analog.tfl
ModelInputSize 32, 32
LogImageLocation = /log/analog
LogfileRetentionInDays = 2
number1.analog1, 433, 207, 99, 99
number1.analog2, 378, 313, 99, 99
number1.analog3, 280, 356, 99, 99
number1.analog4, 149, 313, 99, 99
number2.analog1, 280, 456, 99, 99
number2.analog2, 149, 413, 99, 99
```
Same as for [digit], here only for the analog pointers
### [PostProcessing]
```
[PostProcessing]
number1.DecimalShift = 0
number2.DecimalShift = -1
PreValueUse = true
PreValueAgeStartup = 720
AllowNegativeRates = false
number1.MaxRateValue = 0.1
number2.MaxRateValue = 0.1
ErrorMessage = true
CheckDigitIncreaseConsistency = false
```
Here the post processing and consistency check for the readout can be adjusted
| Parameter | Meaning | Options/Examples |
| ----------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| PreValueUse | Use the previous value for consistency check and substitution for NaN (True / False) | |
| PreValueAgeStartup | Max age of PreValue after a reboot (downtime) | |
| AllowNegativeRates | Allow decrease of the readout value | |
| numberX.MaxRateValue | Maximum chance rate from one to the next readout.<br />This can be specified for each number individual. | |
| ErrorMessage | Show error messages | |
| numberX.DecimalShift | Shifting of the decimal separator from the default position between digital and analog.<br />This can be specified for each number individual. | DecimalShift = 2: 123.456 --> 12345.6<br />DecimalShift = -1: 123.456 --> 12.3456<br/> |
| CheckDigitIncreaseConsistency | This parameter controls, if the digits are checked for a consistent change in comparison to the previous value. This only makes sense, if the last digit is changing very slowly and every single digit is visible (e.g. 4.7 --> 4.8 --> 4.9 --> 5.0 --> 5.1). If single digits are skipped, for example because the digits changes too quickly, this should be disabled (e.g. 4.7 --> 5.0 --> 5.1). | |
### [MQTT]
```
[MQTT]
Uri = mqtt://IP-ADRESS:1883
MainTopic = wasserzaehler
ClientID = wasser
user = USERNAME
password = PASSWORD
```
Here the post processing and consistency check for the readout can be adjusted
| Parameter | Meaning | Options/Examples |
| --------- | ------------------------------------------------------------ | ---------------- |
| Uri | URI to the MQTT broker including port e.g.: mqtt://IP-Address:Port | |
| MainTopic | MQTT main topic, under which the counters are published. <br />The single value will be published with the following key: `MainTopic/number/PARAMETER` where parameters are: value, rate, timestamp, error and json<br/>The general connection status can be found in `MainTopic/connection` | |
| ClientID | ClientID to connect to the MQTT broker | |
| user | user for MQTT authentication | (optional) |
| password | password for MQTT authentication | (optional) |
### [AutoTimer]
```
[AutoTimer]
AutoStart= true
Intervall = 4.85
```
This paragraph is used to automatically trigger the periodic automated readout.
| Parameter | Meaning | Options/Examples |
| --------- | ----------------------------------------------- | ------------------------------------------------------------ |
| AutoStart | Automatically trigger the readout after startup | |
| Intervall | Readout interval in minutes | Values smaller than 2 minutes do not make sense, as this is the time for one detection |
### [DataLogging]
```
[DataLogging]
DataLogActive = true
DataLogRetentionInDays = 3
```
This paragraph is used to control the logging of the result data to a specific folder of SD card -> \log\data\data_YYYY-MM-DD.csv
| Parameter | Meaning | Options/Examples |
| ---------------------- | -------------------------------------------------------- | -------------------------------------------------- |
| DataLogActive | Activate data logging to SD card | |
| DataLogRetentionInDays | Number of days, for which the log files should be stored | 0 = keep forever |
### [Debug]
```
[Debug]
Logfile = true
LogfileRetentionInDays = 2
```
This paragraph is used to switch on an extended logging. It is optional and by default only a minimum logging is enabled.
**:bangbang: Attention:** in case of extended logging the size of the log file (`/log.txt`, `/alignment.txt`) might increase rapidly, therefore manually deletion from time to time is recommended
| Parameter | Meaning | Options/Examples |
| ---------------------- | -------------------------------------------------------- | -------------------------------------------------- |
| Logfile | Turn on (true) or off (false) the extended logging | parameter and section optional |
| LogfileRetentionInDays | Number of days, for which the log files should be stored | 0 = keep forever |
### [System]
```
[System]
TimeZone = CET-1CEST,M3.5.0,M10.5.0/3
;TimeServer = TIMESERVER
;Hostname = undefined
SetupMode = false
```
This paragraph is used to switch on an extended logging. It is optional and by default only a minimum logging is enabled.
**:bangbang: Attention:** in case of extended logging the size of the log file (`/log.txt`, `/alignment.txt`) might increase rapidly, therefore manually deletion from time to time is recommended
| Parameter | Meaning | Options/Examples |
| ---------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| TimeZone | TimeZone of the system can be specified | Central european, with summertime adjustment: `CET-1CEST,M3.5.0,M10.5.0/3` |
| TimeServer | An dedicated time server can be specified. | default = `pool.ntp.org` |
| Hostname | Additionally to the `wlan.ini` the hostname can be specified. It will be transferred to the `wlan.ini` and initiate a reboot | |
| SetupMode | If enabled, the server starts in an initial setup mode. This is automatically disabled at the end of the setup |
### [Ende]
No function, just to mark, that the config is done!

View File

@@ -28,7 +28,6 @@ nav:
- Integration-Home-Assistant.md
- External-LED.md
- rolling-installation.md
- Configuration-Parameter-Details.md
- Configuration.md
- Watermeter-specific-analog---digital-transition.md
- collect-new-images.md

View File

@@ -1,6 +1,8 @@
# Parameter `InitialRotate`
Default Value: `179`
Unit: Degrees
Initial rotation of image before alignment in degree (1...359)
!!! Note

View File

@@ -7,3 +7,8 @@ Unit: Pixels
This is an **Expert Parameter**! Only change it if you understand what it does!
X-size (width) in which the reference is searched.
!!! Note
Since the alignment is one of the steps using a lot of computation time,
the search field should be as small as possible.
The calculation time goes quadratic with the search field size.

View File

@@ -7,3 +7,8 @@ Unit: Pixels
This is an **Expert Parameter**! Only change it if you understand what it does!
Y-size (height) in which the reference is searched.
!!! Note
Since the alignment is one of the steps using a lot of computation time,
the search field should be as small as possible.
The calculation time goes quadratic with the search field size.

View File

@@ -1,3 +1,3 @@
# Parameter `Model`
Default Value: `/config/ana-cont_11.3.1_s2.tflite`
Default Value: `/config/ana-cont_*.tflite` (See [/config/config.ini](https://github.com/jomjol/AI-on-the-edge-device/blob/master/sd-card/config/config.ini))
Path to CNN model file for image recognition. See [here](../Choosing-the-Model) for details.

View File

@@ -1,4 +1,7 @@
# Parameter `Interval`
Default Value: `5`
Interval in minutes in which the Flow (Digitization Round) is run.
Unit: Minutes
Interval in which the Flow (Digitization Round) is run.
If a round takes longer than this interval, the next round gets postponed until the current round completes.

View File

@@ -1,6 +1,8 @@
# Parameter `DataLogActive`
Default Value: `true`
Activate data logging to SD-Card.
Activate data logging to the SD-Card.
The files will be stored in `/log/data/data_YYYY-MM-DD.csv`.
!!! Warning
A SD-Card has limited write cycles. Since the device does not do [Wear Leveling](https://en.wikipedia.org/wiki/Wear_leveling), this can wear out your SD-Card!
A SD-Card has limited write cycles. Since the device does not do [Wear Leveling](https://en.wikipedia.org/wiki/Wear_leveling), this can wear out your SD-Card!

View File

@@ -1,3 +1,4 @@
# Parameter `Model`
Default Value: `/config/dig-cont_0600_s3.tflite`
Default Value: `/config/dig-cont_*.tflite` (See [/config/config.ini](https://github.com/jomjol/AI-on-the-edge-device/blob/master/sd-card/config/config.ini))
Path to CNN model file for image recognition. See [here](../Choosing-the-Model) for details.

View File

@@ -5,4 +5,4 @@ Default Value: `undefined`
This is an **Expert Parameter**! Only change it if you understand what it does!
Hostname for the device.
It gets automatically transferred to `/wlan.ini` on the SD-Card at next startup.
It gets automatically transferred to `/wlan.ini` on the SD-Card at the next startup.

View File

@@ -4,5 +4,4 @@ Default Value: `false`
!!! Warning
This is an **Expert Parameter**! Only change it if you understand what it does!
Fixes the illumination setting of camera at the startup and uses this later -->
individual round is faster.
Fixes the illumination setting of camera at the startup and uses this later -> Individual round is faster.