Instrument state detection method, electronic device, and storage medium

By selecting target points for detection based on image similarity in instrument status detection, the problem of high labor costs caused by point deviation in the existing technology is solved, and more efficient and lower-cost detection is achieved.

CN114022873BActive Publication Date: 2025-10-21ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111165816.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2025-10-21
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

Existing instrument status detection methods require high manpower costs, mainly because recalibration is required when there is a deviation between the inspection stage and the background modeling stage.

Method used

By obtaining the similarity between the image to be detected and the background images corresponding to multiple candidate points, the target point is selected from the multiple candidate points, and the status detection is performed based on the instrument identification information of the target point, avoiding recalibration caused by point deviation between the inspection stage and the background modeling stage.

Benefits of technology

It reduces the manpower cost required for instrument status detection and improves the accuracy and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114022873B_ABST
    Figure CN114022873B_ABST
Patent Text Reader

Abstract

The application discloses an instrument state detection method, an electronic device and a computer readable storage medium. The method comprises the following steps: collecting a to-be-detected image corresponding to a current point; obtaining the similarity between the to-be-detected image and a background image corresponding to a plurality of candidate points; selecting a target point from the plurality of candidate points based on the similarity; and performing instrument state detection on the to-be-detected image based on the identification information of an instrument corresponding to the target point to obtain first state information of the instrument corresponding to the current point. In this way, the human cost required for instrument state detection can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an instrument status detection method, an electronic device, and a computer-readable storage medium. Background Art

[0002] Equipment in substations, machine rooms, workshops, and other locations is typically equipped with instruments, and real-time monitoring of their status is essential. Relying solely on manual inspections to monitor instrument status is labor-intensive, inefficient, and inefficient.

[0003] To this end, existing technologies use automated inspection methods to monitor instrument status. This involves setting multiple points in the area to be inspected, capturing images of the instrument at these points with cameras, and then inspecting the images based on the corresponding identification information to determine the instrument's status. However, existing instrument status detection methods still require significant labor costs. Summary of the Invention

[0004] The present application provides an instrument status detection method, an electronic device, and a computer-readable storage medium, which can solve the problem of high labor costs required for existing instrument status detection.

[0005] To solve the above technical problems, this application adopts a technical solution: providing a feature matching method. The method includes: acquiring an image to be detected corresponding to a current point; obtaining similarity between the image to be detected and background images corresponding to multiple candidate points; selecting a target point from the multiple candidate points based on the similarity; and performing instrument status detection on the image to be detected based on identification information of the instrument corresponding to the target point, thereby obtaining first status information of the instrument corresponding to the current point.

[0006] To solve the above technical problems, another technical solution adopted in this application is: to provide an electronic device, which includes a processor and a memory connected to the processor, wherein the memory stores program instructions; the processor is used to execute the program instructions stored in the memory to implement the above method.

[0007] In order to solve the above technical problems, another technical solution adopted in this application is: providing a computer-readable storage medium storing program instructions, which can implement the above method when executed.

[0008] Through the above method, the present application does not directly perform instrument status detection on the image to be detected based on the identification information of the instrument corresponding to the current point, but selects the target point from multiple candidate points based on the similarity between the image to be detected and the background image corresponding to multiple candidate points, and then performs instrument status detection on the image to be detected based on the identification information of the instrument corresponding to the target point. Therefore, even if the identification information of the instrument corresponding to the current point cannot be found during the inspection phase, the instrument status detection of the image to be detected can be achieved. Therefore, there is no need to recalibrate the point when there is a deviation between the point in the inspection phase and the background modeling phase. Therefore, the method provided by the present application can reduce the manpower cost required for instrument status detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 This is a flow chart of the first embodiment of the instrument status detection method of the present application;

[0010] Figure 2 yes Figure 1 Specific process diagram of S12;

[0011] Figure 3 is a schematic diagram of an image A including a meter a;

[0012] Figure 4 is the histogram of image A;

