A method, device and medium for identifying a pointer indication of an instrument in a fogging scene

By combining image enhancement and deep neural networks with template matching technology, the problem of pointer instrument reading recognition in atomized scenarios has been solved, achieving efficient and low-cost instrument reading recognition, which is applicable to fields such as nuclear engineering.

CN117576365BActive Publication Date: 2026-06-02NUCLEAR POWER INSTITUTE OF CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NUCLEAR POWER INSTITUTE OF CHINA
Filing Date
2023-11-27
Publication Date
2026-06-02

Smart Images

  • Figure CN117576365B_ABST
    Figure CN117576365B_ABST
Patent Text Reader

Abstract

The application discloses a kind of atomization scene instrument pointer indication recognition method, device, equipment and medium, it is related to image recognition field, it is difficult to realize the indication recognition of pointer instrument in the high temperature and high pressure generated atomization scene, its technical scheme main point is: the first image of the instrument to be identified is obtained;The atomization degree value of the first image is calculated, when the atomization degree value of the first image is higher than predetermined threshold value, the first image is carried out fog-free image enhancement processing, and a second image without fog is obtained;The second image is input into the region detection model trained, to detect the ROI region of instrument, and obtain the ROI region of instrument, wherein the region detection model trained is obtained by training a deep neural network using an image dataset composed of low-resolution images of various pointer instruments;Template matching and pointer retrieval are performed on the image of the ROI region to obtain the recognition result of the instrument pointer indication under the atomization scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition, and more specifically, to a method, apparatus, device, and medium for recognizing the pointer readings of an instrument in a fogged scene. Background Technology

[0002] In the industrial sector, instruments are indispensable equipment, categorized into pointer-type and digital instruments. Pointer-type instruments, lacking electronic components, are highly adaptable to complex electromagnetic environments, offer excellent cost-effectiveness, and are widely used in industrial settings. While inexpensive, pointer-type instruments do not integrate with control systems; in inaccessible environments, they require visual cameras to capture images for automated reading. However, in many nuclear engineering sites, factors such as steam leaks, weather changes, and equipment overheating increase the number of tiny suspended particles in the atmosphere, enhancing light absorption and scattering, creating a foggy environment. In such conditions, the pointer reading recognition performance of visual systems deteriorates.

[0003] Prior art 202010231300.6 discloses a method for enhancing maritime images in foggy environments, employing a dark channel prior algorithm optimized by convolutional neural networks to restore foggy maritime images to fog-free images. Prior art also provides 202111359223.3, which discloses an image recognition method and apparatus under complex weather conditions. This method enhances visible light images through near-infrared enhancement and uses convolutional neural networks for target recognition, thereby enhancing target images in complex environments such as fog, smoke, rain, and snow. Prior art 201810632540.X discloses a pointer-type instrument automatic reading device system and recognition method based on pointer detection. This system uses a power device to coordinate the angles of the instrument panel and camera image acquisition, enabling the reading and recognition of instrument image information on a remote central processing unit.

[0004] The methods described above can respectively achieve defogging image enhancement and instrument pointer recognition. However, the fogging environment during the construction of nuclear facilities is caused by high-temperature and high-pressure steam leakage, which differs from fogging phenomena caused by changes in the outdoor environment. Therefore, the maritime fog image enhancement method is only applicable to outdoor images with large areas of sky, while fogging scenarios in the industrial field are usually indoors, lacking the necessary prior conditions, and thus cannot effectively improve recognition capabilities. Furthermore, introducing near-infrared cameras to combat interference from fogging environments has drawbacks such as high equipment costs, long algorithm processing time, and high complexity, contradicting the goal of using low-cost pointer-type instruments for high cost-effectiveness. In addition, devices and methods for aligning the camera and instrument angles using a power unit require physical drive devices, which are bulky and lack software defogging capabilities, making them unsuitable for indoor fogging scenarios caused by high temperature and high pressure.

[0005] The above methods are all insufficient for recognizing the readings of pointer instruments in atomized environments caused by high temperature and high pressure. Therefore, there is an urgent need to provide a pointer reading recognition method for atomized environments to address the shortcomings of existing methods. Summary of the Invention

[0006] The purpose of this invention is to provide a method, device, equipment, and medium for identifying instrument pointer readings in atomized scenarios, in order to solve the problem of difficulty in identifying instrument readings in atomized scenarios caused by high-temperature and high-pressure steam leakage.

[0007] The above-mentioned technical objective of the present invention is achieved through the following technical solution:

[0008] A first aspect of the present invention provides a method for recognizing the pointer reading of an instrument in a fogging scene, the method comprising:

