Temperature and humidity meter calibration method based on image recognition
Through the image recognition method, image processing technology is used to extract the pointer display image of the temperature and humidity meter, compare the display image and calibrate it in combination with the temperature and humidity difference, which solves the problem of time-consuming and labor-intensive and easy error-induced problems of the traditional calibration method, and realizes the rapid and accurate calibration of the temperature and humidity meter.
Patent Information
- Application Number
- CN202411815944.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-28
AI Technical Summary
The traditional temperature and humidity meter calibration method is time-consuming and labor-intensive, which can easily lead to reading errors, and the humanistic error is greatly reduced, reducing calibration efficiency and accuracy.
Using an image recognition-based calibration method, by obtaining the images of the temperature and humidity meter in the temperature and humidity experiment box under different temperature and humidity environments, the pointer number image is extracted using image processing technology, comparing the number image and calibrating it in combination with the temperature and humidity difference.
The rapid and accurate calibration of the temperature and humidity meter is achieved, which reduces manual intervention, improves calibration efficiency and accuracy, and reduces human error.
Smart Images

Figure CN119723552A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of environmental experiment equipment, and in particular to a method for calibrating a thermometer and humidity meter based on image recognition. Background Art
[0002] The main uses of thermometers and hygrometers include monitoring and adjusting the temperature and humidity of the environment to ensure the normal operation and safe storage of various equipment and products. They are widely used in many fields. Their main uses include the following aspects: product quality testing, material aging testing, electronic component testing, packaging material testing, reliability testing, material performance testing, etc. They are indispensable testing equipment in scientific research control and other fields. The stability and accuracy of their performance are directly related to the reliability of the test results.
[0003] In order to ensure the accuracy of the thermometer and humidity meter during use, it is necessary to calibrate the thermometer and humidity meter before use. The calibration of the temperature and humidity test chamber is generally to place multiple thermometers and humidity meters in the temperature and humidity chamber. There are a large number of thermometer and humidity meter display dials in the temperature and humidity chamber, and each dial carries key data. After the temperature and humidity chamber is set to a specific temperature and humidity, it needs to be manually read and recorded after a period of time, and then the temperature and humidity of the temperature and humidity chamber are adjusted, and the above work is repeated.
[0004] The traditional thermometer and humidity meter calibration method is not only time-consuming and laborious due to the large number of manual readings, but also very easy to produce reading errors due to fatigue or distraction. In addition, human errors caused by human factors are also a problem that cannot be ignored, such as recording errors and omissions, which may greatly reduce the accuracy of the data. Therefore, the traditional thermometer and humidity meter calibration method has problems such as cumbersome calibration process, low calibration accuracy, and long calibration cycle, which reduces the calibration efficiency and accuracy of the thermometer and humidity meter. Summary of the invention
[0005] In order to solve the above technical problems, this application proposes the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides a method for calibrating a thermometer and humidity meter based on image recognition, comprising:
[0007] Obtain images of the temperature and humidity table in the temperature and humidity experimental box under different temperature and humidity simulation environments;
[0008] Processing the image to obtain the reading image of each temperature and humidity meter corresponding to the image in different temperature and humidity simulation environments;
[0009] The temperature and humidity meter is calibrated by comparing the reading images of each temperature and humidity meter and combining the temperature and humidity difference of the simulated environment of the humidity test box.
[0010] In a possible implementation, obtaining images of a temperature and humidity meter in a temperature and humidity test box under different temperature and humidity simulation environments includes:
[0011] Putting multiple thermometers and humidity meters into a temperature and humidity test box at the same time, wherein the temperature and humidity test box is provided with a camera, and the camera user takes pictures of the temperature and humidity pointer interfaces of the thermometers and humidity meters;
[0012] Setting the temperature and humidity of the temperature and humidity test box, and photographing the temperature and humidity pointer interface of the temperature and humidity meter through the camera to obtain a first image after standing for a preset period of time;
[0013] The temperature and humidity of the temperature and humidity test box are changed, and after standing for a preset period of time, the temperature and humidity pointer interface of the temperature and humidity meter is photographed by the camera to obtain a second image, wherein the first image and the second image include multiple images, each corresponding to a different temperature and humidity pointer interface.
[0014] In a possible implementation, the image is processed to obtain the reading image of each temperature and humidity meter corresponding to the image in different temperature and humidity simulation environments, including:
[0015] Use image processing technology to detect corner pixels of the image to extract the edge of the target and the background;
[0016] Segment the image area to obtain the location of each temperature and humidity pointer;
[0017] The reading is completed by calculating the angle pointed by the pointer at this time through the unit matrix and the pointer coordinates.
[0018] In a possible implementation, the detecting corner pixel of an image by using image processing technology to obtain the edge of the extracted target and the background includes:
[0019] Calculate the first-order Gaussian partial derivatives Ix and Iy of the image in the horizontal and vertical directions;
[0020] Calculate the values of Ix^2, Iy^2 and Ix*Iy according to Ix and Iy;
[0021] Gaussian blur the values of Ix^2, Iy^2 and Ix*Iy to get Sxx, Syy and Sxy;
[0022] Define the Harris matrix for each pixel and calculate two characteristic values of the matrix;
[0023] Calculate the response function R value of each pixel;
[0024] Then the response function is thresholded. If the R value is greater than the preset threshold, it indicates an edge point feature corresponding to the window.
[0025] In a possible implementation, calculating the response function R value of each pixel includes: R = detM-k(traceM) 2 , detM=λ1λ2, traceM=λ1+λ2, where: k is a coefficient, ranging from 0.04 to 0.06, detM is the determinant of the matrix M, traceM is the trace of the matrix, and λ1 and λ2 are the eigenvalues of the matrix.
[0026] In a possible implementation, the step of calculating the angle pointed by the pointer at this time by using the unit matrix and the pointer coordinates to complete the reading includes:
[0027] Use the H matrix to correspond the image XY coordinates to the coordinates in the world coordinate system. The projective transformation relationship is as follows:
[0028]
[0029] (ui vi 1) is the two-dimensional coordinate of the image before the change, denoted as P, (u i 'v i '1) The space coordinate after the change is recorded as P', then formula (1) can be expressed as:
[0030] P'=HP (2)
[0031] Decompose formula (2) to obtain the projection horizontal coordinate u i ' and the vertical coordinate v i ',
[0032]
[0033] Expanding formula (3) and (4) yields:
[0034] u i '(h 20 u i +h 21 v i +h 22 )=h 00 u i +h 01 v i +h 02 (5)
[0035] v i '(h 20 u i +h 21 v i +h 22 )=h 10 u i +h 11 vi +h 12 (6)
[0036] Formula (5) and formula (6) are transformed into matrix equations as follows:
[0037]
[0038] The value of matrix H is obtained by fitting the coordinates of the four corner points of the tray where the items are placed inside the temperature and humidity test box, i.e., the eight degrees of freedom;
[0039] Finally, the transformation relationship between the image XY coordinates and the world coordinate system is determined to realize the pointer data reading of each temperature and humidity meter.
[0040] In a possible implementation, the calibrating the temperature and humidity meter by comparing the sequential reading images of each temperature and humidity meter and combining the sequential temperature and humidity differences of the simulated environment of the temperature and humidity test box includes:
[0041] Dividing the temperature and humidity indication range of the thermometer and humidity meter into multiple parts according to the smallest unit;
[0042] Determine the angle difference between the pointers of the temperature and humidity test box simulating the environment;
[0043] Determine the temperature and humidity detection change value of the thermometer and humidity meter according to the angle difference;
[0044] The temperature and humidity detection change value is compared with the temperature and humidity changes successively set in the simulated environment of the temperature and humidity test box to achieve calibration of the temperature and humidity meter.
[0045] In a possible implementation, determining the angle difference between the pointers in the simulated environment of the temperature and humidity test box includes: using a frame difference method to subtract the nth frame indication image and the n-1th frame indication image to obtain a differential image, and directly displaying the angle difference in the differential image.
[0046] In a possible implementation, comparing the temperature and humidity detection change value with the temperature and humidity changes successively set in the simulated environment of the temperature and humidity test box to calibrate the temperature and humidity meter includes:
[0047] If the temperature and humidity detection change value is the same as the temperature and humidity change set in the simulated environment of the temperature and humidity test box, the temperature and humidity meter is normal;
[0048] or,
[0049] If the temperature and humidity detection change value is greater than or less than the temperature and humidity change value set successively in the simulated environment of the temperature and humidity test box, the temperature and humidity meter is faulty, wherein: if the temperature and humidity detection change value is 0, the temperature and humidity meter is damaged.
[0050] In an embodiment of the present application, a method of acquiring images can be used to quickly acquire images of each temperature and humidity meter in a temperature and humidity test box under different temperature and humidity simulation environments. The pointer indication image after processing the image is used to determine whether the temperature change of the temperature and humidity detection is the same as the simulated temperature change, thereby achieving rapid and accurate calibration of the temperature and humidity. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of a flow chart of a thermometer and humidity meter calibration method based on image recognition provided in an embodiment of the present application;
[0052] Figure 2 A schematic diagram of the structure of a temperature and humidity test chamber provided in an embodiment of the present application;
[0053] Figure 3 A schematic diagram of a frame difference method flow chart provided in an embodiment of the present application;
[0054] Figure 4 A schematic diagram of determining a differential image using a frame difference method based on an image provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The present solution is described below in conjunction with the accompanying drawings and specific implementation methods.
[0056] See also Figure 1 The method for calibrating a thermometer and humidity meter based on image recognition provided in an embodiment of the present application includes:
[0057] S101, obtaining images of a temperature and humidity meter in a temperature and humidity test box under different temperature and humidity simulation environments.
[0058] See also Figure 2 The temperature and humidity test box used in this embodiment is provided with a display controller 2 on the temperature and humidity test box 1 to process and display the data in the picture information. A wide-angle camera 3 is provided on the top of the temperature and humidity test box 1 to take pictures of the data, and an air switch circuit is built between the wide-angle camera 3 and the door handle 4. When the door handle 4 is closed, the switch is automatically closed, and the wide-angle camera 3 takes pictures to read the reading of the temperature and humidity meter at this time. When the test is stable, press the stop button 5, and the wide-angle camera 3 reads the picture information at the stable moment. A circuit is also built between the stop button 5 and the wide-angle camera 3. 6 is a calibrated temperature and humidity meter, and 7 is a support for the rotation of the dial. If there are too many temperature and humidity meters, there may be a blind spot of the wide-angle camera 3, resulting in abnormal pictures. Rotate the support 7 to take pictures.
[0059] Based on the above-mentioned temperature and humidity test box, multiple temperature and humidity meters are placed in the temperature and humidity test box at the same time. The temperature and humidity test box is provided with a camera, and the camera user shoots the temperature and humidity pointer interface of the temperature and humidity meter. The temperature and humidity of the temperature and humidity test box are set, and after standing for a preset period of time, the temperature and humidity pointer interface of the temperature and humidity meter is photographed by the camera to obtain a first image. The temperature and humidity of the temperature and humidity test box are changed, and after standing for a preset period of time again, the temperature and humidity pointer interface of the temperature and humidity meter is photographed by the camera to obtain a second image, wherein the first image and the second image include multiple images, each corresponding to a different temperature and humidity pointer interface.
[0060] S102, processing the image to obtain the reading image of each temperature and humidity meter corresponding to the image in different temperature and humidity simulation environments.
[0061] Image processing technology is used to detect the corner pixels of the image to obtain the edges of the extracted target and the background; the image area is segmented to obtain the location of each temperature and humidity pointer; the angle pointed by the pointer at this time is calculated through the unit matrix and the pointer coordinates to complete the reading.
[0062] The edge is the end of one area and the beginning of another area. This feature can be used to segment the image. The basic idea of edge detection is to first detect the edge points in the image, and then connect the edge points into contours according to a certain strategy to form a segmented area. Since the edge is the dividing line between the target and the background to be extracted, the target and the background can be distinguished only by extracting the edge.
[0063] Specifically, in order to determine the edge of the extracted target and the background, the first-order Gaussian partial derivatives Ix and Iy in the horizontal and vertical directions of the image are calculated in this embodiment; the values of Ix^2, Iy^2 and Ix*Iy are calculated according to the Ix and Iy; the values of Ix^2, Iy^2 and Ix*Iy are Gaussian blurred to obtain Sxx, Syy and Sxy; the Harris matrix of each pixel is defined, and two characteristic values of the matrix are calculated; the response function R value of each pixel is calculated; and then the response function is thresholded. If the R value is greater than the preset threshold, it indicates an edge point feature corresponding to the window.
[0064] The response function R value of each pixel is calculated, including: R = detM-k(traceM) 2 , detM=λ1λ2, traceM=λ1+λ2, where: k is a coefficient, ranging from 0.04 to 0.06, detM is the determinant of the matrix M, traceM is the trace of the matrix, and λ1 and λ2 are the eigenvalues of the matrix.
[0065] The reading is completed by calculating the angle pointed by the pointer at this time through the unit matrix and the pointer coordinates, including:
[0066] Use the H matrix to correspond the image XY coordinates to the coordinates in the world coordinate system. The projective transformation relationship is as follows:
[0067]
[0068] (ui vi 1) is the two-dimensional coordinate of the image before the change, denoted as P, (u i 'v i '1) The space coordinate after the change is recorded as P', then formula (1) can be expressed as:
[0069] P'=HP (2)
[0070] Decompose formula (2) to obtain the projection horizontal coordinate u i ' and the vertical coordinate v i ',
[0071]
[0072] Expanding formula (3) and (4) yields:
[0073] u i '(h 20 u i +h 21 v i +h 22 )=h 00 u i +h 01 v i +h 02 (5)
[0074] v i '(h 20 u i +h 21 v i +h 22 )=h 10 u i +h 11 v i +h 12 (6)
[0075] Formula (5) and formula (6) are transformed into matrix equations as follows:
[0076]
[0077] The coordinates of the four corner points of the object tray placed inside the temperature and humidity test box, that is, 8 degrees of freedom, are calculated based on the fitting to obtain the value of the matrix H; finally, the transformation relationship between the image XY coordinates and the world coordinate system is determined to realize the pointer data reading of each temperature and humidity meter.
[0078] S103, calibrating the thermometer and humidity meter by comparing the reading images of each thermometer and humidity meter and combining the temperature and humidity difference of the simulated environment of the humidity test box.
[0079] In order to quickly read the temperature and humidity values indicated by the current thermometer and humidity meter according to the pointer, in this embodiment, the temperature and humidity indication range of the thermometer and humidity meter is divided into multiple parts according to the minimum unit, for example, it can be divided into 360 parts, each representing 1 minimum unit indication. Determine the angle difference between the pointers of the temperature and humidity test box simulation environment before and after; determine the temperature and humidity detection change value of the thermometer and humidity meter according to the angle difference; compare the temperature and humidity detection change value with the temperature and humidity changes set in the temperature and humidity test box simulation environment before and after to calibrate the thermometer and humidity meter.
[0080] In this embodiment, in order to determine the angle difference between the pointers in the temperature and humidity test box simulation environment, the frame difference method is used. Figure 3 As shown, a frame difference method is used to subtract the n-th frame indication image and the n-1-th frame indication image to obtain a differential image, and the angle difference value is directly displayed in the differential image. Figure 4 (a) is the n-1th frame of the digital image, (b) is the nth frame of the digital image, and (c) is the difference image. The temperature and humidity difference can be quickly read through the angle value of the pointer in the difference image.
[0081] After determining the temperature and humidity difference of the temperature and humidity mark, the temperature and humidity detection change value is compared with the temperature and humidity changes successively set in the simulated environment of the temperature and humidity test box to calibrate the temperature and humidity meter. Specifically, if the temperature and humidity detection change value is the same as the temperature and humidity changes successively set in the simulated environment of the temperature and humidity test box, the temperature and humidity meter is normal. If the temperature and humidity detection change value is greater than or less than the temperature and humidity change value successively set in the simulated environment of the temperature and humidity test box, the temperature and humidity meter is faulty, wherein: if the temperature and humidity detection change value is 0, the temperature and humidity meter is damaged.
[0082] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0083] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for calibrating a thermometer and humidity meter based on image recognition, characterized in that: include: Obtain images of the temperature and humidity table in the temperature and humidity experimental box under different temperature and humidity simulation environments; Processing the image to obtain the reading image of each temperature and humidity meter corresponding to the image in different temperature and humidity simulation environments; The temperature and humidity meter is calibrated by comparing the reading images of each temperature and humidity meter and combining the temperature and humidity difference of the simulated environment of the humidity test box.
2. The method for calibrating a thermometer and humidity meter based on image recognition according to claim 1, characterized in that: The method of obtaining images of the temperature and humidity meter in the temperature and humidity test box under different temperature and humidity simulation environments includes: Putting multiple thermometers and humidity meters into a temperature and humidity test box at the same time, wherein the temperature and humidity test box is provided with a camera, and the camera user takes pictures of the temperature and humidity pointer interfaces of the thermometers and humidity meters; Setting the temperature and humidity of the temperature and humidity test box, and photographing the temperature and humidity pointer interface of the temperature and humidity meter through the camera to obtain a first image after standing for a preset period of time; The temperature and humidity of the temperature and humidity test box are changed, and after standing for a preset period of time, the temperature and humidity pointer interface of the temperature and humidity meter is photographed by the camera to obtain a second image, wherein the first image and the second image include multiple images, each corresponding to a different temperature and humidity pointer interface.
3. The method for calibrating a thermometer and humidity meter based on image recognition according to claim 1, characterized in that: The image is processed to obtain the reading image of each temperature and humidity meter corresponding to the image in different temperature and humidity simulation environments, including: Use image processing technology to detect corner pixels of the image to extract the edge of the target and the background; Segment the image area to obtain the location of each temperature and humidity pointer; The reading is completed by calculating the angle pointed by the pointer at this time through the unit matrix and the pointer coordinates.
4. The method for calibrating a thermometer and humidity meter based on image recognition according to claim 3, characterized in that: The method of using image processing technology to detect corner pixels of an image to obtain edges between an extracted target and a background includes: Calculate the first-order Gaussian partial derivatives Ix and Iy of the image in the horizontal and vertical directions; Calculate the values of Ix^2, Iy^2 and Ix*Iy according to Ix and Iy; Gaussian blur the values of Ix^2, Iy^2 and Ix*Iy to get Sxx, Syy and Sxy; Define the Harris matrix for each pixel and calculate two characteristic values of the matrix; Calculate the response function R value of each pixel; Then the response function is thresholded. If the R value is greater than the preset threshold, it indicates an edge point feature corresponding to the window.
5. The method for calibrating a thermometer and humidity meter based on image recognition according to claim 4, characterized in that: The calculation of the response function R value of each pixel includes: R = detM-k (traceM) 2 , detM=λ1λ2, traceM=λ1+λ2, where: k is a coefficient, ranging from 0.04 to 0.06, detM is the determinant of the matrix M, traceM is the trace of the matrix, and λ1 and λ2 are the eigenvalues of the matrix.
6. The method for calibrating a thermometer and humidity meter based on image recognition according to claim 3, characterized in that: The method of calculating the angle pointed by the pointer at this time by using the unit matrix and the pointer coordinates to complete the reading includes: Use the H matrix to correspond the image XY coordinates to the coordinates in the world coordinate system. The projective transformation relationship is as follows: (ui vi 1) is the two-dimensional coordinate of the image before the change, denoted as P, (u i 'v i '1) The space coordinate after the change is recorded as P', then formula (1) can be expressed as: P'=HP (2) Decompose formula (2) to obtain the projection horizontal coordinate u i ' and the vertical coordinate v i ', Expanding formula (3) and (4) yields: u i '(h 20 u i +h 21 v i +h 22 )=h 00 u i +h 01 v i +h 02 (5) v i '(h 20 u i +h 21 v i +h 22 )=h 10 u i +h 11 v i +h 12 (6) Formula (5) and formula (6) are transformed into matrix equations as follows: The value of matrix H is obtained by fitting the coordinates of the four corner points of the tray where the items are placed inside the temperature and humidity test box, i.e., the eight degrees of freedom; Finally, the transformation relationship between the image XY coordinates and the world coordinate system is determined to realize the pointer data reading of each temperature and humidity meter.
7. The method for calibrating a thermometer and humidity meter based on image recognition according to claim 1, characterized in that: The method of calibrating the temperature and humidity meter by comparing the sequential reading images of each temperature and humidity meter and combining the sequential temperature and humidity differences of the simulated environment of the temperature and humidity test box comprises: Dividing the temperature and humidity indication range of the thermometer and humidity meter into multiple parts according to the smallest unit; Determine the angle difference between the pointers of the temperature and humidity test box simulating the environment; Determine the temperature and humidity detection change value of the thermometer and humidity meter according to the angle difference; The temperature and humidity detection change value is compared with the temperature and humidity changes successively set in the simulated environment of the temperature and humidity test box to achieve calibration of the temperature and humidity meter.
8. The method for calibrating a thermometer and humidity meter based on image recognition according to claim 7, characterized in that: The method of determining the angle difference between the pointers in the temperature and humidity test box simulated environment includes: using the frame difference method to subtract the nth frame indication image and the n-1th frame indication image to obtain a differential image, and directly displaying the angle difference in the differential image.
9. The method for calibrating a thermometer and humidity meter based on image recognition according to claim 8, characterized in that: The temperature and humidity detection change value is compared with the temperature and humidity changes successively set in the temperature and humidity test box simulation environment to realize the calibration of the temperature and humidity meter, including: If the temperature and humidity detection change value is the same as the temperature and humidity change set in the simulated environment of the temperature and humidity test box, the temperature and humidity meter is normal; or, If the temperature and humidity detection change value is greater than or less than the temperature and humidity change value set successively in the simulated environment of the temperature and humidity test box, the temperature and humidity meter is faulty, wherein: if the temperature and humidity detection change value is 0, the temperature and humidity meter is damaged.