[0013] Figure 5 is a schematic diagram of an image B including a meter b;

[0014] Figure 6 is the histogram of image B;

[0015] Figure 7 is a schematic diagram of an image C including a meter c;

[0016] Figure 8 is the histogram of image C;

[0017] Figure 9 This is a flow chart of the second embodiment of the instrument status detection method of the present application;

[0018] Figure 10 This is a flow chart of the third embodiment of the instrument status detection method of the present application;

[0019] Figure 11 This is a flow chart of the fourth embodiment of the instrument status detection method of the present application;

[0020] Figure 12 This is a structural diagram of an embodiment of an electronic device of the present application;

[0021] Figure 13 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0023] The terms "first," "second," and "third" in this application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, a feature specified as "first," "second," or "third" may explicitly or implicitly include at least one of the features. In the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically specified.

[0024] Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it refer to independent or alternative embodiments that are mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments unless there is a conflict.

[0025] The reasons why the existing instrument status detection methods require high manpower costs are explained below.

[0026] Multiple points are pre-set in the area to be inspected. Instrument status detection is divided into two phases: background modeling and inspection. During the background modeling phase, the identification information of the instrument corresponding to each point in the inspection area is calibrated, thereby obtaining the identification information of the instrument corresponding to each point. Specifically, a camera is used to capture the background image corresponding to each point, and the identification information of the instrument corresponding to the point is manually calibrated based on the background image.

[0027] During the inspection phase, the image to be inspected corresponding to the current point is collected, the identification information of the instrument corresponding to the current point is found, and the instrument status detection is performed on the image to be inspected based on the identification information of the found instrument to obtain the status information of the instrument.

[0028] However, this method requires that the position (point) of the camera used to collect the background image during the background modeling phase and the camera used to collect the image to be detected during the inspection phase be completely consistent. In other words, each point in the inspection phase corresponds to the identification information of the calibrated instrument. If there is inconsistency / deviation (for example, due to different cameras used in the inspection phase and the background modeling phase), the inspection phase may not be able to find the identification information of the instrument corresponding to the current point, and thus cannot perform instrument status detection on the image to be detected, so recalibration is required. Due to the situation of multiple calibrations, the existing instrument status detection method requires high labor costs.

[0029] In order to reduce the manpower cost required for instrument status detection, the instrument status detection method provided in this application is as follows:

[0030] Figure 1 It is a flow chart of the embodiment 1 of the instrument status detection method of the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 1 The process sequence shown is limited. Figure 1 As shown, this embodiment may include:

[0031] S11: Collect the image to be detected corresponding to the current point.

[0032] A point is the location where the camera is positioned when capturing the image to be inspected. The inspection area is configured with multiple points. The camera has corresponding shooting parameters at each point. Each point corresponds to one or more instruments. Instruments include, but are not limited to, thermometers, gas pressure gauges, oil level gauges, voltmeters, ammeters, and main transformer oil gauges.

[0033] The image to be detected can be collected / photographed by a camera installed at a fixed position in the area to be detected. A camera can capture images corresponding to one or more points.

[0034] The image to be inspected can be captured using a camera mounted on the robot. An inspection route can be pre-set for the robot, with multiple points along the route. During the inspection process, the robot moves along the route and captures the image to be inspected based on the shooting parameters when it reaches the current point.

[0035] S12: Obtain similarities between the image to be detected and background images corresponding to the multiple candidate points.

[0036] Multiple candidate points all belong to the area to be inspected. The background image corresponding to each candidate point is the image captured at the candidate point during the background modeling phase. All candidate points have been calibrated, so the identification information of the instruments corresponding to the candidate points is known. The identification information of the instruments corresponding to the candidate points can be obtained through manual calibration, automatic calibration, or a combination of automatic calibration and manual verification.

