Multi-task-based barometer identification method and device, electronic equipment and storage medium

Through the multi-task-based barometer recognition method, the problem of inaccurate reading of SF6 barometer is solved, and high-precision reading recognition is achieved under different lighting and complex backgrounds, improving the efficiency of monitoring work.

CN119579861APending Publication Date: 2025-03-07GUANGDONG POWER GRID CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411614892.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The monitoring of existing SF6 barometers relies on artificial vision, and there are problems such as low efficiency, susceptibility to human factors, and difficulty in ensuring accuracy and accuracy, especially in different lighting conditions and complex backgrounds.

Method used

Using a multi-task-based barometer recognition method, the accurate identification of barometer readings is achieved by determining the original barometer image, image segmentation, preprocessing and multi-task pattern recognition. The method includes target pointer positioning tasks and read-acquisition tasks, which can provide clear pending images in different lighting and complex backgrounds, improving reading accuracy.

Benefits of technology

It improves the accuracy of the barometer reading, reduces the probability of manual reading errors, improves the efficiency of monitoring work, and can work stably under different lighting and complex backgrounds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579861A_ABST
    Figure CN119579861A_ABST
Patent Text Reader

Abstract

The invention discloses a barometer identification method and device based on multiple tasks, electronic equipment and a storage medium. The method comprises the following steps: determining an original barometer image; performing image segmentation on the original barometer image to obtain a region-of-interest image; and preprocessing the region of interest to obtain a to-be-processed image, and determining the barometer reading by adopting a multi-task mode according to the to-be-processed image. According to the method, a clear to-be-processed image can be provided for a multi-task mode under the acquisition conditions of different illumination intensities and complex backgrounds through selection of an area-of-interest image and preprocessing of the area-of-interest image, and the tip of a target pointer and reading data corresponding to the tip can be obtained at the same time in the multi-task mode. The reading accuracy is improved, the probability of manual reading errors is reduced, and the efficiency of monitoring work is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a multi-task based barometer recognition method, device, electronic equipment and storage medium. Background Art

[0002] In high-voltage and ultra-high-voltage substations, sulfur hexafluoride (SF6) gas is widely used in high-voltage switchgear such as circuit breakers and transformers due to its excellent insulation and arc extinguishing performance. The pressure level of SF6 gas is directly related to the operational safety and reliability of the equipment.

[0003] However, the monitoring of SF6 barometers mainly relies on manual periodic inspections to directly observe the barometer readings with the naked eye. This method has significant limitations, especially when the barometer is located at a high place or other inaccessible locations, where visual observation of the readings is obviously difficult. The manual reading method of the meter has problems such as low efficiency, susceptibility to human factors, and difficulty in ensuring precision and accuracy.

[0004] With the development of technology, some substations have begun to adopt online monitoring systems, which realize real-time collection by installing pressure sensors and temperature sensors, and perform data processing and storage through signal processors and industrial computers to achieve real-time monitoring. However, the existing system may not be able to effectively cope with environmental factors such as different lighting conditions, equipment placement angles, and background complexity, resulting in unstable performance; lack of self-adjustment and optimization capabilities based on environmental changes and historical data, resulting in inaccurate readings of SF6 barometers. Summary of the invention

[0005] The present invention provides a multi-task based barometer recognition method, device, electronic equipment and storage medium to solve the problem of inaccurate barometer readings.

[0006] According to one aspect of the present invention, a multi-task based barometer recognition method is provided, comprising:

[0007] Determine an original image of the barometer; the original image of the barometer is an image of the barometer header;

[0008] Performing image segmentation on the original image of the barometer to obtain an image of a region of interest; the image of the region of interest includes the position of the target pointer in the header of the barometer and the scale in the header;

[0009] The region of interest is preprocessed to obtain an image to be processed, and a barometer reading is determined in a multi-task mode based on the image to be processed; the preprocessing includes: enhancement and / or brightness correction; the multi-task mode consists of a target pointer positioning task and a reading acquisition task, which are used to identify the barometer reading in the image to be processed; the target pointer positioning task is used to obtain the position of the barometer target pointer in the image of the region of interest; the reading acquisition task is used to determine whether it is necessary to refine the scale of the target pointer position based on the accuracy requirements, the target pointer position and the image of the region of interest, and determine the barometer reading based on the scale refinement result.

[0010] According to another aspect of the present invention, there is provided a barometer identification device based on multi-task, comprising:

[0011] A barometer original image determination module, used to determine the barometer original image; the barometer original image is an image of the barometer header;

[0012] A segmentation module is used to perform image segmentation on the original image of the barometer to obtain an image of a region of interest; the image of the region of interest includes the position of the target pointer in the header of the barometer and the scale in the header;

[0013] A barometer reading module is used to preprocess the region of interest to obtain an image to be processed, and determine the barometer reading in a multi-task mode based on the image to be processed; the preprocessing includes: enhancement and / or brightness correction; the multi-task mode consists of a target pointer positioning task and a reading acquisition task, and is used to identify the barometer reading in the image to be processed; the target pointer positioning task is used to obtain the position of the barometer target pointer in the image of the region of interest; the reading acquisition task is used to determine whether it is necessary to refine the scale of the target pointer position based on the accuracy requirements, the target pointer position and the image of the region of interest, and determine the barometer reading based on the scale refinement result.