[0009] Acquire the first image of the instrument to be identified;

[0010] Calculate the degree of fogging of the first image. When the degree of fogging of the first image is higher than a predetermined threshold, perform defogging image enhancement processing on the first image to obtain a fog-free second image.

[0011] The second image is input into the trained region detection model to detect the ROI region of the instrument and obtain the ROI region of the instrument. The trained region detection model is obtained by training a deep neural network on an image dataset consisting of low-resolution images of various pointer instruments.

[0012] Template matching and pointer retrieval are performed on the image of the ROI region to obtain the recognition result of the instrument pointer reading in the fogging scene.

[0013] In one implementation, calculating the fogging degree value of the first image specifically involves: separating the RGB channels of the first image to obtain the grayscale images corresponding to the RGB channels, performing a Laplacian transform on the grayscale images corresponding to the RGB channels, and calculating the average variance value of the first image after the Laplacian transform as the fogging degree value of the first image.

[0014] In one implementation, the first image is subjected to dehazing image enhancement processing to obtain a haze-free second image, including:

[0015] Obtain the dark channel image of the RGB channels of the first image;

[0016] Based on the atmospheric light constant and atmospheric scattering model, the atmospheric light value and transmittance estimate of the dark channel image are calculated.

[0017] Based on the proportion of the fogged area in the prior area of ​​the first image, the pixels of the brightest region in the dark channel image are extracted as the fogged field. The brightness of the first third of the pixels in the fogged field is taken as the corrected atmospheric light value. The transmittance estimate is updated based on the corrected atmospheric light intensity estimate, and the corrected atmospheric light value and updated transmittance are obtained by taking the prior area of ​​the dark channel image.

[0018] Based on the corrected atmospheric light values ​​and updated transmittance, and combined with the inverted atmospheric scattering model, a second image without fog is obtained.

[0019] In one implementation, the prior area region accounts for 15%.

[0020] In one implementation, the method further includes: the region detection model uses a non-maximum suppression method to filter out the meter frame of the second image with a confidence level lower than the IOU threshold to obtain the ROI region of the meter, wherein the IOU threshold is 0.5.

[0021] In one implementation, template matching and pointer retrieval are performed on the image of the ROI region to obtain the recognition result of the instrument pointer reading in a foggy scene, including:

[0022] The ROI region image is cropped from the second image based on the ROI region, the SIFT feature points of the ROI region image are extracted, and feature point matching is performed between the SIFT feature points and the template to construct the mapping relationship between the ROI region and the template.

[0023] In the ROI region image that matches the template, Hough linear transform is used to detect pointers and Hough circular transform to detect dials. Pointer length threshold and dial size threshold are set to filter out template matching results that do not conform to the pointer and dial.

[0024] For the filtered template matching results, the pointer angle of the ROI region image is calculated using the vector method. The mapping relationship is used to match the pointer angle with the instrument readings matched by the template, so as to obtain the recognition result of the instrument pointer readings in the fogging scene.

[0025] In one implementation, a vector method is used to calculate the pointer angle of the ROI region image. The mapping relationship is then used to map the pointer angle one-to-one with the instrument readings matched to the template, obtaining the recognition result of the instrument pointer readings in a foggy scene. Specifically:

[0026] Calculate the phase difference between the vector formed by the vertex of the pointer tip and the center of the dial, and the pointer vector when the initial scale is 0;

[0027] Multiply the difference between the phase difference and the angle of the 0-scale number by the ratio of the reading angle, and add the smallest scale reading to obtain the reading of the instrument pointer in the atomization scenario;

[0028] The ratio of the reading angles is equal to the difference between the maximum and minimum scale readings, divided by the difference between the angle of counterclockwise rotation around the center corresponding to the maximum scale and the angle of counterclockwise rotation around the center corresponding to the minimum scale.

[0029] A second aspect of the present invention provides a device for recognizing the pointer reading of an instrument in a fogging scene, the device comprising:

[0030] The image acquisition module is used to acquire the first image of the instrument to be identified;

[0031] The image processing module is used to calculate the fogging degree value of the first image, and when the fogging degree value of the first image is higher than a predetermined threshold, to perform defogging image enhancement processing on the first image to obtain a fog-free second image.

[0032] The region detection module is used to input the second image into the trained region detection model to detect the ROI region of the instrument and obtain the ROI region of the instrument. The trained region detection model is obtained by training a deep neural network on an image dataset consisting of low-resolution images of various pointer instruments.

