Air humidity measurement method and electronic device

The continuous image is acquired through the camera, the optical flow feature vector is calculated and the conversion formula is established, which solves the problem of high requirements in the use environment and acquisition conditions of the existing air humidity detection method, and realizes the accurate judgment of air humidity under low-cost equipment and simple acquisition conditions.

CN114544638BActive Publication Date: 2025-05-16NANNING FUGUI PRECISION IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011340906.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-25
Publication Date
2025-05-16
Estimated Expiration
2040-11-25

AI Technical Summary

Technical Problem

The existing air humidity detection methods have high requirements in the use environment and collection conditions and cannot be popularized in daily life. How to judge air humidity with lower costs and simple equipment is a difficult problem.

Method used

Two continuous images are acquired through the camera, the optical flow characteristic vector of the characteristic points in the image is calculated, and a conversion formula is established based on the relative relationship between the known optical flow characteristic vector and air humidity to derive the current air humidity.

Benefits of technology

It realizes accurate judgment of air humidity under low-cost equipment and simple collection conditions, and improves the popularity and feasibility of air humidity detection in daily life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114544638B_ABST
    Figure CN114544638B_ABST
Patent Text Reader

Abstract

A method for measuring air humidity, characterized in that the method includes: establishing a conversion formula according to multiple groups of relative relationships corresponding to known image curvature and known air humidity through a processing module; obtaining a first image through a camera, and obtaining a second image after a predetermined time, wherein the first image and the second image have the same shooting range; obtaining multiple feature points in the first image through the processing module; calculating the optical flow feature vector of each feature point according to the positions of the multiple feature points in the second image through the processing module; and obtaining the current air humidity according to the optical flow feature vector and the conversion formula through the processing module. The present invention also provides an electronic device. The present invention can calculate the current air humidity according to a conversion formula of image curvature and air humidity established in advance by calculating the optical flow feature vectors of multiple feature points in at least two consecutive images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an air humidity measurement method and an electronic device, and more particularly to an air humidity measurement method and an electronic device for estimating air humidity based on image curvature. Background Art

[0002] The most common air humidity detection method currently applicable to a wide range of environments is to use thermal infrared remote sensing technology, which uses thermal infrared bands to study the properties of earth materials to obtain the earth's surface temperature. It is widely used in the fields of urban heat island effect, forest fire monitoring, drought monitoring, etc. However, due to the high requirements of such sensors for the use environment and various collection conditions, they cannot be popularized in daily life. Therefore, how to measure air humidity through common equipment and simple collection conditions is a problem that needs to be solved at present. Summary of the invention

[0003] In view of this, there is a need for an air humidity measurement method and an electronic device that can determine the current air humidity with relatively low cost and simple equipment.

[0004] The present invention provides an air humidity measurement method, characterized in that the method includes: establishing a conversion formula based on a plurality of sets of relative relationships corresponding to known optical flow feature vectors and known air humidity; obtaining a first image through a camera, and obtaining a second image after a predetermined time, wherein the first image and the second image have the same shooting range; obtaining a plurality of feature points in the first image; calculating an optical flow feature vector of each feature point according to the positions of the plurality of feature points in the second image; and obtaining air humidity according to the optical flow feature vector and the conversion formula.

[0005] The present invention also provides an electronic device, characterized in that the electronic device includes a camera, a processing module and a storage module. The camera is used to obtain a first image and obtain a second image after a predetermined time, wherein the first image and the second image have the same shooting range. The processing module is used to establish a conversion formula based on a plurality of sets of relative relationships corresponding to known optical flow feature vectors and known air humidity, obtain a plurality of feature points in the first image, calculate the optical flow feature vector of each feature point according to the positions of the plurality of feature points in the second image, and obtain air humidity data according to the optical flow feature vector and the conversion formula. The storage module is used to store the conversion formula.

[0006] According to an embodiment of the present invention, the processing module further obtains the conversion formula according to the relative relationship through a least square method.

[0007] According to another embodiment of the present invention, the processing module further divides the first image into a plurality of grids, and takes the intersection point between every two grids as the feature point.

[0008] According to another embodiment of the present invention, the processing module further divides the first image into a plurality of grids by using an equal arc method according to the longitude and latitude corresponding to the shooting range.

[0009] According to another embodiment of the present invention, the processing module further deletes the optical flow feature vectors that are smaller than a jitter threshold, divides the two-dimensional coordinate system into a plurality of sectors of the same size, sums up the optical flow feature vectors in the same sector to obtain a total feature vector corresponding to each sector, and obtains the air humidity based on the total feature vector in the plurality of sectors and the conversion formula. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 is a block diagram of an electronic device according to an embodiment of the present invention.

[0011] Figure 2 FIG. 4 is a flow chart of an air humidity measurement method according to an embodiment of the present invention.

[0012] Main component symbols

[0013] Electronic device 100

[0014] Camera 110

[0015] Processing module 120

[0016] Storage module 130

[0017] Steps S201-S205 DETAILED DESCRIPTION