[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the multi-task-based barometer identification method described in any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the multi-task-based barometer identification method described in any embodiment of the present invention when executed.

[0019] The technical solution of the embodiment of the present invention is to determine the original image of the barometer; perform image segmentation on the original image of the barometer to obtain an image of the region of interest, which can reduce the amount of calculation in the subsequent recognition of the barometer reading and eliminate the influence of other interference factors; preprocess the region of interest to obtain an image to be processed, and determine the barometer reading using a multi-task mode based on the image to be processed. The preprocessing can improve the image quality of the image of the region of interest and improve the accuracy of the barometer reading. The multi-task mode can accurately identify the simple tip of the target pointer and the precise scale corresponding to the tip. The method can provide a clear image to be processed for the multi-task mode under different light intensities and complex background acquisition conditions by selecting the image of the region of interest and preprocessing the image of the region of interest. The multi-task mode can simultaneously obtain the tip of the target pointer and the reading data corresponding to the tip, which improves the reading accuracy while reducing the probability of manual reading errors and improving the efficiency of monitoring work.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 A flowchart of a multi-task based barometer identification method provided by an embodiment of the present invention;

[0023] Figure 2 A structure diagram of an Arctic Puffin algorithm provided by an embodiment of the present invention;

[0024] Figure 3 A schematic diagram of a multi-task mode framework provided by an embodiment of the present invention;

[0025] Figure 4 A YOLOv8-MTL model training schematic diagram provided in an embodiment of the present invention;

[0026] Figure 5 A schematic diagram of the structure of a barometer identification device based on multi-task provided in an embodiment of the present invention;

[0027] Figure 6 A schematic diagram of the structure of an electronic device for implementing the multi-task based barometer identification method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Figure 1 A flowchart of a multi-task based barometer identification method provided by an embodiment of the present invention is provided. This embodiment is applicable to the case of obtaining accurate readings of a barometer. The method can be executed by a multi-task based barometer identification device. The multi-task based barometer identification device can be implemented in the form of hardware and / or software. The multi-task based barometer identification device can be configured in any electronic device with network communication function. Figure 1 As shown, the method includes:

[0031] S110, determining the original image of the barometer.

[0032] The original barometer image is an image of the barometer header.

[0033] Specifically, the original image of the barometer is collected by a camera arranged near the barometer.

[0034] S120, performing image segmentation on the original image of the barometer to obtain an image of a region of interest.

[0035] The image of the region of interest includes the location of the target pointer in the barometer header and the dial in the header.

[0036] Specifically, the region of interest in the original image of the barometer is extracted, that is, other interference information except the barometer header in the original image is removed, and the image after removing the interference information is segmented using an image segmentation algorithm to obtain an image of the region of interest.

[0037] S130, preprocessing the region of interest to obtain an image to be processed, and determining a barometer reading in a multi-task mode according to the image to be processed.

[0038] The preprocessing includes: enhancement and / or brightness correction.

[0039] Among them, enhancement is used to adjust the contrast, sharpness and clarity of the original image of the barometer.

[0040] Furthermore, adjustment parameters for enhancement and / or brightness correction are automatically generated based on the original image of the barometer.

[0041] Furthermore, the adjustment parameters may be generated by using an Arctic Puffin Optimization (APO) algorithm; or may be adaptively generated according to image features of the original image of the barometer.

[0042] Furthermore, adaptive generation can generate adjustment parameters corresponding to different regions in the original image of the barometer according to image features corresponding to the region, thereby achieving different adjustment parameters for different regions of an image.

[0043] Among them, the Arctic Puffin algorithm simulates the aerial flight and underwater foraging behavior of the Arctic Puffin in nature to achieve a better balance between exploration and development, so that it can effectively search for the most suitable adjustment parameters for the barometer raw image currently being processed.

[0044] Furthermore, the processing flow of the Arctic Cherry Blossom algorithm is as follows:

[0045] The initial candidate solution population is randomly generated, and each candidate solution contains a set of preprocessing parameters. The generation of the initial population can be compared to a random search process, and the position of each individual represents a potential solution in the search space, that is:

[0046]

[0047] in, represents the position of the i-th Arctic puffin; Rand generates a random number between 0 and 1; ub and lb represent the upper and lower bounds respectively; N is the number of individuals in the population.

[0048] Furthermore, iterative search: By simulating the predation behavior of the Arctic puffin, the APO algorithm performs iterative search in the parameter space. In each iteration, the algorithm updates the position of the candidate solution based on the fitness evaluation result of the current solution, gradually approaching the optimal solution.

[0049] Furthermore, the aerial flight phase (exploration) includes three stages: aerial search, diving predation and population merging.

[0050] Among them, aerial search: This stage is the global search stage, in which the Arctic puffin individuals (solutions) randomly walk in the search space to explore new areas and find better solutions, that is:

[0051]

[0052] R=round(0.5*(0.05+rand))*α,

[0053] α~Normal(0,1),

[0054] Where r is a random integer between 1 and N-1, including i; represents the current i-th candidate solution; is a candidate solution randomly selected from the current population, L(D) represents the random number generated by Levy flight; D is the dimension; α is a random number that conforms to the standard normal distribution.

[0055] Further, diving predation: This stage is a local search. After determining a promising area, the individual Arctic puffin will conduct a more intensive search to refine and optimize the solution, namely:

[0056]

[0057] S = tan((rand-0.5)*π),

[0058] Where S is the speed coefficient.

[0059] Furthermore, the population is merged: the candidate solutions obtained in the exploration and development phases are merged and evaluated. All solutions are evaluated through the fitness function, and the N solutions with the highest fitness are selected as the new generation population, that is:

[0060]

[0061] Among them, sort is based on the fitness value of the new population; For the new overall.

[0062] Among them, the underwater foraging stage (development) includes three links: gathering foraging, intensified search and avoiding predators.

[0063] Among them, aggregate foraging: the Arctic puffins in the population share information to concentrate on searching for areas that show higher fitness values, similar to cooperative behavior in a group, to increase the probability of finding the global optimal solution, that is:

[0064]

[0065] Where r is a random integer between 1 and N-1, including i; represents the current i-th candidate solution; is a candidate solution randomly selected from the current population, L(D) represents the random number generated by Levy flight; D is the dimension; α is a random number that conforms to the standard normal distribution.

[0066] Furthermore, when the Atlantic puffins feel that the quality of the solution in the current search area has decreased, they will change their search strategy and move to new areas randomly or with guidance to find better solutions, that is:

[0067]

[0068] Where T is the total number of iterations and t is the current iteration count. Rand is a random number that introduces some randomness.

[0069] Furthermore, avoiding predators: This step is to avoid falling into the local optimal solution. When the Arctic puffin individuals have not improved their current position for a long time, they will adopt strategies such as random jumping to escape from possible local optimal solutions and explore new areas, that is:

[0070]

[0071] Here, β is a uniformly distributed random number between 0 and 1.

[0072] Furthermore, as the APO algorithm iterates, the brightness, contrast, sharpness and other parameters are gradually fine-tuned until the optimal combination of parameters is found so that the target pointer and dial of the original image of the barometer are most prominent.

[0073] Furthermore, the image adjustment parameters generated by the Arctic Cherry Blossom algorithm or adaptively are used to generate an image adjustment parameter library according to the problem of the processed original image of the barometer.

[0074] For example, Figure 2As shown in the figure, it is a flowchart of the Arctic cherry algorithm. It can be seen from the figure that the initial population is set in the problem space first, and it is determined whether the current number of iterations is greater than the maximum number of iterations. If it is less than, the current Arctic cherry population and the best Arctic cherry individual in the population are evaluated, and the behavior conversion factor B is calculated according to the behavior of the Arctic cherry population and the best individual. If the behavior conversion factor B is greater than the preset parameter C, the position of the Arctic cherry population is updated through the three links of the aerial flight stage, and the current number of iterations is increased by 1; if the behavior conversion factor B is less than the preset parameter C, the position of the Arctic cherry population is updated through the three links of the underwater foraging stage, and the current number of iterations is increased by 1, until the current number of iterations is greater than the maximum number of iterations, then the optimal solution of parameter adjustment is output. If it is greater than, it ends directly and jumps out of the loop.

[0075] The above steps of enhancing and / or correcting the brightness of the original image of the barometer are due to the location where the barometer is configured, which may cause uneven lighting or shadows of other equipment to be projected onto the barometer, resulting in uneven brightness, insufficient contrast or blurred details in the collected original image of the barometer. Therefore, the original image of the barometer needs to be enhanced and / or corrected to make the target pointer and dial scale in the barometer header clear.

[0076] Among them, the multi-task mode consists of a target pointer positioning task and a reading acquisition task, which are used to identify the barometer reading in the image to be processed; the target pointer positioning task is used to obtain the position of the barometer target pointer in the image of the area of ​​interest; the reading acquisition task is used to determine whether it is necessary to refine the scale of the target pointer position according to the accuracy requirements, the position of the target pointer and the image of the area of ​​interest, and determine the barometer reading based on the scale refinement result.

[0077] Furthermore, the multi-task mode can be implemented using a multi-task based YOLO-v8 model, namely the YOLOv8-MTL model.

[0078] Furthermore, the YOLOv8-MTL model is composed of two parallel detection tasks, namely the target pointer positioning task and the reading acquisition task. The target pointer positioning task obtains the precise position of the target pointer; the reading acquisition task is used to determine the reading corresponding to the precise position according to the precise position of the target pointer obtained by the target pointer positioning task, and output the reading information.

[0079] For example, Figure 3 As shown in the figure, it is a YOLOv8-MTL model structure diagram. It can be seen from the figure that the two tasks are processed in parallel, and the image features can be shared through the shared layer. The data features of the precise position of the target pointer extracted by the target pointer positioning task are directly transmitted to the reading acquisition task to determine the precise reading of the barometer.

[0080] Among them, YOLOv8 is a real-time target detection algorithm that is widely used in the field of computer vision for its fast and accurate target detection capabilities. The core idea of ​​YOLOv8 is to transform the barometer reading detection task into a regression problem, and predict the target position and category in the image through a single forward propagation.

[0081] Furthermore, the network structure of YOLOv8 is usually composed of the following four parts: input layer: used to receive the original image; feature extraction layer: used to extract image features through deep convolutional neural network (CNN); feature pyramid network (FPN): used to combine low-level and high-level features to enhance the multi-scale expression ability of features; prediction layer: used to generate bounding box coordinates and category probability for each feature point.

[0082] Furthermore, the detection process of YOLOv8 can be described by the following mathematical formula:

[0083] [t x ,t y ,t w ,t h ,p c ,σ]=f θ (I)

[0084] Where: I is the input image, i.e. the image of the region of interest; f θ is the YOLOv8 model; θ represents the YOLOv8 model parameters; t x ,t y is the coordinate of the center point of the bounding box in the image; t w ,t h is the width and height of the bounding box; p c is the probability that the target belongs to a certain category; σ is the confidence that the target exists.

[0085] Furthermore, the loss function adopts a compound loss, which is the sum of position loss, confidence loss and classification loss:

[0086] L=L loc +L conf +L cls ,

[0087] Where: L loc is the position loss, calculating the difference between the predicted box and the real box; L conf is the confidence loss, which penalizes the inconsistency between the predicted box and the true box; L cls is the classification loss, which calculates the difference between the predicted category and the true category.

[0088] Among them, the position loss can be expressed as:

[0089] L loc =λ x ζ(t x ,t' x )+λ y ζ(t y ,t' y )+λ w ζ(t w ,t' w )+λ h ζ(t h ,t' h ),

[0090] Where: t x ',t y ',t w ',t h ', are the coordinates and size of the true bounding box. ζ is the loss function, usually using mean square error (MSE) or mean absolute error (MAE). λ x ,λ y ,λ w ,λ h is the weight of the position loss.

[0091] Furthermore, the confidence loss can be expressed as:

[0092] L conf = -log(1-σ iou ),

[0093] Among them, σ iou It is the confidence of the Intersection over Union (IoU) between the predicted box and the true box.

[0094] Furthermore, the classification loss can use the cross entropy loss:

[0095] L cls =-∑ c∈classes p c log(p'c),

[0096] Where: p c is the predicted class probability, p' c is the label of the true category.

[0097] For example, Figure 4As shown in the figure, the training process of the YOLOv8-MTL model is as follows: first, the parameter space of image preprocessing is defined, including adjustable parameters such as brightness, contrast, and sharpness. The initial value of the fitness function is set, and the image adjustment parameters are generated by the Arctic Cherry Blossom algorithm. The original image of the barometer is preprocessed according to the image adjustment parameters, and the image to be processed of the barometer is segmented by the image segmentation algorithm to obtain the image of the region of interest. The image of the region of interest is input into the YOLOv8-MTL model to obtain the barometer reading.

[0098] Furthermore, for each region of interest image, the precision and recall are calculated based on the prediction results of the YOLOv8-MTL model and the true label.

[0099] Furthermore, the average precision (AP) can be used to calculate the accuracy. AP is a balance between the accuracy and recall rate, which can be expressed as:

[0100]

[0101] Where n is the number of recall thresholds evaluated and precision(k) is the precision at the kth recall threshold.

[0102] Furthermore, mAP is calculated, that is, the AP values ​​of all categories are averaged to obtain mAP as the fitness value:

[0103]

[0104] Among them, N classes is the total number of target categories.

[0105] Furthermore, mAP is used as a fitness function to evaluate the performance of the image adjustment parameters, that is, the higher the fitness value, the greater the improvement of the image adjustment parameters on the barometer reading detection performance.

[0106] Furthermore, for each candidate solution (i.e., a set of image adjustment parameters) in the APO algorithm, these parameters are applied to preprocess the original image of the barometer to obtain the image to be processed. The image to be processed is used to perform the reading recognition task of the YOLOv8-MTL model. The object detection accuracy and recall rate of each image to be processed are calculated, and then the AP is calculated, and the mAP of all images to be processed is calculated as the fitness value of the current candidate solution. In this way, the APO algorithm will directly optimize the performance of the SF6 barometer reading recognition task when searching for the optimal image adjustment parameters.

[0107] Specifically, the image adjustment parameters are matched according to the pixel values ​​of the pixels in the image of the region of interest, and the image of the region of interest is preprocessed by the image adjustment parameters to obtain the image to be processed, and the image to be processed is processed in a multi-task mode to obtain the reading of the barometer. That is, the image to be processed is input into the YOLOv8-MTL model, and the target pointer positioning task and the reading acquisition task are processed in parallel to obtain the reading of the barometer.

[0108] Optionally, preprocessing the region of interest to obtain an image to be processed includes steps A1-A2:

[0109] Step A1: determine the pixel value of each pixel in the image of the region of interest, and match the image adjustment parameter according to the pixel value of each pixel.

[0110] Specifically, the pixel value of each pixel in the image of the region of interest is extracted, and the corresponding image adjustment parameter is matched from the image adjustment parameter library according to the pixel value of each pixel.

[0111] Furthermore, the image adjustment parameter library is composed of adjustment parameters generated by the Arctic Cherry Blossom algorithm based on the original images of the historical barometer. Different adjustment parameters correspond to processing different image features.

[0112] Furthermore, the image adjustment parameters in the image adjustment parameter library exist in the form of groups. For example, adjustment parameter A is used to improve the clarity and brightness of an image.

[0113] Step A2: Process the original image of the barometer according to the image adjustment parameters to obtain the image to be processed of the barometer.

[0114] The image adjustment parameters are parameters generated based on pixel values ​​in a specific area for enhancing and / or correcting brightness of the specific area. The specific area is an area in the original image of the barometer selected based on a preset sliding window size.

[0115] Specifically, the corresponding area in the original image of the barometer is adjusted according to the matched different image adjustment parameters, and the adjusted image is used as the barometer image to be processed.

[0116] Optionally, matching the image adjustment parameters according to the pixel value of each pixel point includes steps B1-B2:

[0117] Step B1: Set a preset sliding window size, and slide the preset sliding window in the image of the region of interest to determine and select a specific region.

[0118] Specifically, a preset sliding window size is set, and the preset sliding window is slid in the image of the region of interest, and the area circled by the preset sliding window is used as the specific area.

[0119] Furthermore, the preset sliding window size is determined according to the difference between the pixel values ​​of each pixel point.

[0120] Furthermore, the specific area may be one or more, depending on the setting of the preset sliding window size.

[0121] In the above steps, a specific area is selected because the acquisition environment of the original image of the barometer is easily affected by external interference, so different problems may appear on the same image. For example, some images may be dark and unclear, while others may be too bright. Therefore, different adjustment parameters need to be used for processing according to the specific information state represented by the original image of the barometer.

[0122] Step B2: determining image adjustment parameters according to the pixel values ​​of the pixels in the specific area.

[0123] Specifically, the image adjustment parameters are determined according to the state of the original image of the barometer represented by the pixel values ​​of the pixels in the specific area.

[0124] Exemplarily, assuming that the state of the original image of the barometer represented by the pixel values ​​of the pixels in a specific area is that the light is dark and the scale information is unclear, a parameter group for improving clarity and brightness is matched from the image adjustment parameter library as the image adjustment parameter.

[0125] Optionally, determining the barometer reading in a multi-task mode according to the image to be processed includes steps C1-C2:

[0126] Step C1: identifying a target pointer position image through a target pointer positioning task according to the image to be processed.

[0127] The target pointer position image is used to represent the scale image of the target pointer tip and the area where the tip is located.

[0128] Specifically, the image to be processed is input into the target pointer positioning task, the image features of the scale area where the target pointer is located are determined by calculation, and the target pointer position image is intercepted from the target pointer position image according to the image features of the scale area where the target pointer is located.

[0129] Step C2: determining the barometer reading through a reading acquisition task according to the features of the image to be processed and the target image.

[0130] The target image feature is used to characterize the feature information of the scale area where the target pointer is located.

[0131] Specifically, the reading acquisition task matches the corresponding area in the image to be processed according to the target image features and obtains the position information in the corresponding area. The barometer scale accuracy is obtained from the image to be processed, and the barometer reading is determined based on the obtained position information and the barometer scale accuracy.

[0132] Optionally, determining the barometer reading through a reading acquisition task according to the features of the image to be processed and the target image includes steps D1-D3:

[0133] Step D1, determining reference accuracy information from the image to be processed, and obtaining a target scale image.

[0134] The reference accuracy information is the accuracy of the barometer scale. The target scale image is an image containing all the contents in the target pointer position image.

[0135] Specifically, the reading acquisition task reads the barometer scale accuracy from the image to be processed, obtains reference accuracy information, and captures an image containing the target pointer, the position of the target pointer and the surrounding scales from the image to be processed according to the target image features as the target scale image.

[0136] Step D2: determining the scale refinement result according to the target scale image, reading accuracy requirements and reference accuracy information.

[0137] The scale refinement result is used to indicate whether the scale of the barometer needs to be finely divided.

[0138] Specifically, it is determined whether the target pointer is on the scale according to the target scale image. If the target pointer is almost on the scale, the scale refinement result is that no refinement is required; if there is a deviation between the target pointer and the scale, the reading accuracy requirement and the reference accuracy information are used to evaluate whether refinement is required. That is, if the reading accuracy requirement and the reference accuracy information are consistent, the scale refinement result is that no scale refinement is required; if they are inconsistent, the scale refinement result is that scale refinement is required.

[0139] Step D3, determining the barometer reading according to the scale refinement result, the target pointer position image and the target scale image.

[0140] Specifically, if the scale refinement result is that scale refinement is required, the scale refinement is performed on the area where the target pointer is located according to the reading accuracy requirement. After the refinement is completed, the barometer reading is determined based on the refined scale, the target pointer position image, and the target scale image. If the scale refinement result is that scale refinement is not required, the barometer reading is directly determined based on the target pointer position image and the target scale image.

[0141] Optionally, determining the scale refinement result according to the target scale image, the reading accuracy requirement and the reference accuracy information includes steps E1-E5:

[0142] Step E1, obtaining the relative position data between the target pointer and the scale in the target scale image.

[0143] Specifically, the relative distance between the target pointer and the scale in the target scale image is determined, and the obtained relative distance is used as the relative position information data.

[0144] Step E2: If the relative position data is smaller than the preset position difference, no scale refinement is required.

[0145] Specifically, if the relative position data is smaller than the preset position difference, it is considered that the target pointer and the scale are almost coincident, and there is no need to refine the scale.

[0146] Step E3: If the relative position data is greater than the preset position difference, determine whether the accuracy of the barometer meets the requirements based on the reading accuracy requirements and the reference accuracy information.

[0147] Specifically, if the relative position data is greater than the preset position difference, it is considered that the target pointer is far away from the scale, and the value corresponding to the scale cannot be used as the reading pointed by the pointer. At this time, it is determined whether the current reading range needs to be further refined according to the reading accuracy requirements and reference accuracy information.

[0148] Step E4: If the requirements are met, the scale refinement result is that no scale refinement is required.

[0149] Specifically, if the reference accuracy information meets the reading accuracy requirement, the scale refinement result is that scale refinement is not required.

[0150] For example, assuming that the reference accuracy information is that the reading is accurate to one decimal place, and the reading pointed to by the pointer is between 20.2-20.3, but the reading accuracy requirement only needs to be to one decimal place, there is no need to refine the scale.

[0151] Step E5: If the requirements are not met, the scale refinement result is that scale refinement is required.

[0152] Specifically, if the reference accuracy information does not meet the reading accuracy requirement, the scale refinement result is that scale refinement is required.

[0153] For example, assuming that the reference accuracy information is that the reading is accurate to one decimal place, the reading pointed to by the pointer is between 20.2-20.3, but the reading accuracy requirement needs to be 2 or 3 decimal places, then the scale needs to be refined.

[0154] Optionally, determining the barometer reading according to the scale refinement result, the target pointer position image and the target scale image includes steps F1-F3:

[0155] Step F1: If the scale refinement result indicates that scale refinement is required, the target scale image is scale refined according to the reading accuracy requirement to obtain a refined scale image.

[0156] Specifically, if the scale refinement result indicates that scale refinement is required, the scale image of the area where the pointer is located in the target scale image is refined according to the reading accuracy requirement to obtain a refined scale image.

[0157] Furthermore, when the reading accuracy requirement is too high, such as when it is necessary to maintain more than 3 decimal places, it is determined whether it is necessary to continue to refine the scale, that is, to determine whether the relative position distance between the target pointer and the scale in the image after scale refinement meets the preset position difference. If so, the current image is used as the refined scale image; if not, the refinement is continued until the relative position distance between the target pointer and the scale meets the preset position difference or the scale accuracy meets the reading accuracy requirement.

[0158] For example, assuming that the reading accuracy requirement is 0.01, that is, 2 decimal places, and the reading pointed to by the pointer is between 20.2-20.3, the scale between 0.2-0.3 is refined to obtain a refined scale image.

[0159] For example, assuming that the reading accuracy requirement is 0.001, that is, 3 decimal places, and the reading pointed to by the pointer is between 20.2-20.3, the scale between 0.2-0.3 is refined. After refinement, determine whether the relative position data between the target pointer and the scale meets the preset position difference. If so, there is no need to further refine the scale, and the current image is directly used as the refined scale image; if not, continue to refine the scale.

[0160] Step F2: determining first scale data from the refined scale image, and determining second scale data according to the target scale image.

[0161] The first scale data is the value corresponding to the scale pointed by the target pointer after the scale area where the target pointer is located is refined. The second scale data is the scale data of the target pointer under the reference scale information of the barometer.

[0162] Specifically, the refined scale reading is read from the refined scale image; and the second scale data is read from the target scale image.

[0163] Exemplarily, assuming that the refined scale image is an image after the scale is refined between 0.2-0.3, and the position pointed by the pointer is 0.03, the first scale data read is 0.03; the second scale data read from the target scale image is 20.2.

[0164] Step F3, determining the barometer reading according to the first scale data and the second scale data.

[0165] Specifically, the first scale data and the second scale data are merged according to the position of the decimal point to obtain the barometer reading.

[0166] For example, assuming that the first scale data is 0.03 and the second scale data is 20.2, the barometer reading is 20.23.

[0167] The technical solution of this embodiment is to determine the original image of the barometer; perform image segmentation on the original image of the barometer to obtain an image of the region of interest, which can reduce the amount of calculation in the subsequent recognition of the barometer reading and eliminate the influence of other interference factors; preprocess the region of interest to obtain an image to be processed, and determine the barometer reading using a multi-task mode based on the image to be processed. The preprocessing can improve the image quality of the image of the region of interest and improve the accuracy of the barometer reading. The multi-task mode can accurately identify the simple tip of the target pointer and the precise scale corresponding to the tip. This method can provide a clear image to be processed for the multi-task mode under different light intensities and complex background acquisition conditions by selecting the image of the region of interest and preprocessing the image of the region of interest. The multi-task mode can simultaneously obtain the tip of the target pointer and the reading data corresponding to the tip, which improves the reading accuracy while reducing the probability of manual reading errors and improving the efficiency of monitoring work.

[0168] Figure 5 The present invention provides a schematic diagram of a multi-task barometer recognition device. This embodiment is applicable to obtaining accurate barometer readings. The multi-task barometer recognition device can be implemented in the form of hardware and / or software. The multi-task barometer recognition device can be configured in any electronic device with network communication function. Figure 5 As shown, the device includes: a barometer original image determination module 210, a segmentation module 220 and a barometer reading reading module 230, wherein:

[0169] The barometer original image determination module 210 is used to determine the barometer original image; the barometer original image is the image of the barometer header;

[0170] Segmentation module 220: used to segment the original image of the barometer to obtain an image of the region of interest; the image of the region of interest includes the location of the target pointer in the barometer header and the dial in the header;

[0171] Barometer reading module 230: used to preprocess the area of ​​interest to obtain the image to be processed, and determine the barometer reading in a multi-task mode based on the image to be processed; the preprocessing includes: enhancement and / or brightness correction; the multi-task mode consists of a target pointer positioning task and a reading acquisition task, which is used to identify the barometer reading in the image to be processed; the target pointer positioning task is used to obtain the position of the barometer target pointer in the image of the area of ​​interest; the reading acquisition task is used to determine whether the target pointer position needs to be refined according to the accuracy requirements, the target pointer position and the image of the area of ​​interest, and determine the barometer reading based on the scale refinement result.

[0172] Optionally, the barometer original image determination module 210 includes:

[0173] Original image acquisition unit: used to determine the pixel value of each pixel in the image of the region of interest, and match the image adjustment parameter according to the pixel value of each pixel;

[0174] The unit for determining the image to be processed is used to process the original image of the barometer according to the image adjustment parameters to obtain the image to be processed of the barometer; the image adjustment parameters are parameters generated according to the pixel values ​​in the specific area, and are used to enhance and / or correct the brightness of the specific area; the specific area is an area in the original image of the barometer selected according to the preset sliding window size.

[0175] Optionally, the unit for determining the image to be processed includes:

[0176] Specific area selection subunit: used to set the preset sliding window size, and slide the preset sliding window in the image of the area of ​​interest to determine the selection of a specific area;

[0177] Image adjustment parameter determination subunit: used to determine image adjustment parameters according to the pixel values ​​of the pixels in a specific area.

[0178] Optionally, the barometer reading module 230 includes:

[0179] A target pointer position image determination unit is used to identify a target pointer position image through a target pointer positioning task according to an image to be processed; the target pointer position image is used to represent a scale image of the target pointer tip and the area where the tip is located;

[0180] A barometer reading determination unit is used to determine the barometer reading through a reading acquisition task according to the features of the image to be processed and the target image.

[0181] Optionally, a barometer reading determination unit, comprising:

[0182] Target scale image acquisition subunit: used to determine reference accuracy information from the image to be processed and acquire a target scale image; the reference accuracy information is the accuracy of the barometer scale; the target scale image is an image containing all contents in the target pointer position image;

[0183] Scale division subunit: used to determine the scale refinement result according to the target scale image, reading accuracy requirements and reference accuracy information; the scale refinement result is used to indicate whether the scale of the barometer needs to be divided in detail;

[0184] Barometer reading determination subunit: used to determine the barometer reading based on the scale refinement result, the target pointer position image and the target scale image.

[0185] Optional, scale division subunit, specifically used for:

[0186] Obtaining relative position data between the target pointer and the scale in the target scale image;

[0187] If the relative position data is smaller than the preset position difference, no scale refinement is required;

[0188] If the relative position data is greater than the preset position difference, determine whether the accuracy of the barometer meets the requirements based on the reading accuracy requirements and the reference accuracy information;

[0189] If the requirements are met, the scale refinement result is that scale refinement is not required;

[0190] If the requirements are not met, the scale refinement result is that scale refinement is required.

[0191] Optionally, a barometer reading determination subunit is provided, specifically for:

[0192] If the scale refinement result indicates that scale refinement is required, the target scale image is scale refined according to the reading accuracy requirement to obtain a refined scale image;

[0193] Determine the first scale data from the refined scale image, and determine the second scale data according to the target scale image; the first scale data is the value corresponding to the scale pointed to by the target pointer after the scale area where the target pointer is located is refined; the second scale data is the scale data of the target pointer under the reference scale information of the barometer;

[0194] The barometer reading is determined according to the first scale data and the second scale data.

[0195] The multi-task-based barometer identification device provided in the embodiment of the present invention can execute the multi-task-based barometer identification method provided in any embodiment of the present invention mentioned above, and has the corresponding functions and beneficial effects of executing the multi-task-based barometer identification method. For the detailed process, please refer to the relevant operations of the multi-task-based barometer identification method in the aforementioned embodiment.

[0196] Figure 6 A schematic diagram of the structure of an electronic device for implementing a multi-task based barometer identification method according to an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0197] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0198] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0199] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a multi-task-based barometer recognition method.