[0037] The similarity can be cosine distance, Hamming distance, Euclidean distance, etc. The similarity can be calculated based on the grayscale value distribution, or it can be obtained by other means, for example, it can be calculated based on feature points, and the feature points can be Harris corner points, Sift feature points, etc. By obtaining the similarity between the image to be detected and the background images corresponding to multiple candidate points, the background image (the image taken at the corresponding candidate point) that is most similar to the image to be detected (the image taken at the corresponding current point) can be screened out. To simplify the description, the candidate point that is most similar to the current point will be referred to as the target point in the following text of this application.

[0038] The same candidate point can correspond to a background image. If so, the similarity between the image to be detected and the background image can be directly obtained.

[0039] It is understandable that the brightness environment of the background images taken at different times and in different weather conditions may be inconsistent. For example, the brightness of the background image taken at noon is higher than that of the background image taken in the morning. For another example, the brightness of the background image taken on a sunny day is higher than that of the background image taken on a cloudy day. Moreover, the brightness environment of the image to be detected is not constant. If only one background image corresponding to the candidate point is collected, the brightness of the background images corresponding to different candidate points may be different, and the brightness of the background image and the image to be detected may be different, resulting in inaccurate similarity obtained in this step, and then the target point determined subsequently is inaccurate, affecting the accuracy of the detection.

[0040] Therefore, in order to improve the accuracy of subsequent detection, the same candidate point can correspond to multiple background images with different brightness. If there are multiple images, the similarities (multiple similarities) between the image to be detected and the multiple background images can be obtained respectively, and the similarity between the image to be detected and the background image corresponding to the candidate point can be calculated based on the multiple similarities. Alternatively, the grayscale value distribution of the background image corresponding to the candidate point can be obtained based on the grayscale value distribution of the multiple background images, and then the similarity between the image to be detected and the background image corresponding to the candidate point with respect to the grayscale value distribution can be obtained.

[0041] See also Figure 2 In the case of calculating the similarity based on the gray value distribution, S12 may include the following sub-steps:

[0042] S121: Obtain a first grayscale value distribution of the image to be detected and a second grayscale value distribution of the background image corresponding to a plurality of candidate points.

[0043] The distribution of grayscale values ​​can be represented as a histogram, where the horizontal axis represents the grayscale value and the vertical axis represents the frequency of occurrence of the grayscale value.

[0044] The second grayscale value distribution can be obtained in advance or simultaneously with the first grayscale value distribution. If the same candidate point corresponds to multiple background images of different brightness, for each candidate point, the third grayscale value distribution of each background image corresponding to the subsequent point can be obtained, and the average of the multiple third grayscale value distributions corresponding to the subsequent point can be obtained, and the average is used as the second grayscale value distribution of the background image corresponding to the candidate point. The third grayscale value distribution can be calculated based on the second grayscale value distribution according to the following formula:

[0045]

[0046] Among them, I' represents the distribution of the third gray value, n represents the number of background images corresponding to the candidate point, I i (i=1, 2, ..., n) represents the second grayscale value distribution of the i-th background image corresponding to the candidate point.

[0047] For examples of images (background image / image to be detected) and their corresponding histograms, please refer to Figure 3-8 . Figure 3 is a schematic diagram of an image A containing a meter a, Figure 4 is the histogram of image A; Figure 5 is a schematic diagram of an image B including a meter b, Figure 6 is the histogram of image B; Figure 7 is a schematic diagram of an image C containing a meter c, Figure 8 is the histogram of image C.

[0048] S122: Calculate similarities between the first grayscale value distribution and the second grayscale value distributions corresponding to the plurality of candidate points.

[0049] The similarity between the first grayscale value distribution and the second grayscale value distribution can be calculated according to the following formula:

[0050]

[0051]

[0052] Wherein, d(H1, H2) represents the similarity between the first grayscale value distribution and the second grayscale value distribution, H1 represents the first grayscale distribution, H2 represents the second grayscale distribution, Represents the mean gray value of each pixel in the image to be detected, Represents the mean grayscale value of each pixel in the background image, N represents the number of pixels in the image to be detected / background image, H k (J) represents the grayscale value of the J-th pixel in the image to be detected (k=1) / background image (k=2).