[0018] Other areas of application of the system and method of the present invention will become apparent from the detailed description provided below. It should be understood that the following detailed description and specific embodiments, when providing exemplary embodiments of the air humidity measurement method and electronic device, are only for illustrative purposes and are not intended to limit the scope of the present invention.

[0019] Figure 11 is a block diagram of an electronic device 100 according to an embodiment of the present invention. The electronic device 100 at least includes a camera 110, a processing module 120 and a storage module 130. The camera 110 can be any camera capable of capturing images, and is used to capture at least two images with the same shooting range at predetermined intervals. The processing module 120 is connected to the camera 110, and is used to pre-process the image received from the camera 110, capture multiple feature points in the processed image, track the optical flow changes of each feature point, and calculate the current air humidity according to the optical flow feature vectors and conversion formulas of all feature points. Among them, the processing module 120 can be, for example, a dedicated hardware circuit or general hardware (for example, a single processor, a multi-processor with parallel processing capabilities, a graphics processor or other processors with computing capabilities), and when executing program code or software, it provides the functions described below. The storage module 130 is connected to the processing module 120, and can be a non-volatile storage device such as a hard disk or a flash drive, and is used to store the algorithms and conversion formulas required for executing the above process. The conversion formula can be calculated in advance by the processing module 120. For example, the user can shoot multiple groups of at least two images with the same shooting range in environments with different air humidity, and obtain the conversion formula through least squares calculation based on the change of the optical flow feature vector of multiple feature points in at least two images (i.e., the image curvature) and the relative relationship of the known air humidity. In this way, after the processing module 120 obtains the optical flow feature vector of the feature points of two consecutive images in any environment, it can calculate the current air humidity based on the optical flow feature vector and the conversion formula. In addition, the electronic device 100 may further include a display module (not shown). Figure 1 ), which may be a display panel (such as a thin-film liquid crystal display panel, an organic light-emitting diode panel, or other panels with display capabilities) for displaying the results calculated by the processing module 120. When the electronic device 100 is a device capable of executing augmented reality, the air humidity value may also be projected into the display scene. It is worth noting that the aforementioned descriptions of the camera 110, the processing module 120, and the storage module 130 are only some examples, but the present invention is not limited thereto.

[0020] According to an embodiment of the present invention, after the processing module 120 obtains at least two continuous images (i.e., the first image and the second image) with the same shooting range from the camera 110, it first pre-processes each image, and then obtains a plurality of feature points from the processed images. For example, the processing module 120 first grayscales the first image to convert it into a first grayscale image, then cuts the first grayscale image into a plurality of grids, and finally sets the intersection of the grids as feature points. Among them, the user can choose to evenly cut the image into a plurality of grids with equal areas, or when the shooting range is a large-scale landscape such as a plain, since the objects in the image may be distorted due to the wide-angle lens, the image can be cut into a plurality of grids by the arc method of longitude and latitude (i.e., the arc presented by the reference longitude and latitude), and then the intersection of the grids is taken as the feature point. It is worth noting that in order to improve the accuracy of air humidity judgment, the user can adjust the number of grids according to needs. For example, when the user has high requirements for accuracy, the number of grid cuts can be increased, thereby increasing the number of feature points to more accurately judge the image curvature.

[0021] After obtaining multiple feature points of the first image, similarly, the processing module 120 obtains a second grayscale image corresponding to the second image, and searches for pixels with the same grayscale value in the second grayscale image within a predetermined range of coordinates corresponding to each feature point in the first grayscale image, and uses its coordinates as the coordinates of the feature point after displacement. Next, the processing module 120 calculates the coordinate change of each feature point to calculate the optical flow feature vector, divides the two-dimensional coordinate system into multiple sectors of the same size, and sums up the optical flow feature vectors of all feature points located in the same sector to obtain the total feature vector corresponding to each sector. Finally, the processing module 120 obtains the air humidity corresponding to the image based on the total feature vectors in multiple sectors and the conversion formula. It is worth noting that the algorithm for generating the total feature vector of the conversion formula is the same as the aforementioned algorithm, and will not be described in detail here for simplicity.

[0022] According to another embodiment of the present invention, since the user may hold the electronic device 100 to obtain an image, a shaking error may occur due to hand shaking. Therefore, the processing module 120 may establish a shaking threshold based on multiple groups of images generated by hand shaking in advance, that is, when the optical flow feature vector of a feature point is less than the shaking threshold, it is determined that the image distortion is not caused by air humidity, but by the human factor of hand shaking, and the processing module 120 does not consider the optical flow feature vector corresponding to the feature point to avoid affecting the accuracy of the judgment.

[0023] In addition, in order to further improve the accuracy of determining the air humidity, the processing module 120 may select to capture more than two continuous images to more accurately determine the optical flow vector. For example, the processing module 120 may capture four continuous images and divide the four continuous images into 12 time-space units in the time dimension. Then, if the processing module 120 divides the two-dimensional coordinate system into 8 sectors, the processing module 120 may obtain a 96-dimensional (12*8) feature vector. Finally, the processing module 120 calculates the current air humidity based on the total feature vector corresponding to each dimension and the conversion formula.