[0200] In some embodiments, the multi-task based barometer identification method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the multi-task based barometer identification method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the multi-task based barometer identification method in any other appropriate manner (e.g., by means of firmware).

[0201] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0202] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0203] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0204] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0205] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0206] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0207] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0208] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A multi-task based barometer recognition method, characterized in that: include: Determine the original image of the barometer; The barometer original image is an image of the barometer header; Performing image segmentation on the original image of the barometer to obtain an image of a region of interest; The image of the region of interest includes the position of the target pointer in the barometer header and the scale in the header; Preprocessing the region of interest to obtain an image to be processed, and determining a barometer reading in a multi-task mode based on the image to be processed; The preprocessing includes: enhancement and / or brightness correction; the multi-task mode consists of a target pointer positioning task and a reading acquisition task, which is used to identify the barometer reading in the image to be processed; the target pointer positioning task is used to obtain the position of the barometer target pointer in the image of the area of ​​interest; the reading acquisition task is used to determine whether it is necessary to refine the scale of the target pointer position based on the accuracy requirements, the target pointer position and the image of the area of ​​interest, and determine the barometer reading based on the scale refinement result.

2. The method according to claim 1, characterized in that Preprocessing the region of interest to obtain an image to be processed includes: Determine the pixel value of each pixel in the image of the region of interest, and match the image adjustment parameter according to the pixel value of each pixel; The original image of the barometer is processed according to the image adjustment parameters to obtain a pending image of the barometer; the image adjustment parameters are parameters generated according to pixel values ​​in a specific area and used to enhance and / or correct the brightness of the specific area; the specific area is an area in the original image of the barometer selected according to a preset sliding window size.