[0053] S13: Based on the similarity, select a target point from multiple candidate points.

[0054] The candidate point with the greatest corresponding similarity can be used as the target point. Thus, the target point is the point that is most similar to the current point.

[0055] S14: Based on the identification information of the instrument corresponding to the target point, perform instrument status detection on the image to be detected to obtain first status information of the instrument corresponding to the current point.

[0056] Meter identification information refers to information that can be used to identify the meter's status. This information may include the meter's type and location. Meter status information includes the meter's reading, which indicates the meter's status. The meter's status may include its on / off state and operating status.

[0057] In addition, if it is determined through the first status information of the instrument that the status of the instrument is abnormal, an alarm may be triggered to remind relevant personnel to respond in a timely manner.

[0058] Through the implementation of this embodiment, the present application does not directly perform instrument status detection on the image to be detected based on the identification information of the instrument corresponding to the current point, but selects the target point from multiple candidate points based on the similarity between the image to be detected and the background images corresponding to multiple candidate points, and then performs instrument status detection on the image to be detected based on the identification information of the instrument corresponding to the target point. Therefore, even if the identification information of the instrument corresponding to the current point cannot be found during the inspection phase, the instrument status detection of the image to be detected can be achieved. Therefore, there is no need to recalibrate the point when there is a deviation between the point in the inspection phase and the background modeling phase. Therefore, the method provided by the present application can reduce the manpower cost required for instrument status detection.

[0059] Figure 9 It is a flow chart of the second embodiment of the instrument status detection method of the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 9 The process sequence shown is limited. This embodiment is a further extension of S14. Figure 9 As shown, this embodiment may include:

[0060] S141: Determine a second detection rule corresponding to the type of the meter.

[0061] The types of instruments include pointer type and numerical type. Figure 3 、 Figure 5 and Figure 7 . Figure 3 The instrument shown is a, Figure 5 The instrument b and Figure 7 The instruments c shown are all pointer type instruments.

[0062] Different instrument types have different corresponding second detection rules. For pointer-type instruments, the second detection rule is pointer angle recognition, which can be further divided into sub-area detection and angle detection. For numeric-type instruments, the second detection rule is character area detection and character recognition.

[0063] S142: Detecting the area corresponding to the position of the instrument in the image to be detected according to the second detection rule to obtain first state information of the instrument.

[0064] For the pointer type, sub-area detection can be performed on the area corresponding to the position of the instrument (referred to as the instrument area) to obtain the pointer sub-area and scale sub-area. The pointing angle of the pointer is determined based on the pointer sub-area and scale sub-area as the first state information of the instrument.

[0065] For the reading type, character area detection can be performed on the instrument area to obtain the character area, and character recognition can be performed on the character area to obtain the instrument reading as the first status information of the instrument.

[0066] In addition, in other embodiments, after S11 , the process may directly proceed to S12 to S14 to obtain the first status information of the instrument corresponding to the current point.

[0067] Alternatively, in other embodiments, in order to improve detection efficiency, after S11, it is also possible to first determine whether the current point has been calibrated, that is, whether there is corresponding instrument identification information. If so, the instrument status detection can be performed directly on the image to be detected based on the identification information of the instrument corresponding to the current point to obtain the status information of the instrument corresponding to the current point.

[0068] Alternatively, refer to Figure 10 In order to improve the detection efficiency, the above embodiment 1 can be further expanded to obtain the following embodiment 3.

[0069] Figure 10 It is a flow chart of the third embodiment of the instrument status detection method of the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 10 The process sequence shown is limited. Figure 10 As shown, this embodiment may include:

[0070] S21: Collect the image to be detected corresponding to the current point.

[0071] For a detailed description of this step, please refer to the previous instructions for S11, which will not be repeated here.

[0072] S22: Perform instrument state detection on the image to be detected according to the first detection rule to obtain second state information of the instrument and its confidence level.