[0024] Figure 2 The flowchart of the air humidity measurement method according to an embodiment of the present invention. First, in step S201, the processing module 120 establishes a conversion formula according to a plurality of sets of relative relationships corresponding to known image curvature and known air humidity, and stores it in the storage module 130. In step S202, the camera 110 obtains at least two continuous images with the same shooting range. In step S203, the processing module 120 pre-processes the first image, divides the processed first image into a plurality of grid units, and takes the intersection of every two grid units as a feature point. In step S204, the processing module 120 pre-processes the second image, and searches for pixels with the same grayscale value in the second grayscale image within a predetermined range of coordinates corresponding to each feature point in the first grayscale image, and uses its coordinates as the coordinates after the feature point is displaced to calculate the optical flow feature vector. In step S205 , the processing module 120 divides the two-dimensional coordinate system into a plurality of sectors of the same size, sums up the optical flow feature vectors of all feature points in each sector, and finally obtains the current air humidity according to the total optical flow feature vectors in the plurality of sectors and a conversion formula.

[0025] It is worth noting that although the above method has been described on the basis of a flow chart using a series of steps or boxes, the present invention is not limited to the order of these steps, and some steps may be performed in a different order than the remaining steps or the remaining steps may be performed simultaneously. In addition, those skilled in the art will understand that the steps shown in the flow chart are not exclusive, and may include other steps of the flow chart, or one or more steps may be deleted without affecting the scope of the present invention.

[0026] In summary, according to the air humidity measurement method and electronic device proposed in some embodiments of the present invention, by calculating the optical flow feature vector of the same feature point in two consecutive images and the conversion formula calculated in advance, the air humidity in the current environment can be calculated by a simple device. Furthermore, by increasing the number of feature points or the number of consecutive images, the image curvature caused by different air humidity can be calculated more accurately, thereby improving the accuracy of judgment.

[0027] It is worth noting that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for measuring air humidity, characterized in that: The method comprises: A conversion formula is established according to the relative relationship between multiple groups of known optical flow feature vectors and known air humidity; Acquire a first image through a camera, and acquire a second image after a predetermined time, wherein the first image and the second image have the same shooting range; Acquire a plurality of feature points in the first image; Calculate an optical flow feature vector of each feature point according to positions of the plurality of feature points in the second image; and The current air humidity is obtained according to the optical flow feature vector and the conversion formula.

2. The air humidity measurement method according to claim 1, characterized in that: The step of establishing a conversion formula according to the relative relationship between multiple groups of known optical flow feature vectors and known air humidity further includes: The conversion formula is obtained according to the relative relationship through the least square method.

3. The air humidity measurement method according to claim 1, characterized in that: The step of obtaining a plurality of feature points in the first image further comprises: The first image is cut into a plurality of grids, and the intersection point between every two of the grids is taken as the feature point.

4. The air humidity measurement method according to claim 3, characterized in that: The step of cutting the first image into a plurality of grids further comprises: The first image is cut into a plurality of grids according to the longitude and latitude equal arc method.

5. The air humidity measurement method according to claim 1, wherein: The step of obtaining the air humidity according to the optical flow feature vector and the conversion formula further includes: Deleting the optical flow feature vector that is smaller than a jitter threshold; Divide the two-dimensional coordinate system into a plurality of sectors of equal size; and The optical flow feature vectors in the same sector are summed up to obtain a total feature vector corresponding to each sector, and the air humidity is obtained according to the total feature vectors in a plurality of sectors and the conversion formula.

6. An electronic device, characterized in that: The electronic device comprises: A camera, used to obtain a first image and obtain a second image after a predetermined time, wherein the first image and the second image have the same shooting range; a processing module, configured to establish a conversion formula according to a plurality of sets of relative relationships corresponding to known optical flow feature vectors and known air humidity, obtain a plurality of feature points in the first image, calculate an optical flow feature vector of each feature point according to positions of the plurality of feature points in the second image, and obtain air humidity according to the optical flow feature vector and the conversion formula; and A storage module is used to store the conversion formula.

7. The electronic device according to claim 6, wherein: The processing module further obtains the conversion formula according to the relative relationship through the least square method.

8. The electronic device as claimed in claim 6, characterized in that: The processing module further divides the first image into a plurality of grids, and takes the intersection point between every two grids as the feature point.

9. The electronic device as claimed in claim 8, characterized in that: The processing module further cuts the first image into a plurality of grids according to the latitude and longitude equal arc method.

10. The electronic device as claimed in claim 6, characterized in that: The processing module further deletes the optical flow feature vectors that are smaller than a jitter threshold, divides the two-dimensional coordinate system into a plurality of sectors of the same size, sums up the optical flow feature vectors in the same sector to obtain a total feature vector corresponding to each sector, and obtains the air humidity based on the total feature vectors in the plurality of sectors and the conversion formula.

Citation Information

Patent Citations

  • Method of Determining dew point and suitable device

    CN1191604A

  • Method for recognizing real-time moition using direction and position information and computer-readable medium having thereon program performing function embodying the same

    KR1020130097293A