3. The method according to claim 2, characterized in that The matching of image adjustment parameters according to the pixel values ​​of each pixel point includes: Setting a preset sliding window size, and sliding the preset sliding window in the image of the region of interest to determine and select a specific region; The image adjustment parameters are determined according to the pixel values ​​of the pixels in the specific area.

4. The method according to claim 1, characterized in that: The method of determining the barometer reading in a multi-task mode according to the image to be processed includes: Identify a target pointer position image according to the image to be processed through the target pointer positioning task; the target pointer position image is used to represent the target pointer tip and a scale image of the area where the tip is located; The barometer reading is determined through the reading acquisition task according to the image to be processed and the target image features.

5. The method according to claim 4, characterized in that The determining of the barometer reading through the reading acquisition task according to the image to be processed and the target image features includes: Determine reference accuracy information from the image to be processed, and obtain a target scale image; the reference accuracy information is the accuracy of the barometer scale; the target scale image is an image containing all contents in the target pointer position image; Determining a scale refinement result according to the target scale image, the reading accuracy requirement and the reference accuracy information; the scale refinement result is used to indicate whether the scale of the barometer needs to be finely divided; The barometer reading is determined according to the scale refinement result, the target pointer position image and the target scale image.

6. The method according to claim 5, characterized in that The step of determining the scale refinement result according to the target scale image, the reading accuracy requirement and the reference accuracy information includes: Obtaining relative position data between the target pointer and the scale in the target scale image; If the relative position data is smaller than the preset position difference, no scale refinement is required; If the relative position data is greater than the preset position difference, determining whether the accuracy of the barometer meets the requirement based on the reading accuracy requirement and the reference accuracy information; If the requirements are met, the scale refinement result is that no scale refinement is required; If the requirement is not met, the scale refinement result indicates that scale refinement is required.