[0073] The confidence level of the second state information is obtained based on the quality of the image to be detected. The higher the quality of the image to be detected, the higher the confidence level of the second state information.

[0074] The first detection rules include rules for determining the instrument's identification information and the instrument's status information. Thus, the first detection rules can be used to determine the instrument's identification information in the image to be detected, and further based on the instrument's identification information, the instrument's second status information can be determined. Specific determination rules may include position detection, type recognition, angle recognition, character recognition, and the like.

[0075] The following is an example of performing instrument status detection on an image to be detected according to the first detection rule:

[0076] Perform instrument location box detection on the image to be inspected to determine the location and type of each instrument in the image. The shape of the instrument location box can be circular, rectangular, polygonal, etc., depending on the specific instrument. Alternatively, perform instance segmentation on the image to determine the location and type of each instrument in the image to be inspected.

[0077] Different types of instruments have different rules for determining their identification information. Instruments can be pointer or numeric. For pointer instruments, the angle of the pointer in the area corresponding to the instrument's position in the image to be detected (referred to as the instrument area) is determined as the instrument's second state information. For numeric instruments, a character area within the instrument area in the image to be detected is identified, and character recognition is performed on the character area to obtain the instrument's reading, which is used as the instrument's second state information.

[0078] In addition, it is also necessary to determine the confidence level of the second state information. This confidence level may depend on the quality of the image to be detected. The higher the quality of the image to be detected, the higher the confidence level. The quality of the image to be detected may be determined based on the obstruction, brightness, and clarity of the instrument in the image to be detected. For example, if different instrument areas in the image to be detected overlap, or the area of ​​the instrument area does not meet the requirements, the instrument is deemed to be obscured. For another example, the brightness level of the instrument in the image to be detected may be determined based on the time or weather when the image to be detected was taken. If the instrument in the image to be detected is obscured, the brightness of the image to be detected is higher than a first brightness threshold or lower than a second brightness threshold, and the clarity is lower than a clarity threshold, the quality of the image to be detected is deemed to be low.

[0079] S23: Determine whether the confidence level is greater than a preset confidence threshold.

[0080] If the confidence is greater than the preset confidence threshold, it means that the second state information obtained through S22 is credible, and then S24 is executed; if the confidence is not greater than the preset confidence threshold, it means that the second state information obtained through S22 is not credible, and then S25-S27 are executed.

[0081] S24: The second status information of the meter is used as the first status information of the meter.

[0082] S25: Obtain similarities between the image to be detected and the background images corresponding to the multiple candidate points.

[0083] S26: Based on the similarity, select a target point from multiple candidate points.

[0084] S27: Based on the identification information of the instrument corresponding to the target point, perform instrument status detection on the image to be detected to obtain first status information of the instrument corresponding to the current point.

[0085] S25 to S27 correspond to the aforementioned S12 to S14 respectively. For detailed description, please refer to the relevant instructions of S12 to S14, which will not be repeated here.

[0086] It is understood that in mode S22, the identification information of the instrument in the image to be detected is automatically obtained through the first detection rule, and the second detection information of the instrument is then determined based on the instrument identification information. Therefore, it is not necessary to use pre-calibrated instrument identification information. In modes S25-S27, the identification information of the instrument corresponding to the target point is obtained through calibration, so it is necessary to use pre-calibrated instrument identification information.

[0087] Unlike the previous embodiment, this embodiment directly uses the second state information of the instrument in the image to be detected as the first state information if the confidence level of the second state information is greater than a preset confidence threshold as determined by S22. If the confidence level is less than the preset confidence threshold, the first state information of the instrument is determined by S25-S27 (S12-S14). Because S22 takes less time than S25-S27 and the detection complexity of S22 is lower than that of S25-S27, detection efficiency is improved.

[0088] See also Figure 11 In the case where the candidate points mentioned in S14 are obtained through automatic calibration, the above embodiment can be further expanded to obtain the following fourth embodiment.

