Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

  1. ioBroker Community Home
  2. Deutsch
  3. Hardware
  4. Wasserzähler - Selfmade

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.3k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    1.9k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    15
    1
    2.4k

Wasserzähler - Selfmade

Geplant Angeheftet Gesperrt Verschoben Hardware
wasser wasserzählerhow-to
1.1k Beiträge 48 Kommentatoren 374.7k Aufrufe 72 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • J jomjol

    @intruder7 Mit Docker kenne ich mir gar nicht aus. Versuche mich gerade an einer Step-By-Step Anleitung für einen Ubuntu-Server in VirtuellBox.

    Habe aber noch Problem mit der Installation von OpenCV, genau das, was ich für das Alignment benötige.

    I Offline
    I Offline
    intruder7
    schrieb am zuletzt editiert von
    #66

    Hey @jomjol, ich glaube dieses Projekt ist absolut nicht alltagstauglich. Habe den ganzen Server jetzt zwar auch in einen Docker bekommen. Aber auch dieses nur mit großen Schwierigkeiten. Tensorflow nur mit einer bestimmten Version u.s.w. Hatte noch ein bisschen was umgelötet. Damit hat natürlich die ganze Zentrierung von vorne begonnen.
    36e6630f-b62c-4826-ab45-36ec5bd77310-image.png

    die "4" erkennt er nicht und hier geht es tasächlich um Pixel! Mal erkennt er eine "3" dann wieder eine "1". Je nachdem wie ich die "4" positioniere. Was soll denn erst passieren wenn die Zahlen tatsächlich rotieren?
    Das hat sich tatsächlich super angehört aber so absolut nicht umsetzbar. Ich denke, ich werde hier auf einen Impulsgeber umsteigen um den Wasserverbrauch zu zählen.
    Schade
    Für dich nochmal die aktuellen Zahlen
    ziffer5.jpg ziffer4.jpg ziffer3.jpg ziffer2.jpg ziffer1.jpg zeiger4.jpg zeiger3.jpg zeiger2.jpg zeiger1.jpg rot.jpg resize_tmp.jpg org.jpg alg.jpg aktuell.jpg

    coyoteC J 2 Antworten Letzte Antwort
    0
    • I intruder7

      Hey @jomjol, ich glaube dieses Projekt ist absolut nicht alltagstauglich. Habe den ganzen Server jetzt zwar auch in einen Docker bekommen. Aber auch dieses nur mit großen Schwierigkeiten. Tensorflow nur mit einer bestimmten Version u.s.w. Hatte noch ein bisschen was umgelötet. Damit hat natürlich die ganze Zentrierung von vorne begonnen.
      36e6630f-b62c-4826-ab45-36ec5bd77310-image.png

      die "4" erkennt er nicht und hier geht es tasächlich um Pixel! Mal erkennt er eine "3" dann wieder eine "1". Je nachdem wie ich die "4" positioniere. Was soll denn erst passieren wenn die Zahlen tatsächlich rotieren?
      Das hat sich tatsächlich super angehört aber so absolut nicht umsetzbar. Ich denke, ich werde hier auf einen Impulsgeber umsteigen um den Wasserverbrauch zu zählen.
      Schade
      Für dich nochmal die aktuellen Zahlen
      ziffer5.jpg ziffer4.jpg ziffer3.jpg ziffer2.jpg ziffer1.jpg zeiger4.jpg zeiger3.jpg zeiger2.jpg zeiger1.jpg rot.jpg resize_tmp.jpg org.jpg alg.jpg aktuell.jpg

      coyoteC Offline
      coyoteC Offline
      coyote
      Most Active
      schrieb am zuletzt editiert von
      #67

      @intruder7 sagte in Wasserzähler - Selfmade:

      Ich denke, ich werde hier auf einen Impulsgeber umsteigen um den Wasserverbrauch zu zählen.

      Willst du da was fertiges nehmen oder sowas wie im Homematic Forum, der Eigenbau von Eugen (Funkleuchtturm)?

      I 1 Antwort Letzte Antwort
      0
      • coyoteC coyote

        @intruder7 sagte in Wasserzähler - Selfmade:

        Ich denke, ich werde hier auf einen Impulsgeber umsteigen um den Wasserverbrauch zu zählen.

        Willst du da was fertiges nehmen oder sowas wie im Homematic Forum, der Eigenbau von Eugen (Funkleuchtturm)?

        I Offline
        I Offline
        intruder7
        schrieb am zuletzt editiert von
        #68

        @coyote
        Hatte dieses im Auge
        Link Text
        mit dem HM-ES-TX-WM

        coyoteC 1 Antwort Letzte Antwort
        0
        • I intruder7

          Hey @jomjol, ich glaube dieses Projekt ist absolut nicht alltagstauglich. Habe den ganzen Server jetzt zwar auch in einen Docker bekommen. Aber auch dieses nur mit großen Schwierigkeiten. Tensorflow nur mit einer bestimmten Version u.s.w. Hatte noch ein bisschen was umgelötet. Damit hat natürlich die ganze Zentrierung von vorne begonnen.
          36e6630f-b62c-4826-ab45-36ec5bd77310-image.png

          die "4" erkennt er nicht und hier geht es tasächlich um Pixel! Mal erkennt er eine "3" dann wieder eine "1". Je nachdem wie ich die "4" positioniere. Was soll denn erst passieren wenn die Zahlen tatsächlich rotieren?
          Das hat sich tatsächlich super angehört aber so absolut nicht umsetzbar. Ich denke, ich werde hier auf einen Impulsgeber umsteigen um den Wasserverbrauch zu zählen.
          Schade
          Für dich nochmal die aktuellen Zahlen
          ziffer5.jpg ziffer4.jpg ziffer3.jpg ziffer2.jpg ziffer1.jpg zeiger4.jpg zeiger3.jpg zeiger2.jpg zeiger1.jpg rot.jpg resize_tmp.jpg org.jpg alg.jpg aktuell.jpg

          J Offline
          J Offline
          jomjol
          schrieb am zuletzt editiert von
          #69

          @intruder7 Schade! Mit den Ziffern habe ich tatsächlich an wenigsten Probleme. Aber natürlich sind sie auch genau mit meinen Ziffern geteached.
          Ich bin gerade im Familieurlaub und der WAF Faktor erlaubt keine größeren Aktivitäten am Wasserzähler.
          Habe Interesse an dem docker Container. Kannst du mir das Dickerfile schicken?

          I 1 Antwort Letzte Antwort
          0
          • L Offline
            L Offline
            lutzer
            schrieb am zuletzt editiert von
            #70

            Sehr coole Idee, werde ich im Herbst erst testen können aber mach ich definitiv.
            Ich hatte so was schon lange gesucht, also Bilderkennung. Denn ich habe da noch mehr Anwendungen.
            Einmal der Druckwächter vom Kamin (https://www.leda.de/produkte/elektronik/luc/). Da hole ich mir zwar den Schaltzustand vom ISG der Wärmepumpe aber die Tamperatur im Kamin ist ja auch noch nett.
            Dann die Staubsaugeranlage (http://www.bvc-zentralstaubsauger.de/zentralstaubsauger/details/), da ist ja ein nettes Display dran, aber das Ding hängt in der Garage ganz hinten ;)
            Und dann soll noch eine Klimaanlage her, die wird sicher auch nicht so smart sein wie man es heute braucht.
            Im Prinzip alles wo man von Analog auf Digital möchte.

            Also du siehst weiter machen lohnt sich. :+1:

            1 Antwort Letzte Antwort
            0
            • I intruder7

              @coyote
              Hatte dieses im Auge
              Link Text
              mit dem HM-ES-TX-WM

              coyoteC Offline
              coyoteC Offline
              coyote
              Most Active
              schrieb am zuletzt editiert von
              #71

              @intruder7 ok gut, dass wäre ja dann Eugens Lösung mit dem HM Modul dran. Das HM Modul bräuchte ich nicht, könnte den Zähler direkt an ein Wired Modul hängen

              1 Antwort Letzte Antwort
              0
              • J jomjol

                @intruder7 Schade! Mit den Ziffern habe ich tatsächlich an wenigsten Probleme. Aber natürlich sind sie auch genau mit meinen Ziffern geteached.
                Ich bin gerade im Familieurlaub und der WAF Faktor erlaubt keine größeren Aktivitäten am Wasserzähler.
                Habe Interesse an dem docker Container. Kannst du mir das Dickerfile schicken?

                I Offline
                I Offline
                intruder7
                schrieb am zuletzt editiert von
                #72

                @jomjol
                naja schicken wird schwierig. sind mehrere 100MB. Ich schaue mal ob ich es irgendwie über google drive freigeben kann.

                1 Antwort Letzte Antwort
                0
                • I Offline
                  I Offline
                  intruder7
                  schrieb am zuletzt editiert von
                  #73

                  Guten Morgen,
                  habe den Zähler oder die Ausleseeinheit jetzt 2 Tage laufen gelassen. Ich frage mit dem Parser adapter die Seite vom Server alle 30 sec ab und parse mir das Ergebnis da raus. Gelogt werden sie mittels sql Adapter. Was mir aufgefallen ist.

                  1. die Werte springen teilweise durch falsche Erkennung der Zahlen. Sieht man hier sehr gut.
                    Auch die analogen Werte springen. Wobei ich nicht weiß ob es hier an der Spiegelung der LED´s liegt.

                  3c6c7d8d-a74b-442f-961f-70e857412a79-image.png
                  Habe den Punkt in einen Verbrauchswerte Skript mit eingebunden welches natürlich total unbrauchbare Werte liefert durch das vor und zurück.
                  2. Wenn aus irgendwelchen Gründen der ESP vom Server nicht erreichbar ist oder ein unbrauchbares Bild liefert weil WLAN zu schlecht , beendet sich der ganze Server. Das ist natürlich auch ungünstig. Das müsste irgendwie abgefangen werden.

                  Ich teste weiter

                  1 Antwort Letzte Antwort
                  0
                  • J jomjol

                    @intruder7 Habe sie gerade bei mir durchgelassen (neu trainiertes CNN) - zeigt die richtigen Werte. Wenn du wieder ein paar falsche Ziffern hast, schicke sie mir einfach.

                    J Offline
                    J Offline
                    jomjol
                    schrieb am zuletzt editiert von
                    #74

                    Ich habe inzwischen auch ein Docker Image zu vereinfachten Installation der Bildverarbeitung erzeugt: https://hub.docker.com/r/jomjol/wasserzaehler

                    In Summe ist das Projekt jetzt aufgrund technischer Limitationen in NodeJS auf Python umgestellt worden - die Links im allerersten Post habe ich upgedated.

                    Viel Spass beim Ausprobieren und bitte gerne Feedback an mich.

                    Gruß,
                    jomjol

                    1 Antwort Letzte Antwort
                    0
                    • M Offline
                      M Offline
                      mcchickents
                      schrieb am zuletzt editiert von
                      #75

                      Hi das mit dem Docker Image hört sich ja super an, werde ich mir heute Abend anschauen.
                      Ist es jetzt eigentlich möglich als Hardware den ESP 32 zu verwenden hat das schon jemand zum laufen bekommen?

                      Gruß Julian

                      J 2 Antworten Letzte Antwort
                      0
                      • M mcchickents

                        Hi das mit dem Docker Image hört sich ja super an, werde ich mir heute Abend anschauen.
                        Ist es jetzt eigentlich möglich als Hardware den ESP 32 zu verwenden hat das schon jemand zum laufen bekommen?

                        Gruß Julian

                        J Offline
                        J Offline
                        jomjol
                        schrieb am zuletzt editiert von
                        #76

                        @mcchickents Prinzipiell ja. Ich habe mir probehalbe ein ESP32-CAM Modul gekauft (China ca 5 EUR, Amazon ca. 12 EUR), das ist ein ESP32 mit OV2640-Kamera. Bilder von der Kamera habe ich, aber die Ansteuerung der LEDs ist noch nicht implementiert, da ich im Urlaub bin und dort keine LEDs-Strips mit habe :-).
                        Habe jetzt die letzten beiden Wochen mit dem Docker Container und der Einbindung von Tensorflow zugebracht - musste einiges neu Lernen und Tensorflow ist etwas spezifisch, was die HW angeht. Ich wollte es unbedingt auf meiner Synology-DS zum Laufen bringen und die hat nur einen einfachen Intel-Prozessor.
                        Gruß, jomjol

                        R 1 Antwort Letzte Antwort
                        0
                        • J jomjol

                          @mcchickents Prinzipiell ja. Ich habe mir probehalbe ein ESP32-CAM Modul gekauft (China ca 5 EUR, Amazon ca. 12 EUR), das ist ein ESP32 mit OV2640-Kamera. Bilder von der Kamera habe ich, aber die Ansteuerung der LEDs ist noch nicht implementiert, da ich im Urlaub bin und dort keine LEDs-Strips mit habe :-).
                          Habe jetzt die letzten beiden Wochen mit dem Docker Container und der Einbindung von Tensorflow zugebracht - musste einiges neu Lernen und Tensorflow ist etwas spezifisch, was die HW angeht. Ich wollte es unbedingt auf meiner Synology-DS zum Laufen bringen und die hat nur einen einfachen Intel-Prozessor.
                          Gruß, jomjol

                          R Offline
                          R Offline
                          ruebenschuss
                          schrieb am zuletzt editiert von
                          #77

                          Hi,
                          auch von mir noch Mal ein großes Danke und Hochachtung für die schöne Umsetzung! Ich hab schon seit Jahren eine OCR für die Ziffern im Einsatz und hatte es mir als Projekt für den Urlaub vorgenommen, die analogen Nadeln mit Tensorflow zu lernen. Beim Googeln hab ich Dein Projekt gefunden und das ist natürlich viel schöner!
                          Blöderweise hatte ich es vor zwei Wochen angefangen, alles für nodejs installiert und als ich heute weiter machen wollte, ist es plötzlich in python ;-)) nee nee, viel besser, alles gut :-)

                          Das pip install requirements hat bei mir nicht funktioniert.
                          Ich musste unter debian 10.0 / x86_64 das folgende machen, ich hoffe, es hilft jemandem :

                          pip3 install requests Keras numpy Pillow opencv-python tensorflow --no-cache-dir
                          

                          Ich hab die config.ini angepasst und kann den Server starten. Leider bekomme ich eine Fehlermeldung, mit der ich nicht weiter komme:

                          root@dasding:~/water-meter-system-complete/code# python3 wasseruhr.py
                          Using TensorFlow backend.
                          /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                            _np_qint8 = np.dtype([("qint8", np.int8, 1)])
                          /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                            _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
                          /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                            _np_qint16 = np.dtype([("qint16", np.int16, 1)])
                          /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                            _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
                          /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                            _np_qint32 = np.dtype([("qint32", np.int32, 1)])
                          /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                            np_resource = np.dtype([("resource", np.ubyte, 1)])
                          /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                            _np_qint8 = np.dtype([("qint8", np.int8, 1)])
                          /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                            _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
                          /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                            _np_qint16 = np.dtype([("qint16", np.int16, 1)])
                          /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                            _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
                          /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                            _np_qint32 = np.dtype([("qint32", np.int32, 1)])
                          /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                            np_resource = np.dtype([("resource", np.ubyte, 1)])
                          Start Init Zaehlerstand
                          WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/init_ops.py:97: calling Zeros.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
                          Instructions for updating:
                          Call initializer instance with the dtype argument instead of passing it to the constructor
                          WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/init_ops.py:97: calling Ones.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
                          Instructions for updating:
                          Call initializer instance with the dtype argument instead of passing it to the constructor
                          WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/init_ops.py:97: calling GlorotUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
                          Instructions for updating:
                          Call initializer instance with the dtype argument instead of passing it to the constructor
                          WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
                          Instructions for updating:
                          Call initializer instance with the dtype argument instead of passing it to the constructor
                          2019-09-02 16:36:45.093960: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
                          2019-09-02 16:36:45.116365: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 1992000000 Hz
                          2019-09-02 16:36:45.116783: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x43bb350 executing computations on platform Host. Devices:
                          2019-09-02 16:36:45.116823: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
                          2019-09-02 16:36:45.136602: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
                          Analog Model Init Done
                          Digital Model Init Done
                          serving at port 3000
                          Picture Download done
                          ----------------------------------------
                          Exception happened during processing of request from ('10.0.0.71', 55985)
                          Traceback (most recent call last):
                            File "/usr/lib/python3.7/socketserver.py", line 316, in _handle_request_noblock
                              self.process_request(request, client_address)
                            File "/usr/lib/python3.7/socketserver.py", line 347, in process_request
                              self.finish_request(request, client_address)
                            File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
                              self.RequestHandlerClass(request, client_address, self)
                            File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
                              self.handle()
                            File "/usr/lib/python3.7/http/server.py", line 426, in handle
                              self.handle_one_request()
                            File "/usr/lib/python3.7/http/server.py", line 414, in handle_one_request
                              method()
                            File "wasseruhr.py", line 30, in do_GET
                              result = wasserzaehler.getZaehlerstand('./image_tmp/original.jpg', simple, preValue)
                          NameError: name 'preValue' is not defined
                          ----------------------------------------
                          

                          Kann jemand damit was anfangen und mir weiterhelfen? Der Server bleibt weiter am Leben und nimmt neue requests an. Die Fehlermeldung ist immer die gleiche.

                          Vielen Dank für alle Hinweise und schöne Grüße,
                          Ruebenschuss

                          J 2 Antworten Letzte Antwort
                          0
                          • R Offline
                            R Offline
                            ReverZ
                            schrieb am zuletzt editiert von
                            #78

                            Echt stark, der Support für den Wasserzähler!
                            Aber als nächstes kommt einer um die Ecke und will das als Proxmox-Container :blush:


                            z.B. ich <duck und schnell weg>

                            1 Antwort Letzte Antwort
                            0
                            • R ruebenschuss

                              Hi,
                              auch von mir noch Mal ein großes Danke und Hochachtung für die schöne Umsetzung! Ich hab schon seit Jahren eine OCR für die Ziffern im Einsatz und hatte es mir als Projekt für den Urlaub vorgenommen, die analogen Nadeln mit Tensorflow zu lernen. Beim Googeln hab ich Dein Projekt gefunden und das ist natürlich viel schöner!
                              Blöderweise hatte ich es vor zwei Wochen angefangen, alles für nodejs installiert und als ich heute weiter machen wollte, ist es plötzlich in python ;-)) nee nee, viel besser, alles gut :-)

                              Das pip install requirements hat bei mir nicht funktioniert.
                              Ich musste unter debian 10.0 / x86_64 das folgende machen, ich hoffe, es hilft jemandem :

                              pip3 install requests Keras numpy Pillow opencv-python tensorflow --no-cache-dir
                              

                              Ich hab die config.ini angepasst und kann den Server starten. Leider bekomme ich eine Fehlermeldung, mit der ich nicht weiter komme:

                              root@dasding:~/water-meter-system-complete/code# python3 wasseruhr.py
                              Using TensorFlow backend.
                              /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                _np_qint8 = np.dtype([("qint8", np.int8, 1)])
                              /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
                              /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                _np_qint16 = np.dtype([("qint16", np.int16, 1)])
                              /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
                              /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                _np_qint32 = np.dtype([("qint32", np.int32, 1)])
                              /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                np_resource = np.dtype([("resource", np.ubyte, 1)])
                              /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                _np_qint8 = np.dtype([("qint8", np.int8, 1)])
                              /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
                              /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                _np_qint16 = np.dtype([("qint16", np.int16, 1)])
                              /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
                              /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                _np_qint32 = np.dtype([("qint32", np.int32, 1)])
                              /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                np_resource = np.dtype([("resource", np.ubyte, 1)])
                              Start Init Zaehlerstand
                              WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/init_ops.py:97: calling Zeros.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
                              Instructions for updating:
                              Call initializer instance with the dtype argument instead of passing it to the constructor
                              WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/init_ops.py:97: calling Ones.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
                              Instructions for updating:
                              Call initializer instance with the dtype argument instead of passing it to the constructor
                              WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/init_ops.py:97: calling GlorotUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
                              Instructions for updating:
                              Call initializer instance with the dtype argument instead of passing it to the constructor
                              WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
                              Instructions for updating:
                              Call initializer instance with the dtype argument instead of passing it to the constructor
                              2019-09-02 16:36:45.093960: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
                              2019-09-02 16:36:45.116365: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 1992000000 Hz
                              2019-09-02 16:36:45.116783: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x43bb350 executing computations on platform Host. Devices:
                              2019-09-02 16:36:45.116823: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
                              2019-09-02 16:36:45.136602: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
                              Analog Model Init Done
                              Digital Model Init Done
                              serving at port 3000
                              Picture Download done
                              ----------------------------------------
                              Exception happened during processing of request from ('10.0.0.71', 55985)
                              Traceback (most recent call last):
                                File "/usr/lib/python3.7/socketserver.py", line 316, in _handle_request_noblock
                                  self.process_request(request, client_address)
                                File "/usr/lib/python3.7/socketserver.py", line 347, in process_request
                                  self.finish_request(request, client_address)
                                File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
                                  self.RequestHandlerClass(request, client_address, self)
                                File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
                                  self.handle()
                                File "/usr/lib/python3.7/http/server.py", line 426, in handle
                                  self.handle_one_request()
                                File "/usr/lib/python3.7/http/server.py", line 414, in handle_one_request
                                  method()
                                File "wasseruhr.py", line 30, in do_GET
                                  result = wasserzaehler.getZaehlerstand('./image_tmp/original.jpg', simple, preValue)
                              NameError: name 'preValue' is not defined
                              ----------------------------------------
                              

                              Kann jemand damit was anfangen und mir weiterhelfen? Der Server bleibt weiter am Leben und nimmt neue requests an. Die Fehlermeldung ist immer die gleiche.

                              Vielen Dank für alle Hinweise und schöne Grüße,
                              Ruebenschuss

                              J Offline
                              J Offline
                              jomjol
                              schrieb am zuletzt editiert von
                              #79

                              @ruebenschuss Danke für das schnelle Feedback. Es ist ein Fehler meinerseits. Ich hatte noch schnell eine Korrektur vor dem Upload machen wollen und dann eine Typo eingebaut, weswegen eine Variable nicht benannt ist.
                              Ich habe gerade eine neue Version hochgeladen - auch in einer der Files im Verzeichnis lib war noch ein Fehler.
                              Bitte /code erneut runterladen und nochmal probieren.
                              Sorry für den Zusatzaufwand - Anfängerfehler meinerseits :confused:

                              R 1 Antwort Letzte Antwort
                              0
                              • R ruebenschuss

                                Hi,
                                auch von mir noch Mal ein großes Danke und Hochachtung für die schöne Umsetzung! Ich hab schon seit Jahren eine OCR für die Ziffern im Einsatz und hatte es mir als Projekt für den Urlaub vorgenommen, die analogen Nadeln mit Tensorflow zu lernen. Beim Googeln hab ich Dein Projekt gefunden und das ist natürlich viel schöner!
                                Blöderweise hatte ich es vor zwei Wochen angefangen, alles für nodejs installiert und als ich heute weiter machen wollte, ist es plötzlich in python ;-)) nee nee, viel besser, alles gut :-)

                                Das pip install requirements hat bei mir nicht funktioniert.
                                Ich musste unter debian 10.0 / x86_64 das folgende machen, ich hoffe, es hilft jemandem :

                                pip3 install requests Keras numpy Pillow opencv-python tensorflow --no-cache-dir
                                

                                Ich hab die config.ini angepasst und kann den Server starten. Leider bekomme ich eine Fehlermeldung, mit der ich nicht weiter komme:

                                root@dasding:~/water-meter-system-complete/code# python3 wasseruhr.py
                                Using TensorFlow backend.
                                /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
                                /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
                                /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
                                /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
                                /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
                                /usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                  np_resource = np.dtype([("resource", np.ubyte, 1)])
                                /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
                                /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
                                /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
                                /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
                                /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
                                /usr/local/lib/python3.7/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
                                  np_resource = np.dtype([("resource", np.ubyte, 1)])
                                Start Init Zaehlerstand
                                WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/init_ops.py:97: calling Zeros.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
                                Instructions for updating:
                                Call initializer instance with the dtype argument instead of passing it to the constructor
                                WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/init_ops.py:97: calling Ones.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
                                Instructions for updating:
                                Call initializer instance with the dtype argument instead of passing it to the constructor
                                WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/init_ops.py:97: calling GlorotUniform.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
                                Instructions for updating:
                                Call initializer instance with the dtype argument instead of passing it to the constructor
                                WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
                                Instructions for updating:
                                Call initializer instance with the dtype argument instead of passing it to the constructor
                                2019-09-02 16:36:45.093960: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
                                2019-09-02 16:36:45.116365: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 1992000000 Hz
                                2019-09-02 16:36:45.116783: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x43bb350 executing computations on platform Host. Devices:
                                2019-09-02 16:36:45.116823: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
                                2019-09-02 16:36:45.136602: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
                                Analog Model Init Done
                                Digital Model Init Done
                                serving at port 3000
                                Picture Download done
                                ----------------------------------------
                                Exception happened during processing of request from ('10.0.0.71', 55985)
                                Traceback (most recent call last):
                                  File "/usr/lib/python3.7/socketserver.py", line 316, in _handle_request_noblock
                                    self.process_request(request, client_address)
                                  File "/usr/lib/python3.7/socketserver.py", line 347, in process_request
                                    self.finish_request(request, client_address)
                                  File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
                                    self.RequestHandlerClass(request, client_address, self)
                                  File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
                                    self.handle()
                                  File "/usr/lib/python3.7/http/server.py", line 426, in handle
                                    self.handle_one_request()
                                  File "/usr/lib/python3.7/http/server.py", line 414, in handle_one_request
                                    method()
                                  File "wasseruhr.py", line 30, in do_GET
                                    result = wasserzaehler.getZaehlerstand('./image_tmp/original.jpg', simple, preValue)
                                NameError: name 'preValue' is not defined
                                ----------------------------------------
                                

                                Kann jemand damit was anfangen und mir weiterhelfen? Der Server bleibt weiter am Leben und nimmt neue requests an. Die Fehlermeldung ist immer die gleiche.

                                Vielen Dank für alle Hinweise und schöne Grüße,
                                Ruebenschuss

                                J Offline
                                J Offline
                                jomjol
                                schrieb am zuletzt editiert von
                                #80

                                @ruebenschuss Noch ein Hinweis zur Testumgebung: ich habe alles zunächst in Windows in einer Python 3.7 Umgebung umgesetzt und erst dann den Übergang zu einem Linux in Docker gemacht.
                                Die Python-Umgebung habe ich über Anaconda installiert und gemanaged. Das funktioniert sehr gut.
                                Das ganze hatte für mich den Vorteil, dass du recht einfach Bibliotheken für Tensorflow, Keras, ... installieren kannst. Mittels iPython habe ich das Training der neuronalen Netze recht einfach steuern können, ohne viel Programmieren und gut dokumentierbar. Meine iPython Skripte für die CNN-Netze sollten recht einfach funktionieren und mit anderen Bildern auch trainiert werden.
                                Gleichzeit kannst du über VS-Code sehr komfortabel den Server programmieren und debuggen.

                                1 Antwort Letzte Antwort
                                0
                                • J jomjol

                                  @ruebenschuss Danke für das schnelle Feedback. Es ist ein Fehler meinerseits. Ich hatte noch schnell eine Korrektur vor dem Upload machen wollen und dann eine Typo eingebaut, weswegen eine Variable nicht benannt ist.
                                  Ich habe gerade eine neue Version hochgeladen - auch in einer der Files im Verzeichnis lib war noch ein Fehler.
                                  Bitte /code erneut runterladen und nochmal probieren.
                                  Sorry für den Zusatzaufwand - Anfängerfehler meinerseits :confused:

                                  R Offline
                                  R Offline
                                  ruebenschuss
                                  schrieb am zuletzt editiert von
                                  #81

                                  @jomjol Hey, DU brauchst Dich doch für gar nichts zu entschuldigen !!! ;-) Du machst so eine tolle Arbeit und stellst sie allen zur Verfügung, ganz locker bleiben... Es war auch gar nicht als Kritik gemeint, sondern nur als Feedback und Frage, ob jemand Hilfe weiss... Und dass Du dann auch noch so schnellen Support gibst ist echt ein Traum. Wenn ich es zum Laufen bekommen hab, spendiere ich 'ne Kiste eines Kaltgetränkes Deiner Wahl :-)

                                  Ich hab die neue Version gezogen. Er scheint jetzt ein bisschen weiter zu kommen, "Start CutImage" kommt jetzt, das gab es vorher noch nicht. Aber ich kriege immer noch Fehler geworfen:

                                  ----------------------------------------
                                  Picture Download done
                                  Start CutImage
                                  ----------------------------------------
                                  Exception happened during processing of request from ('10.0.0.71', 50101)
                                  Traceback (most recent call last):
                                    File "/usr/lib/python3.7/socketserver.py", line 316, in _handle_request_noblock
                                      self.process_request(request, client_address)
                                    File "/usr/lib/python3.7/socketserver.py", line 347, in process_request
                                      self.finish_request(request, client_address)
                                    File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
                                      self.RequestHandlerClass(request, client_address, self)
                                    File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
                                      self.handle()
                                    File "/usr/lib/python3.7/http/server.py", line 426, in handle
                                      self.handle_one_request()
                                    File "/usr/lib/python3.7/http/server.py", line 414, in handle_one_request
                                      method()
                                    File "wasseruhr.py", line 31, in do_GET
                                      result = wasserzaehler.getZaehlerstand('./image_tmp/original.jpg', simple, preValue)
                                    File "/root/water-meter-system-complete/code/lib/ZaehlerstandClass.py", line 34, in getZaehlerstand
                                      resultcut = self.CutImage.Cut(img_file)
                                    File "/root/water-meter-system-complete/code/lib/CutImageClass.py", line 58, in Cut
                                      target = self.Alignment(target)
                                    File "/root/water-meter-system-complete/code/lib/CutImageClass.py", line 96, in Alignment
                                      p0 = self.getRefCoordinate(source, ref0)
                                    File "/root/water-meter-system-complete/code/lib/CutImageClass.py", line 111, in getRefCoordinate
                                      res = cv2.matchTemplate(image, template, method)
                                  cv2.error: OpenCV(4.1.0) /io/opencv/modules/imgproc/src/templmatch.cpp:1107: error: (-215:Assertion failed) (depth == CV_8U || depth == CV_32F) && type == _templ.type() && _img.dims() <= 2 in function 'matchTemplate'
                                  
                                  ----------------------------------------
                                  
                                  

                                  Hab ich ein falsches Bildformat? Ich gucke auch mal in den Code ob ich was erahnen kann...
                                  Danke noch Mal und beste Grüße, Ruebenschuss

                                  R 1 Antwort Letzte Antwort
                                  0
                                  • R ruebenschuss

                                    @jomjol Hey, DU brauchst Dich doch für gar nichts zu entschuldigen !!! ;-) Du machst so eine tolle Arbeit und stellst sie allen zur Verfügung, ganz locker bleiben... Es war auch gar nicht als Kritik gemeint, sondern nur als Feedback und Frage, ob jemand Hilfe weiss... Und dass Du dann auch noch so schnellen Support gibst ist echt ein Traum. Wenn ich es zum Laufen bekommen hab, spendiere ich 'ne Kiste eines Kaltgetränkes Deiner Wahl :-)

                                    Ich hab die neue Version gezogen. Er scheint jetzt ein bisschen weiter zu kommen, "Start CutImage" kommt jetzt, das gab es vorher noch nicht. Aber ich kriege immer noch Fehler geworfen:

                                    ----------------------------------------
                                    Picture Download done
                                    Start CutImage
                                    ----------------------------------------
                                    Exception happened during processing of request from ('10.0.0.71', 50101)
                                    Traceback (most recent call last):
                                      File "/usr/lib/python3.7/socketserver.py", line 316, in _handle_request_noblock
                                        self.process_request(request, client_address)
                                      File "/usr/lib/python3.7/socketserver.py", line 347, in process_request
                                        self.finish_request(request, client_address)
                                      File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
                                        self.RequestHandlerClass(request, client_address, self)
                                      File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
                                        self.handle()
                                      File "/usr/lib/python3.7/http/server.py", line 426, in handle
                                        self.handle_one_request()
                                      File "/usr/lib/python3.7/http/server.py", line 414, in handle_one_request
                                        method()
                                      File "wasseruhr.py", line 31, in do_GET
                                        result = wasserzaehler.getZaehlerstand('./image_tmp/original.jpg', simple, preValue)
                                      File "/root/water-meter-system-complete/code/lib/ZaehlerstandClass.py", line 34, in getZaehlerstand
                                        resultcut = self.CutImage.Cut(img_file)
                                      File "/root/water-meter-system-complete/code/lib/CutImageClass.py", line 58, in Cut
                                        target = self.Alignment(target)
                                      File "/root/water-meter-system-complete/code/lib/CutImageClass.py", line 96, in Alignment
                                        p0 = self.getRefCoordinate(source, ref0)
                                      File "/root/water-meter-system-complete/code/lib/CutImageClass.py", line 111, in getRefCoordinate
                                        res = cv2.matchTemplate(image, template, method)
                                    cv2.error: OpenCV(4.1.0) /io/opencv/modules/imgproc/src/templmatch.cpp:1107: error: (-215:Assertion failed) (depth == CV_8U || depth == CV_32F) && type == _templ.type() && _img.dims() <= 2 in function 'matchTemplate'
                                    
                                    ----------------------------------------
                                    
                                    

                                    Hab ich ein falsches Bildformat? Ich gucke auch mal in den Code ob ich was erahnen kann...
                                    Danke noch Mal und beste Grüße, Ruebenschuss

                                    R Offline
                                    R Offline
                                    ruebenschuss
                                    schrieb am zuletzt editiert von
                                    #82

                                    @jomjol Meine Webcam macht Bilder in ca der halben Auflösung wie Deine. Mein Zähler sieht fast exakt so wie Deiner aus, die Referenz-Bilder würden also exakt passen, aber die Koordinaten im Bild und Pixel-Dimensionen sind alle ca die Hälfte von Deinen. Macht das Probleme mit den Referenz-Bildern? Muss ich die bei mir ausschneiden und in exakt der gleichen Pixel-Dimension ablegen?

                                    R 1 Antwort Letzte Antwort
                                    0
                                    • R ruebenschuss

                                      @jomjol Meine Webcam macht Bilder in ca der halben Auflösung wie Deine. Mein Zähler sieht fast exakt so wie Deiner aus, die Referenz-Bilder würden also exakt passen, aber die Koordinaten im Bild und Pixel-Dimensionen sind alle ca die Hälfte von Deinen. Macht das Probleme mit den Referenz-Bildern? Muss ich die bei mir ausschneiden und in exakt der gleichen Pixel-Dimension ablegen?

                                      R Offline
                                      R Offline
                                      ruebenschuss
                                      schrieb am zuletzt editiert von
                                      #83

                                      Mein Bild, das der Server hochgeladen und rotiert hat:
                                      root@dasding:~/water-meter-system-complete/code# jpeginfo image_tmp/rot.jpg
                                      image_tmp/rot.jpg 480 x 640 24bit JFIF N 195283

                                      Dein Referenz Bild.
                                      root@dasding:~/water-meter-system-complete/code# jpeginfo image_tmp/Referenz.jpg
                                      image_tmp/Referenz.jpg 800 x 600 24bit Exif N 92628

                                      R 1 Antwort Letzte Antwort
                                      0
                                      • R ruebenschuss

                                        Mein Bild, das der Server hochgeladen und rotiert hat:
                                        root@dasding:~/water-meter-system-complete/code# jpeginfo image_tmp/rot.jpg
                                        image_tmp/rot.jpg 480 x 640 24bit JFIF N 195283

                                        Dein Referenz Bild.
                                        root@dasding:~/water-meter-system-complete/code# jpeginfo image_tmp/Referenz.jpg
                                        image_tmp/Referenz.jpg 800 x 600 24bit Exif N 92628

                                        R Offline
                                        R Offline
                                        ruebenschuss
                                        schrieb am zuletzt editiert von
                                        #84

                                        okay: ich habe jetzt mein Bild erst Mal so ausgeschnitten, wie der Referenzausschnitt ist und dann auf 800x600 skaliert und nun läuft es durch.

                                        convert -rotate 90 -crop 452x339+0+114 -scale 800x600 /data/webcam/in.jpg /data/webcam/out.jpg
                                        

                                        Im Moment kann er noch gar nichts Sinnvolles erkennen und die Bilder, die er auf "&full" zurück geben sollte, sind alle leer. Aber zumindest läuft er nun ohne Fehlermeldung durch.

                                        Ich gucke mir jetzt mal die Bilder an, die er extrahiert, eventuell hab ich noch einen Fehler in meiner config.ini

                                        Dies nur schnell, damit ihr wisst, dass das Problem gelöst ist, wenn man das Bild vorher ordentlich skaliert.

                                        1 Antwort Letzte Antwort
                                        0
                                        • R Offline
                                          R Offline
                                          ruebenschuss
                                          schrieb am zuletzt editiert von
                                          #85

                                          Und noch ein Update:
                                          Der Grund, warum bei mir die Bilder nicht angezeigt wurden ist, dass ich Safari als Browser benutzt habe. Im Debugging Modus zeigt er die Nachricht :

                                          "Failed to load resource: Cancelled load from ... because it is using HTTP/0.9"

                                          Wenn ich Firefox nehme, dann sehe ich alle Bilder.
                                          :man-facepalming: und ich hab im python code tausend debug messages eingebaut...

                                          Jetzt sind die ausgelesenen Werte noch grützig, die Ziffern gehen gar nicht. Muss noch an der config.ini schrauben oder eventuell bei meinem Bild vorher noch den Kontrast erhöhen.

                                          J 1 Antwort Letzte Antwort
                                          0
                                          Antworten
                                          • In einem neuen Thema antworten
                                          Anmelden zum Antworten
                                          • Älteste zuerst
                                          • Neuste zuerst
                                          • Meiste Stimmen


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          740

                                          Online

                                          32.4k

                                          Benutzer

                                          81.4k

                                          Themen

                                          1.3m

                                          Beiträge
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Anmelden

                                          • Du hast noch kein Konto? Registrieren

                                          • Anmelden oder registrieren, um zu suchen
                                          • Erster Beitrag
                                            Letzter Beitrag
                                          0
                                          • Home
                                          • Aktuell
                                          • Tags
                                          • Ungelesen 0
                                          • Kategorien
                                          • Unreplied
                                          • Beliebt
                                          • GitHub
                                          • Docu
                                          • Hilfe