7. The method according to claim 5, characterized in that The determining the barometer reading according to the scale refinement result, the target pointer position image and the target scale image comprises: If the scale refinement result is that scale refinement is required, the target scale image is scale refined according to the reading accuracy requirement to obtain a refined scale image; first scale data is determined from the refined scale image, and second scale data is determined according to the target scale image; the first scale data is the value corresponding to the scale pointed to by the target pointer after the scale area where the target pointer is located is refined; the second scale data is the scale data of the target pointer under the reference scale information of the barometer; The barometer reading is determined according to the first scale data and the second scale data.

8. A barometer recognition device based on multi-task, characterized in that: include: A barometer original image determination module, used to determine the barometer original image; The barometer original image is an image of the barometer header; A segmentation module, used for performing image segmentation on the original image of the barometer to obtain an image of a region of interest; The image of the region of interest includes the position of the target pointer in the barometer header and the scale in the header; A barometer reading reading module is used to pre-process the region of interest to obtain an image to be processed, and determine the barometer reading in a multi-task mode according to the image to be processed; The preprocessing includes: enhancement and / or brightness correction; the multi-task mode consists of a target pointer positioning task and a reading acquisition task, which is used to identify the barometer reading in the image to be processed; the target pointer positioning task is used to obtain the position of the barometer target pointer in the image of the area of ​​interest; the reading acquisition task is used to determine whether it is necessary to refine the scale of the target pointer position based on the accuracy requirements, the target pointer position and the image of the area of ​​interest, and determine the barometer reading based on the scale refinement result.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the multi-task-based barometer identification method described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the multi-task-based barometer identification method according to any one of claims 1 to 7 when executed.