AI Image Sensor Calibration
Table of Contents:
- 1. Overview
- 2. Calibrate Digits Readings
- 3. Get Sensor Data
1. Overview
AIS is a video photo recognition sensor, the sensor can be used in electricity meters, gas meters, water meters, pressure gauges and other types of meters. Accurately identify the number of the current dial or upload the picture of the current dial for comparison, which can replace people to go to the door to read the meter, and is more accurate and energy-saving than the meter. The first thing to do is to fix the AIS sensor, the end direction needs to be aligned with the object that needs to be identified, you can check whether the object all appears in the lens range through the upper computer, and then calibrate, Chapter 2 will explain the calibration method of different tables.
2. Calibrate Digits Readings
The factory default firmware of AIS Sensor is a digital wheel dial. It is recommended that the distance between the camera and the digital wheel dial be 3cm-7cm when installing AIS Sensor. Because the distance is too far, the camera's flash will not be able to illuminate the digital wheel dial to obtain readings.
If you are using a pointer type dial, just adjust the camera to fully see the entire dial.
According to the requirements to upgrade the firmware to correct the reading, respectively:Digital wheel dial firmware,Pointer dial firmware.
Firmware upgrade Reference:Update Firmware for the AI Sensors.
2.1 Calibrate a Water Meter
2.1.1 Introduce
This water meter is designed in accordance with the Chinese standard for drinking cold water meters and hot water meters, GB/T 778.1-2007. It features five dial numbers for measurement accuracy.
2.1.2 Fix Sensor to a Water Meter
The assembly necessitates the use of two screws, two spacers, and this specific device.
Additionally, there are AIS Sensors available along with AUC USB TTL adapters for AIS Sensors.
The fixture below is just a demo, user might adjust it with their water meter. Here is the STEP file for the fixture as below: Water Meter Fixture Demo.
The procedure is as follows:
1. Secure back of the AIS sensor onto the small board and adjust its position according to your requirements. You may use two additional screws for fixation or utilize 3M double-sided adhesive for attachment.
2. Proceed by fastening the device using the previously prepared screws and gaskets.
3. Finally, nestle the device onto your water meter, ensuring that it can be adjusted to meet your specific needs while guaranteeing that the camera is directed towards the digital wheel face.
.
The AI Sensors and AUC USB TTL Adapter for AIS Sensors are connected and then connected to the PC.
2.1.3 Calibration
Open the software HMX_FT4222H_GUI.exe. Please ensure that the firmware upgrade software ota.exe is closed before opening HMX_FT4222H_GUI.exe.
For example, Select the corresponding serial port number, here 14.
Next, select a Baud rate of 921600 and click on "start". Then, click on "show full image" to display the camera screen.
Click "enable Raw" and save the BMP image in the "Save" folder. This step is necessary to obtain the coordinate points of the watch face.
This water meter has only five fields, and the coordinates of the digital roulette wheel are shown in the figure.
If your device's digital scroll wheel dial does not match these five fields, you can try the other field dial coordinate dot plots in 2.4.
The computer's drawing tool can be used to open the latest bmp image and get the coordinates of the digital wheel dial, as shown below. Based on the format of the digital wheel dial, we can obtain each coordinate point of the current use dial. The (x,y) coordinate on the image is located at the bottom left corner.
Click the "ROI setting" button in "HIMAX_AMR_PC_Tool" and three options will pop up
The "Long dial" option is the long hand dial.
The "Short dial" option is the short pointer and digital wheel dial.
The "Digit wheel" option is the digital wheel dial.
Now we are calibrating the digital wheel face of the water meter. Here we select "digit wheel".
1:Fill in the coordinates you just got; it's best to get a coordinate and fill in a coordinate.
2: Fill in the number of number wheel on their dial,fi;
3: Select the number of short Pointers (currently we don't use short Pointers, the "digit wheelu" option defaults to 0);
4: Preview whether the setting of their coordinates is accurate;
5: Click to write all configuration to AIS;
6: Click the exit configuration interface, at this time, there will be a readout. If the Reading of "reading" is consistent with the watch face, the calibration is successful. The AIS cannot move thereafter to avoid misreading.
The effect can be previewed by clicking the "Preview correction" button as shown below.
After the calibration process is completed, it can be observed that the obtained reading aligns consistently with the numerical value displayed on the digital wheel dial.
2.2 Calibration Power Meter
2.2.1 Introduce
This power meter is designed in accordance with the Chinese standard for Electricity metering equipment, GB/T 17215.321-2008. It features six dial numbers for measurement accuracy.
2.2.2 Fix Sensor to a Power Meter
You can utilize a couple of pea clips or other suitable fixtures to securely fasten the AIS sensor and ensure precise alignment of the camera with the digital watch wheel.
2.2.3 Calibration
Open the software HMX_FT4222H_GUI.exe. Please ensure that the firmware upgrade software ota.exe is closed before opening HMX_FT4222H_GUI.exe.
For example, Select the corresponding serial port number, here 14.
Next, select a Baud rate of 921600 and click on "start". Then, click on "show full image" to display the camera screen.
Click "enable Raw" and save the BMP image in the "Save" folder. This step is necessary to obtain the coordinate points of the watch face.
This power meter has only six fields, and the coordinates of the digital roulette wheel are shown in the figure.
If your device's digital scroll wheel dial does not match these six fields, you can try the other field dial coordinate dot plots in 2.4.
The computer's drawing tool can be used to open the latest bmp image and get the coordinates of the digital wheel dial, as shown below. Based on the format of the digital wheel dial, we can obtain each coordinate point of the current use dial. The (x,y) coordinate on the image is located at the bottom left corner.
Click the "ROI setting" button in "HIMAX_AMR_PC_Tool" and three options will pop up
The "Long dial" option is the long hand dial.
The "Short dial" option is the short pointer and digital wheel dial.
The "Digit wheel" option is the digital wheel dial.
Now we are calibrating the digital wheel face of the power meter. Here we select "digit wheel".
1: Fill in the coordinates you just got; it's best to get a coordinate and fill in a coordinate.
2: Fill in the number of number wheel on their dial,six;
3: Select the number of short Pointers (currently we don't use short Pointers, the "digit wheelu" option defaults to 0);
4: Preview whether the setting of their coordinates is accurate;
5: Click to write all configuration to AIS;
6: Click the exit configuration interface, at this time, there will be a readout. If the Reading of "reading" is consistent with the watch face, the calibration is successful. The AIS cannot move thereafter to avoid misreading.
The effect can be previewed by clicking the "Preview correction" button as shown below.
After the calibration process is completed, it can be observed that the obtained reading aligns consistently with the numerical value displayed on the digital wheel dial.
2.3 Calibration Gas Meter
2.3.1 Introduce
This gas meter uses G2.5 membrane gas meter. It features eight dial numbers for measurement accuracy.
2.3.2 Fix Sensor to a Gas Meter
You can utilize a couple of pea clips or other suitable fixtures to securely fasten the AIS sensor and ensure precise alignment of the camera with the digital watch wheel.
2.3.3 Calibration
Open the software HMX_FT4222H_GUI.exe. Please ensure that the firmware upgrade software ota.exe is closed before opening HMX_FT4222H_GUI.exe.
For example, Select the corresponding serial port number, here 14.
Next, select a Baud rate of 921600 and click on "start". Then, click on "show full image" to display the camera screen.
Click "enable Raw" and save the BMP image in the "Save" folder. This step is necessary to obtain the coordinate points of the watch face.
This gas meter has eight fields, and the coordinates of the digital roulette wheel are shown in the figure.
If your device's digital scroll wheel dial does not match these eight fields, you can try the other field dial coordinate dot plots in 2.4.
The computer's drawing tool can be used to open the latest bmp image and get the coordinates of the digital wheel dial, as shown below. Based on the format of the digital wheel dial, we can obtain each coordinate point of the current use dial. The (x,y) coordinate on the image is located at the bottom left corner.
Click the "ROI setting" button in "HIMAX_AMR_PC_Tool" and three options will pop up
The "Long dial" option is the long hand dial.
The "Short dial" option is the short pointer and digital wheel dial.
The "Digit wheel" option is the digital wheel dial.
Now we are calibrating the digital wheel face of the gas meter. Here we select "digit wheel".
1: Fill in the coordinates you just got; it's best to get a coordinate and fill in a coordinate.
2: Fill in the number of number wheel on their dial,eight;
3: Select the number of short Pointers (currently we don't use short Pointers, the "digit wheelu" option defaults to 0);
4: Preview whether the setting of their coordinates is accurate;
5: Click to write all configuration to AIS;
6: Click the exit configuration interface, at this time, there will be a readout. If the Reading of "reading" is consistent with the watch face, the calibration is successful. The AIS cannot move thereafter to avoid misreading.
The effect can be previewed by clicking the "Preview correction" button as shown below.
After the calibration process is completed, it can be observed that the obtained reading aligns consistently with the numerical value displayed on the digital wheel dial.
2.4 Digital wheel dial take point coordinate diagram
4 numbers:
5 numbers:
6 numbers:
7 numbers:
8 numbers:
2.5 Pressure Pointer Meter Calibration
2.5.1 Introduce
The pressure pointer meter of the example is 1.6MPa range
2.5.2 Fix Sensor to a Power Meter
You can utilize a couple of pea clips or other suitable fixtures to securely fasten the AIS sensor and ensure precise alignment of the camera with the pressure pointer meter.
2.5.3 Calibration
Open the software HMX_FT4222H_GUI.exe. Please ensure that the firmware upgrade software ota.exe is closed before opening HMX_FT4222H_GUI.exe.
For example, Select the corresponding serial port number, here 14.
Next, select a Baud rate of 921600 and click on "start". Then, click on "show full image" to display the camera screen.
Click "enable Raw" and save the BMP image in the "Save" folder. This step is necessary to obtain the coordinate points of the watch face.
The computer's drawing tool can be used to open the latest bmp image and get the coordinates of the pressure pointer meter, as shown below.
The coordinates of the pressure pointer table are located as shown below.
1 is the start point, 2 is the center point, and 3 is the end point.
The (x,y) coordinate on the image is located at the bottom left corner.
Click on the ROI settingbutton in himax_amr_pc_tool. it will have three optionsThe long dial" option is a long dial dial.The "short dial" option is a short pointer and a number of wheel dial.The digit wheeler option is the digital wheel dial.Now the calibration is the pressure pointer table, which is long dialon."
Fill in the values of the coordinates you just got, and it's best to get one and write one
1 Coordinates of the starting point of the scale
2 Coordinates of the center point of the dial
3 Coordinates of the end of the scale
4 Starting scale value
5 End point scale value *100
After filling in the data, click "send ROI" to save the Settings and click "Cancel" to exit.
After the calibration process is completed, The AIS cannot move thereafter to avoid misreading.
it can be observed that the obtained reading aligns consistently with the numerical value displayed on the digital wheel dial.
3. Get Sensor Data
3.1 Get Image and show in PC
To get the AIS current image on the PC, you can connect AIS to your PC with TTL to send commands through the serial port to obtain relevant data packets.
3.1.1 The image date are obtained by serial port
Select the corresponding baud rate and serial port number through the serial port tool, select HEX display and HEX send, and continuously receive data from the AIS Sensor
In the serial port to send data C0 5A 00 00 00 00 04, and then send C0 5A 00 00 00 00 09, AIS Sensor will send a real-time image of the data packet, and then stop sending. Start with FFD8 and put it in TXT file
3.1.2 Combined image
Once all the data has been uploaded to the TTN platform, the subsequent step involves concatenating each packet in sequential order and saving it into a new TXT file. It is important to note that the first 8 bytes of each packet should be removed before concatenation.
When you combine all the packets, you need to convert the data inside to binary. Here the conversion is demonstrated using the WinHex software.
Open WinHex to open the combined image data file.
Click on the edit option to choose and convert.
Choose the Hex ASCII->Binary option and then click OK.
After the conversion is finished, click on "File" and choose "Save As".
Save as image.jpg file and click OK to generate a JPG file.
Open the saved JPG file to display the image transmitted by the AIS Sensor through the serial port.