[0089] Figure 11 It is a flow chart of the fourth embodiment of the instrument status detection method of the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 11 The process sequence shown is limited. This embodiment is an explanation of the method for obtaining the identification information of the instrument corresponding to the candidate point. Figure 11 As shown, this embodiment may include:

[0090] S31: Collecting background images corresponding to candidate points.

[0091] S32: Perform instrument recognition on the background image corresponding to the candidate point to obtain identification information of the instrument corresponding to the candidate point.

[0092] If a candidate point corresponds to multiple background images of varying brightness, instrument recognition can be performed on each background image corresponding to the candidate point to obtain identification information for the instrument in each background image. The identification information for each background image is then merged, and the merged result is used as the identification information for the instrument corresponding to the candidate point. It is understood that due to limitations in recognition accuracy, the identification information for the instrument obtained from different background images may differ. Therefore, merging the identification information from different background images as the identification information for the instrument corresponding to the candidate point provides greater accuracy.

[0093] Furthermore, to further improve the accuracy of the identification information of the instrument corresponding to the candidate location, manual verification can be performed. This involves manually correcting errors, completing omissions, and deleting redundant information. Therefore, after S32 , the process can also include receiving the results of the manual verification of the instrument's identification information and correcting the instrument's identification information based on the manual verification results.

[0094] Different from the previous embodiment, this embodiment uses instrument recognition on the background image corresponding to the subsequent points to obtain the identification information of the instruments corresponding to the candidate points, thereby achieving automatic calibration of the candidate points. Therefore, it can further reduce labor costs based on the previous embodiment.

[0095] The following is a detailed description of the instrument status detection method provided by this application in the form of an example.

[0096] Background modeling stage:

[0097] 1) The time required to collect background images of multiple candidate points in the inspection area is within one hour. During daytime hours (8:00 AM to 5:00 PM), a round-robin inspection of multiple candidate points is performed every hour. This results in eight background images of varying brightness corresponding to each candidate point.

[0098] 2) For each candidate point, perform instrument recognition on the eight background images corresponding to the candidate point to obtain the instrument identification information in the eight background images. This identification information is then combined to obtain the instrument identification information corresponding to the candidate point. This identification information is then manually corrected. Furthermore, the grayscale value distribution of the eight background images corresponding to the candidate point is obtained. The grayscale value distribution of the eight background images is averaged, and this average is used as the grayscale value distribution of the background image corresponding to the candidate point.

[0099] 3) The candidate points are associated with the grayscale value distribution of the corresponding background image and the identification information of the instrument and stored.

[0100] Inspection stage:

[0101] 4) Use the camera to capture the image to be detected at the current point.

[0102] 5) Perform instrument status detection on the image to be detected according to the first detection rule to obtain the second status information of the instrument and its confidence level; if the confidence level is higher than the confidence level threshold, proceed to step 6), otherwise proceed to step 7)-9).

[0103] 6) The second status information of the instrument is used as the first status information of the instrument corresponding to the current point.

[0104] 7) Obtaining the similarity of the grayscale value distribution between the image to be detected and the background images corresponding to the multiple candidate points;

[0105] 8) Select the candidate point with the highest similarity as the target point;

[0106] 9) Based on the identification information of the instrument corresponding to the target point, a second detection rule is determined, and the instrument status detection is performed on the image to be detected according to the second detection rule to obtain the status information of the instrument corresponding to the current point.

[0107] Figure 12 This is a schematic diagram of the structure of an embodiment of the electronic device of the present application. Figure 12 As shown, the electronic device includes a processor 21 and a memory 22 coupled to the processor 21 .

[0108] The memory 22 stores program instructions for implementing the method of any of the above embodiments; the processor 21 is used to execute the program instructions stored in the memory 22 to implement the steps of the above method embodiments. The processor 21 can also be called a CPU (Central Processing Unit). The processor 21 may be an integrated circuit chip with signal processing capabilities. The processor 21 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0109] Figure 13 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of the present application. Figure 13 As shown, the computer-readable storage medium 30 of the embodiment of the present application stores program instructions 31, and when the program instructions 31 are executed, the method provided in the above embodiment of the present application is implemented. Among them, the program instructions 31 can form a program file and be stored in the above-mentioned computer-readable storage medium 30 in the form of a software product, so that a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) executes all or part of the steps of the various embodiments of the present application. The aforementioned computer-readable storage medium 30 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.

