jomjol / AI-on-the-edge-device

Easy to use device for connecting "old" measuring units (water, power, gas, ...) to the digital world
https://jomjol.github.io/AI-on-the-edge-device-docs/
5.27k stars 580 forks source link

Only the first analog ROI gets recognized #2979

Closed hl68fx closed 3 months ago

hl68fx commented 3 months ago

The Problem

Hello everyone,

I experience problems with the recognition of the second and third analog ROI. On the pictures below you can see the problem. I tried version 15.4 and 15.7. The reference picture seems to be better with 15.4 but the problem occurs in both versions.

main_ana3 main_ana2 main_ana1 aligned_image

I played with the camera settings and also aligned the camera differently but without any success. I would be very grateful if you could help me to solve this! :)

Version

15.4 and 15.7

Logfile

[0d00h00m00s] 2024-03-10T18:50:39 <INF> [MAIN] =================================================
[0d00h00m00s] 2024-03-10T18:50:39 <INF> [MAIN] ==================== Start ======================
[0d00h00m00s] 2024-03-10T18:50:39 <INF> [MAIN] =================================================
[0d00h00m00s] 2024-03-10T18:50:40 <INF> [MAIN] PSRAM size: 8388608 byte (8MB / 64MBit)
[0d00h00m00s] 2024-03-10T18:50:40 <INF> [MAIN] Total heap: 4382019 byte
[0d00h00m04s] 2024-03-10T18:50:44 <INF> [MAIN] Camera info: PID: 0x26, VER: 0x42, MIDL: 0x7f, MIDH: 0xa2
[0d00h00m04s] 2024-03-10T18:50:44 <INF> [SDCARD] Basic R/W check started...
[0d00h00m04s] 2024-03-10T18:50:44 <INF> [SDCARD] Basic R/W check successful
[0d00h00m04s] 2024-03-10T18:50:44 <INF> [SNTP] TimeServer not defined, using default: pool.ntp.org
[0d00h00m04s] 2024-03-10T18:50:44 <INF> [SNTP] Configuring NTP Client...
[0d00h00m04s] 2024-03-10T19:50:44 <INF> [SNTP] Time zone set to CET-1CEST,M3.5.0,M10.5.0/3
[0d00h00m04s] 2024-03-10T19:50:44 <INF> [SNTP] Time is already set: 2024-03-10 19:50:44
[0d00h00m04s] 2024-03-10T19:50:44 <INF> [MAIN] CPU frequency: 160 MHz
[0d00h00m05s] 2024-03-10T19:50:45 <INF> [SDCARD] Folder/file presence check started...
[0d00h00m05s] 2024-03-10T19:50:45 <INF> [SDCARD] Folder/file presence check successful
[0d00h00m05s] 2024-03-10T19:50:45 <INF> [MAIN] Tag: 'v15.4.0', Release: v15.4.0 (Commit: 74d4f20), Date/Time: 2023-12-22 22:39, Web UI: Release: v15.4.0 (Commit: 74d4f20)
[0d00h00m05s] 2024-03-10T19:50:45 <INF> [MAIN] Reset reason: Via esp_restart
[0d00h00m05s] 2024-03-10T19:50:45 <INF> [WLANINI] SSID: FRITZ!Box 7530 TP
[0d00h00m05s] 2024-03-10T19:50:45 <INF> [WLANINI] Password: XXXXXXXX
[0d00h00m05s] 2024-03-10T19:50:45 <INF> [WLANINI] RSSIThreshold: -75
[0d00h00m05s] 2024-03-10T19:50:45 <INF> [MAIN] WLAN config loaded, init WIFI...
[0d00h00m05s] 2024-03-10T19:50:45 <INF> [WIFI] Automatic interface config --> Use DHCP service
[0d00h00m06s] 2024-03-10T19:50:45 <INF> [WIFI] Set hostname to: watermeter
[0d00h00m06s] 2024-03-10T19:50:45 <INF> [WIFI] Init successful
[0d00h00m09s] 2024-03-10T19:50:49 <INF> [WIFI] Connected to: FRITZ!Box 7530 TP, RSSI: -84
[0d00h00m10s] 2024-03-10T19:50:50 <INF> [WIFI] Assigned IP: 192.168.178.41
[0d00h00m26s] 2024-03-10T19:51:05 <INF> [MAIN] Device info: CPU cores: 2, Chip revision: 100
[0d00h00m26s] 2024-03-10T19:51:05 <INF> [MAIN] SD card info: Name: NCard, Capacity: 29818MB, Free: 29796MB
[0d00h00m28s] 2024-03-10T19:51:07 <INF> [MAIN] Initialization completed successfully
[0d00h00m30s] 2024-03-10T19:51:10 <INF> [LOGFILE] Set log level to ERROR

Expected Behavior

analog ROI 2 should be recognized correctly. analog ROI 3 is more difficult to recognize but maybe it should work partially

Screenshots

No response

Additional Context

No response

SybexX commented 3 months ago

do you have the size of the analog rois set to over 120?

hl68fx commented 3 months ago

Hi, thank you for your fast reply! Yes, ana1 is 146x146, ana 2 is 152x152 and ana3 is 152x152. I changed the resolution to QVGA and analog rois are now 73x73. Now the first two rois get recognized correct. The third roi is not working but maybe this is because of the wireless adapter which got attatched to the top of my water meter. Thank you very much for the hint with the roi size! :)

Slider0007 commented 3 months ago

@hl68fx The whole ROI area needs to be fully inside of the reference image area. ROI2 and ROI3 are partly outside of image area., therefore ROI image is corrupted. Rearrange ROI that they are fully visible.