[0033] The reading recognition module is used to perform template matching and pointer retrieval on the image of the ROI region to obtain the recognition result of the instrument pointer reading in the foggy scene.

[0034] A third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements a method for recognizing the pointer reading of an instrument in a fogging scene provided in the first aspect of the present invention.

[0035] In a fourth aspect, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a method for recognizing the pointer reading of an instrument in a fogging scene provided in the first aspect of the present invention.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] 1. The present invention provides a method for recognizing the pointer readings of instruments in atomized scenarios, which enables the recognition of pointer instrument readings in atomized scenarios such as steam leakage, and can recognize the readings of multiple pointer instruments in the screen, thereby improving the recognition performance of pointer readings.

[0038] 2. The present invention provides a method for recognizing instrument pointer readings in a foggy scene. It uses the dark channel prior principle and proposes an update method for atmospheric light value and transmittance driven by the proportion of prior area regions. This method enables the defogging enhancement and reconstruction of fog images acquired under non-uniform light source scenes, thereby possessing prior conditions and improving recognition capabilities.

[0039] 3. The present invention provides a method for recognizing the pointer readings of an instrument in a fogging scene. By using templates for different pointer-type instruments, the applicability of pointer-type instruments can be improved. When applied to the recognition of pointer-type instrument readings of different specifications, it has the same effect. Attached Figure Description

[0040] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:

[0041] Figure 1 A flowchart illustrating a method for recognizing instrument pointer readings in a fogging scene, provided by an embodiment of the present invention, is shown.

[0042] Figure 2 A schematic diagram of a template for a pointer-type instrument provided in an embodiment of the present invention is shown;

[0043] Figure 3 This invention illustrates a schematic diagram of a dark channel image in a fogging scene according to an embodiment of the invention.

[0044] Figure 4 The grayscale histogram of the dark channel image in a fogging scene according to an embodiment of the present invention is shown.

[0045] Figure 5 This invention illustrates the ROI extraction diagram of a defogging instrument in a fogging scenario according to an embodiment of the invention.

[0046] Figure 6 This invention illustrates the pointer reading recognition diagram of a defogging instrument in a fogging scenario according to an embodiment of the present invention.

[0047] Figure 7 This diagram illustrates the principle block diagram of an instrument pointer reading recognition device for a fogging scene provided by an embodiment of the present invention;

[0048] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.

[0050] It should be noted that the terms "comprising" or "may include" used in the various embodiments of this application indicate the presence of the claimed function, operation, or element, and do not limit the addition of one or more functions, operations, or elements. Furthermore, as used in the various embodiments of this application, the terms "comprising," "having," and their cognates are intended only to indicate a specific feature, number, step, operation, element, component, or combination of the foregoing, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing, or adding one or more combinations of the foregoing.

[0051] It should be understood that terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0052] In the industrial sector, instruments are essential equipment, categorized into analog (pointer) instruments and digital instruments. Analog instruments, lacking electronic components, are highly adaptable to complex electromagnetic environments, offer excellent cost-effectiveness, and are widely used in industrial settings. While inexpensive, analog instruments do not integrate with control systems; in inaccessible environments, they require visual cameras to capture images for automated reading.

[0053] However, at many nuclear engineering sites, due to steam leaks, weather changes, equipment heating, and other reasons, the number of tiny suspended particles in the atmosphere increases, which enhances the absorption and scattering of light, creating a special fogging scene. Under this scene, the pointer reading recognition performance of the visual system decreases.

[0054] Therefore, this invention provides a method for recognizing the pointer readings of instruments in atomized scenarios, which enables the recognition of pointer instrument readings in atomized scenarios such as steam leakage. It can recognize the readings of multiple pointer instruments in the screen, thus improving the recognition performance of pointer readings.

[0055] Accordingly, in practical scenarios, this invention utilizes inspection robots and monitoring cameras to acquire images of pointer-type instruments on operating equipment or circuits, trains the instrument's area detection model, and then acquires images. When in a fogging scenario caused by steam leakage, the images are defogging processed and input into the area detection model to obtain the instrument's ROI. Then, pointer retrieval and reading recognition are performed to achieve instrument recognition in fogging scenarios, reducing the impact of complex conditions on the method's recognition results.

[0056] It should be noted that in the process of intelligentization, unmanned operation and digitalization of equipment in industries including nuclear, chemical and power, inspection robots and monitoring cameras are used to replace personnel for instrument identification. In foggy environments such as leaks, the images are automatically defogging to ensure identification accuracy. This method is easy to apply in engineering and is suitable for pointer-type instrument detection in other places such as chemical plants and power plants, other than nuclear power plants.

