Leakage Current from Iseg
The iseg HV is controlled by the windowsXP machine with a software provided from Iseg.
It may be impossible to get the HV reading directly (may be search for the memory?)
Another way around is using OCR (optical Character Recognition) program to extract the leakage current.
- The Google Tesseract-OCR Engine,
- python package Pillow, image processing program
- python pytesseract https://pypi.org/project/pytesseract/
in Mac, using brew can install the Tesseract, and using python3 pip for Pillow
The program is called OCR.py, only work in python3
- remote desktop to the windowsXP, make it fullscreen (can be not fullscreen, but the code need modification)
- capture the screenshot of the remote desktop
- crop the Iseg control window
- find the position of the "C" in "Channel" using the OCR engine, use the coordinate of the "C" as an anchor.
- crop the leakage current for each channel
- save the leakage current into influxDB format
- push to the database
The whole process takes about 3.5 sec to finish.
- the program only work in Mac
- The Iseg windows must be at the upper left corner of the windowsXP
- for the Mac to capture the screenshot, the window ID is needed. There is no easy way to find the window ID in Mac.
- the OCR may fail to recognize the number, or missed the "dot" for decimal place, in that case, the data will be discarded.
- the iseg only show 1 HV module at a time, so, cannot capture all recoil and array at the same time.
find the window ID in Mac
we have to use the Quartz Debug in the Additional tools for Xcode. I already downloaded it and put it in the Applications.
Once open the Quartz debug, on the manual bar -> Window -> Windows List
the window list will open, find the "Microsoft Emote Desktop". There should be two, convert the hex to dec, one of them is correct.