[0110] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0111] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. The above is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of this application, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for detecting an instrument state, characterized in that: include: Collect the image to be detected corresponding to the current point; Obtaining similarities between the image to be detected and background images corresponding to multiple candidate points; Selecting the candidate point with the highest similarity from the multiple candidate points as the target point; Based on the identification information of the instrument corresponding to the target point, instrument status detection is performed on the image to be detected to obtain first status information of the instrument corresponding to the current point.

2. The method according to claim 1, characterized in that The obtaining of similarities between the image to be detected and background images corresponding to the plurality of candidate points includes: Obtaining a first grayscale value distribution of the image to be detected and a second grayscale value distribution of the background image corresponding to the plurality of candidate points; Similarities between the first grayscale value distribution and the second grayscale value distribution corresponding to the plurality of candidate points are respectively calculated.

3. The method according to claim 2, characterized in that The same candidate point corresponds to multiple background images with different brightness, and obtaining the second grayscale value distribution of the background images corresponding to the multiple candidate points includes: For each candidate point, obtaining a distribution of the third grayscale value of each background image corresponding to the candidate point; The mean of the plurality of third grayscale value distributions corresponding to the candidate points is obtained, and the mean is used as the second grayscale value distribution of the background image corresponding to the candidate points.

4. The method according to claim 1, wherein The method further comprises: Collecting the background image corresponding to the candidate point; Instrument recognition is performed on the background image corresponding to the candidate point to obtain identification information of the instrument corresponding to the candidate point.

5. The method according to claim 4, characterized in that The candidate point corresponds to a plurality of background images of different brightness, and the instrument recognition is performed on the background images corresponding to the candidate point to obtain identification information of the instrument corresponding to the candidate point, including: Performing instrument recognition on each of the background images corresponding to the candidate point to obtain identification information of the instrument in each of the background images; The identification information of the instrument in each of the background images is merged, and the merged result is used as the identification information of the instrument corresponding to the candidate point.

6. The method according to claim 4, characterized in that After performing instrument recognition on the background image corresponding to the candidate point to obtain identification information of the instrument corresponding to the candidate point, the method further includes: A manual verification result of the identification information of the meter is received, and the identification information of the meter is corrected based on the manual verification result.

7. The method according to claim 1, characterized in that Before obtaining the similarity between the image to be detected and the background images corresponding to the plurality of candidate points, the method further includes: performing instrument status detection on the image to be detected according to a first detection rule to obtain second status information of the instrument and a confidence level thereof, wherein the confidence level is obtained based on the quality of the image to be detected; If the confidence is greater than a preset confidence threshold, the second state information of the instrument is used as the first state information of the instrument; otherwise, the step of obtaining the similarity between the image to be detected and the background images corresponding to the plurality of candidate points is performed.

8. The method according to claim 1, characterized in that The identification information of the instrument includes the position of the instrument and the type of the instrument. The instrument status detection is performed on the image to be detected based on the identification information of the instrument corresponding to the target point to obtain the first status information of the instrument, including: Determining a second detection rule corresponding to the type of the meter; The area corresponding to the position of the instrument in the image to be detected is detected according to the second detection rule to obtain first state information of the instrument.

9. An electronic device, characterized in that: comprising a processor and a memory connected to the processor, wherein: The memory stores program instructions; The processor is configured to execute the program instructions stored in the memory to implement the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that The storage medium stores program instructions, and when the program instructions are executed, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Main body detection method and device, electronic equipment and computer readable storage medium

    CN110688926A

  • Inspection robot instrument image recognition method and system based on computer vision

    CN110826549A