[0057] In light of the above implementation environment, see Figure 1 The embodiment shown provides a method for recognizing instrument pointer readings in a fogging scene. The specific method flow provided in this embodiment is as follows:

[0058] S101, acquire the first image of the instrument to be identified.

[0059] In this embodiment, a first image of the instrument to be identified can be acquired through an image acquisition device. It is understood that the image acquisition device can be a camera, a CCD image array, a CMOS image array, or other devices, apparatuses, components, or instruments used to convert optical images into digital data. For example... Figure 2 As shown, the first image of a pointer-type pressure gauge with a range of 600 kPa was captured with a high-resolution background, and the background was processed to be pure black as a template.

[0060] S102, calculate the fogging degree value of the first image, and when the fogging degree value of the first image is higher than a predetermined threshold, perform defogging image enhancement processing on the first image to obtain a fog-free second image.

[0061] In this embodiment, since fogging is not always a guaranteed occurrence, the fogging degree of the first image may be low in the absence of steam leakage, weather changes, equipment heating, or other factors. Therefore, it does not require defogging image enhancement processing. Thus, it can be understood that when the fogging degree value of the first image is not higher than a predetermined threshold, defogging image enhancement processing is not required. For example, the fogging degree threshold can be set to 120. It should be noted that this value can be adaptively adjusted according to the degree of steam leakage, weather changes, equipment heating, etc., and is not limited to 120.

[0062] Specifically, calculating the fogging degree value of the first image involves: separating the RGB channels of the first image to obtain the grayscale images corresponding to the RGB channels, performing a Laplacian transform on the grayscale images corresponding to the RGB channels, and calculating the average variance value of the first image after the Laplacian transform, which is used as the fogging degree value of the first image.

[0063] Specifically, the expression for the Laplace transform is: Where f is the image intensity distribution function, and x and y are the pixel distribution coordinates. It is expressed in discrete form as the following formula;

[0064]

[0065]

[0066] Laplace(f)=f(x+1,y)+f(x-1,y)+f(x,y+1)+f(x,y-1)-4f(x,y).

[0067] The mean variance of the first image after Laplacian transformation is then calculated. This mean variance is used as the fog level value of the first image. The first image with a fog level value greater than a predetermined threshold is considered a foggy image, and the first image with a fog level value less than the predetermined threshold is considered a fog-free image.

[0068] In one embodiment, performing dehazing image enhancement processing on a first image to obtain a haze-free second image includes: acquiring the dark channel image of the RGB channels of the first image; estimating the atmospheric light value and transmittance estimate of the dark channel image based on the atmospheric light constant and atmospheric scattering model; extracting the pixels of the brightest region in the dark channel image as the fog field based on the proportion of the fogged region in the prior area region of the first image, taking the brightness of the first third of the pixels in the fogged field as the corrected atmospheric light value, and updating the transmittance estimate based on the corrected atmospheric light intensity estimate to obtain the corrected atmospheric light value and updated transmittance in the prior area region of the dark channel image; and obtaining the haze-free second image based on the corrected atmospheric light value and updated transmittance, combined with the inverted atmospheric scattering model.

[0069] Specifically, based on the dark channel prior hypothesis, in all images that are not directly aligned with a clear daytime sky or are overexposed, there must exist a region where at least one of the RGB channels has a very low grayscale value; this channel is called the dark channel. (See also...) Figure 3 and Figure 4 ,in Figure 3 For dehazing dark channel images, Figure 4 The grayscale histogram of the dehazed dark channel image shows that most of the fog in the dark channel image is turned white, with the remainder being background. This prior is verified by the histogram. The dark channel image J of the first image... d (z) Intensity approaches 0, J d (z) is described as: Where r, g, and b represent the red, green, and blue channels of the first image, and Ω(z) is a small region centered at the z-coordinate.

[0070] When the image intensity and atmospheric light intensity of the dark channel image are constant at each pixel, the atmospheric light value and transmittance estimate are obtained based on the atmospheric scattering model and the assumption of atmospheric light constant. The atmospheric scattering model for fog imaging is as follows;

[0071] I(z) = J(z)t(z) + A(1-t(z)), where I(z) represents the image to be dehazed acquired in reality, and t(z) represents the atmospheric transmittance transfer function, as shown in the following equation: Where ω is the dehazing retention factor, A c This is the atmospheric light constant. This is for estimating transmittance.

[0072] Based on scene analysis of a nuclear device steam leak incident, it was found that the area of ​​the atomized region in the entire image taken from a safe distance does not exceed 15%. Based on this prior knowledge, the brightest 15% of pixels in the dark channel image are extracted as the atomized field Ω1. The average brightness of the first 1 / 3 of the pixels in the atomized field is taken as the corrected atmospheric light value A, and the projective rate estimation function is updated based on the atmospheric light value A. This allows us to obtain the atmospheric light value A and transmittance updated from the prior area region in the dark channel map.

[0073] Based on the atmospheric scattering model of the inverted fog imaging and the dark channel prior theory, the restored and enhanced fog-free image is derived as follows; Since there are always some suspended particles in the atmosphere, a certain amount of fog needs to be preserved in order to restore the image, where t0 is the minimum medium transmittance of the fog that is preset.

[0074] S103, the second image is input into the trained region detection model to detect the ROI region of the instrument and obtain the ROI region of the instrument. The trained region detection model is obtained by training a deep neural network on an image dataset consisting of low-resolution images of various pointer instruments.

[0075] In this embodiment, the training of the region detection model is specifically implemented as follows: collect open-source pointer instrument images, and at the same time, manually collect on-site images (taken under different sizes, different lighting, and different angles) to obtain a raw image dataset of thousands of images.

[0076] The images are standardized to PNG format with a size of 640×640. Blurry images that are not visible to the human eye are removed to obtain a cleaned image dataset.

[0077] The cleaned image dataset was annotated using Labelme annotation software to obtain the target bounding boxes of the instrument area on the images, forming an XML-formatted annotation file. The images and annotation files were matched one-to-one and divided into an 8:2 training set and a test set. Then, the annotation information and the cleaned image dataset were organized into a VOC dataset format to obtain the pointer instrument target dataset.

[0078] The YOLOv8 deep neural network is trained using a dataset of pointer-type instrument targets to obtain the neural network weight file for the instrument target detection model. The network parameters of the YOLOv8 deep neural network are then updated based on this weight file, resulting in the trained region detection model. It can be understood that, besides the YOLOv8 network, deep neural networks can also be YOLOv5, YOLOv3, or other neural networks used for target detection.

[0079] S104, perform template matching and pointer retrieval on the image of the ROI region to obtain the recognition result of the instrument pointer reading in the fogging scene.

[0080] In this embodiment, by using templates for different pointer instruments, the applicability of the recognition can be improved, and the same recognition effect can be achieved when applied to the recognition of pointer instrument readings of different specifications.

[0081] In summary, the instrument pointer reading recognition method provided in this embodiment enables the recognition of pointer instrument readings in atomization scenarios such as steam leakage. It can recognize the readings of multiple pointer instruments in the screen, thus improving the recognition performance of pointer readings.

[0082] In one embodiment, the method further includes: the region detection model uses a non-maximum suppression method to filter out the meter frame of the second image with a confidence level lower than the IOU threshold to obtain the ROI region of the meter, wherein the IOU threshold is 0.5.

[0083] Specifically, as mentioned above, the dehazed second image or the haze-free first image obtained from the above steps is input into the region detection model disk.pt. During training, the model weight precision type is float32. By converting the model to float16, the precision of the weights is reduced by about 45%, which improves the inference speed. Non-maximum suppression is used to filter out instrument frames with confidence levels lower than the IOU threshold of 0.5. This improves the detection accuracy of the region detection module for the ROI region of the instrument.

[0084] In one embodiment, template matching and pointer retrieval are performed on the image of the ROI region to obtain the recognition result of the instrument pointer reading in a foggy scene, including:

[0085] The ROI region image is cropped from the second image based on the ROI region, the SIFT feature points of the ROI region image are extracted, and feature point matching is performed between the SIFT feature points and the template to construct the mapping relationship between the ROI region and the template.

[0086] In the ROI region image that matches the template, Hough linear transform is used to detect pointers and Hough circular transform to detect dials. Pointer length threshold and dial size threshold are set to filter out template matching results that do not conform to the pointer and dial.

[0087] For the filtered template matching results, the pointer angle of the ROI region image is calculated using the vector method. The mapping relationship is used to match the pointer angle with the instrument readings matched by the template, so as to obtain the recognition result of the instrument pointer readings in the fogging scene.

[0088] Specifically, please refer to Figure 5 and Figure 6 The Region of Interest (ROI) is cropped from the second image. SIFT feature points are extracted from the ROI and matched with the template. Assuming the ROI has four points in its 3D imaging space (x1, y1, z1), (x2, y2, z2), (x3, y3, z3), and (x4, y4, z4), and the corresponding points in the 2D template image are (u1, v1), (u2, v2), (u3, v3), and (u4, v4), the relationship between them can be represented by the following mapping f. roi-t express:

[0089]

[0090] By substituting the four points, the transformation matrix can be calculated. Map the dial area and the template dial to the same two-dimensional space.

[0091] Hough transform is used to detect pointers and dials on ROI images that match the template. Multiple thresholds are set to filter out non-compliant results based on pointer size and its spatial relationship with the dial. For example, Hough linear transform is used to detect pointers on square ROI images that match the template, and Hough circular transform is used to detect dials. The circle detection radius is set to be greater than 1 / 10 of the square image's side length and less than 1 / 2 of the square image's side length; the resulting circle is designated as the dial. The pointer length detection threshold is less than the Hough detection circle radius and greater than 1 / 10 of the detection circle radius. These settings filter out false detections of pointers and dials.

[0092] The pointer angle is obtained by using the vector method. For all valid pointer angles, they are matched one-to-one with the instrument readings to obtain the final reading.

[0093] In one embodiment, the pointer angle of the ROI region image is calculated using a vector method. The mapping relationship is used to match the pointer angle with the instrument readings matched with the template, thereby obtaining the recognition result of the instrument pointer reading in a foggy scene. Specifically, the phase difference between the vector formed by the vertex of the pointer tip and the center of the dial and the pointer vector when the initial scale is 0 is calculated. The difference between the phase difference and the angle of the 0-scale digit is multiplied by the reading angle ratio, and then added to the minimum scale reading to obtain the reading of the instrument pointer in a foggy scene. The reading angle ratio is equal to the difference between the maximum scale reading and the minimum scale reading, divided by the difference between the counterclockwise rotation angle around the center corresponding to the maximum scale and the counterclockwise rotation angle around the center corresponding to the minimum scale.

[0094] In this embodiment, the pointer angle is obtained using a vector method, utilizing f roi-t Mapping this to the template reading to obtain the final reading involves calculating the phase difference between the vector formed by the vertex of the pointer tip and the center of the dial, and the pointer vector when the initial scale is 0. This phase difference, multiplied by the angle difference between this phase difference and the 0-scale digit, is then multiplied by the ratio of the reading angle ρ, and added to the smallest scale reading to obtain the final reading r. These are expressed as follows: r = ρ(θ - θ1) + w1; where w1 is the smallest scale reading, w2 is the largest scale reading, the origin of the coordinate system is the center of the dial, the horizontal direction to the right is the positive x-axis, the vertical direction upward is the positive y-axis, θ1 is the angle of counterclockwise rotation around the center corresponding to the smallest scale, θ2 is the angle of counterclockwise rotation around the center corresponding to the largest scale, and θ is the pointer angle.

[0095] For example, taking the center of the circle as the origin, the positive x-axis is horizontally to the right, and the positive y-axis is vertically upward. By determining the distance between the two ends of the pointer and the center of the dial, the end closer to the center is the thicker end of the pointer, and the end farther away is the thinner end (x1, y1), and the center is (x2, y2). The pointer angle θ is calculated using the vector method, as follows: When x1-x2=0 and y1-y2>0, θ is 90 degrees; when x1-x2=0 and y1-y2<0, θ is 90 degrees; when x1-x2<0, θ needs to be increased by 180° to obtain the actual pointer angle θ. The instrument scale is evenly distributed, with the maximum scale reading being 600kPa, corresponding to a vector angle of -45°, and the minimum scale reading being 0kPa, corresponding to a vector angle of 225°. The ratio of the reading angle ρ is calculated using the following formula to obtain the final reading r, expressed as follows: r = ρ(θ - θ1) + w1; where w1 is the smallest scale reading, w2 is the largest scale reading, θ1 is the angle of counterclockwise rotation around the center corresponding to the smallest scale, and θ2 is the angle of counterclockwise rotation around the center corresponding to the largest scale.

[0096] The present invention also provides a device for recognizing the pointer readings of an instrument in a fogging scene, which can be used to perform the method for recognizing the pointer readings of an instrument in a fogging scene provided in the above embodiments of the present invention.

[0097] Please see Figure 7 , Figure 7 This diagram illustrates a principle block diagram of a pointer reading recognition device for an instrument in a fogging scene according to an embodiment of the present invention. The device includes:

[0098] Image acquisition module 710 is used to acquire the first image of the instrument to be identified;

[0099] Image processing module 720 is used to calculate the fogging degree value of the first image, and when the fogging degree value of the first image is higher than a predetermined threshold, to perform defogging image enhancement processing on the first image to obtain a fog-free second image.

[0100] The region detection module 730 is used to input the second image into the trained region detection model to detect the ROI region of the instrument and obtain the ROI region of the instrument. The trained region detection model is obtained by training a deep neural network with an image dataset consisting of low-resolution images of various pointer instruments.

[0101] The reading recognition module 740 is used to perform template matching and pointer retrieval on the image of the ROI region to obtain the recognition result of the instrument pointer reading in the fogging scene.

[0102] The atomization scene instrument pointer reading recognition device provided in this application embodiment realizes the recognition of pointer instrument readings in atomization scenes such as steam leakage, and can recognize the readings of multiple pointer instruments in the screen, thus improving the recognition performance of pointer readings.

[0103] The atomization scene instrument pointer reading recognition device in this application embodiment is similar to the above-mentioned... Figure 1 The atomization scene instrument pointer reading recognition method shown is an invention based on the same concept. Through the above detailed description of the atomization scene instrument pointer reading recognition method, those skilled in the art can clearly understand the implementation process of the atomization scene instrument pointer reading recognition device in this embodiment. Therefore, for the sake of brevity, it will not be described again here.

[0104] In another embodiment of the present invention, Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8As shown, the electronic device may include: a processor 801, a communication interface 802, a memory 803, and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804. The processor 801 can call logical instructions in the memory 803 to execute a method for recognizing the pointer reading of an instrument in a foggy scene. This method includes: acquiring a first image of the instrument to be recognized; calculating the fogging degree value of the first image; when the fogging degree value of the first image is higher than a predetermined threshold, performing defogging image enhancement processing on the first image to obtain a fog-free second image; inputting the second image into a trained region detection model to detect the ROI region of the instrument, wherein the trained region detection model is obtained by training a deep neural network using an image dataset composed of low-resolution images of various pointer instruments; and performing template matching and pointer retrieval on the image of the ROI region to obtain the recognition result of the instrument pointer reading in a foggy scene.

[0105] Furthermore, the logical instructions in the aforementioned memory 803 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0106] In another embodiment of the present invention, a computer program product is also provided. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the foggy scene instrument pointer reading recognition method provided by the methods described above. This method includes: acquiring a first image of the instrument to be recognized; calculating the fog level value of the first image; when the fog level value of the first image is higher than a predetermined threshold, performing defogging image enhancement processing on the first image to obtain a fog-free second image; inputting the second image into a trained region detection model to detect the ROI region of the instrument, thereby obtaining the ROI region of the instrument, wherein the trained region detection model is obtained by training a deep neural network using an image dataset composed of low-resolution images of various pointer instruments; and performing template matching and pointer retrieval on the image of the ROI region to obtain the recognition result of the instrument pointer reading in a foggy scene.

[0107] In another embodiment of the present invention, a non-transitory computer-readable storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program implements the atomization scene instrument pointer reading recognition method provided by the methods described above. The computer-readable storage medium is a memory device in a computer device, used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the atomization scene instrument pointer reading recognition method in the above embodiments. Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0108] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for recognizing the pointer reading of an instrument in a fogging scene, characterized in that, The methods include: Acquire the first image of the instrument to be identified; The process involves calculating the fogging degree value of the first image. When the fogging degree value of the first image exceeds a predetermined threshold, the first image undergoes defogging image enhancement processing to obtain a fog-free second image. This defogging image enhancement processing includes: acquiring the dark channel image of the RGB channels of the first image; estimating the atmospheric light value and transmittance estimate of the dark channel image based on the atmospheric light constant and atmospheric scattering model; extracting the pixels of the brightest region in the dark channel image as the fogging field based on the proportion of the fogged region in the prior area region of the first image; taking the brightness of the first third of the pixels in the fogged field as the corrected atmospheric light value; updating the transmittance estimate based on the corrected atmospheric light intensity estimate to obtain the corrected atmospheric light value and updated transmittance in the prior area region of the dark channel image; and obtaining the fog-free second image based on the corrected atmospheric light value and updated transmittance, combined with the retrieved atmospheric scattering model. The second image is input into the trained region detection model to detect the ROI region of the instrument and obtain the ROI region of the instrument. The trained region detection model is obtained by training a deep neural network on an image dataset consisting of low-resolution images of various pointer instruments. Template matching and pointer retrieval are performed on the image of the ROI region to obtain the recognition result of the instrument pointer reading in a foggy scene. The process includes: cropping the ROI region image from the second image based on the ROI region; extracting SIFT feature points from the ROI region image; matching the SIFT feature points with a template to construct a mapping relationship between the ROI region and the template; using Hough linear transform to detect the pointer and Hough circular transform to detect the dial in the ROI region image that matches the template; setting pointer length thresholds and dial size thresholds to filter template matching results that do not conform to the pointer and dial; calculating the pointer angle of the ROI region image using a vector method for the filtered template matching results; and using the mapping relationship to map the pointer angle to the instrument reading matched with the template, thus obtaining the recognition result of the instrument pointer reading in a foggy scene.

2. The method for recognizing the pointer reading of an instrument in a fogging scene according to claim 1, characterized in that, The fogging degree value of the first image is calculated as follows: the RGB channels of the first image are separated to obtain the grayscale images corresponding to the RGB channels, the Laplacian transform is performed on the grayscale images corresponding to the RGB channels, and the average variance value of the first image after the Laplacian transform is calculated as the fogging degree value of the first image.

3. The method for recognizing the pointer reading of an instrument in a fogging scene according to claim 1, characterized in that, The aforementioned prior area accounts for 15%.

4. The method for recognizing the pointer reading of an instrument in a fogging scene according to claim 1, characterized in that, The method further includes: the region detection model uses a non-maximum suppression method to filter out the meter frame of the second image with a confidence level lower than the IOU threshold to obtain the ROI region of the meter, wherein the IOU threshold is 0.

5.

5. The method for recognizing the pointer reading of an instrument in a fogging scene according to claim 1, characterized in that, The pointer angle of the ROI region image is calculated using a vector method. The mapping relationship is then used to map the pointer angle to the instrument readings matched with the template, obtaining the recognition result of the instrument pointer readings in a foggy scene. Specifically: Calculate the phase difference between the vector formed by the vertex of the pointer tip and the center of the dial, and the pointer vector when the initial scale is 0; Multiply the difference between the phase difference and the angle of the 0-scale number by the ratio of the reading angle, and add the smallest scale reading to obtain the reading of the instrument pointer in the atomization scenario; The ratio of the reading angles is equal to the difference between the maximum and minimum scale readings, divided by the difference between the angle of counterclockwise rotation around the center corresponding to the maximum scale and the angle of counterclockwise rotation around the center corresponding to the minimum scale.

6. A device for recognizing the pointer reading of an instrument in a fogging scene, characterized in that, The device includes: The image acquisition module is used to acquire the first image of the instrument to be identified; An image processing module is used to calculate the fogging degree value of the first image. When the fogging degree value of the first image is higher than a predetermined threshold, the first image is subjected to defogging image enhancement processing to obtain a fog-free second image. The defogging image enhancement processing of the first image to obtain a fog-free second image includes: acquiring the dark channel image of the RGB channels of the first image; estimating the atmospheric light value and transmittance estimate of the dark channel image based on the atmospheric light constant and atmospheric scattering model; extracting the pixels of the brightest region in the dark channel image as the fogging field based on the proportion of the fogged region in the prior area region of the first image; taking the brightness of the first third of the pixels in the fogged field as the corrected atmospheric light value; updating the transmittance estimate based on the corrected atmospheric light intensity estimate to obtain the corrected atmospheric light value and updated transmittance in the prior area region of the dark channel image; and obtaining the fog-free second image based on the corrected atmospheric light value and updated transmittance, combined with the inverted atmospheric scattering model. The region detection module is used to input the second image into the trained region detection model to detect the ROI region of the instrument and obtain the ROI region of the instrument. The trained region detection model is obtained by training a deep neural network on an image dataset consisting of low-resolution images of various pointer instruments. The instrument reading recognition module is used to perform template matching and pointer retrieval on the image of the ROI region to obtain the recognition result of the instrument pointer reading in a foggy scene. The process of performing template matching and pointer retrieval on the image of the ROI region to obtain the recognition result of the instrument pointer reading in a foggy scene includes: cropping the ROI region image from the second image based on the ROI region; extracting SIFT feature points from the ROI region image; performing feature point matching between the SIFT feature points and the template to construct a mapping relationship between the ROI region and the template; using Hough linear transform to detect the pointer and Hough circular transform to detect the dial in the ROI region image that matches the template; setting pointer length thresholds and dial size thresholds to filter template matching results that do not conform to the pointer and dial; calculating the pointer angle of the ROI region image using a vector method for the filtered template matching results; and using the mapping relationship to map the pointer angle one-to-one with the instrument reading that matches the template to obtain the recognition result of the instrument pointer reading in a foggy scene.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements a method for recognizing the pointer readings of an instrument in a fogging scene as described in any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a method for recognizing the pointer readings of an instrument in a fogging scene as described in any one of claims 1 to 5.