A noise-robust multi-category dial pointer reading recognition method and device
Through a noise- robust multi-category dial pointer reading recognition method, the problem of identifying multiple dial readings in the prior art is solved, and the accurate identification and robustness of dials of different forms and specifications is achieved.
Patent Information
- Application Number
- CN202210141377.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-16
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-02-16
AI Technical Summary
The prior art is difficult to effectively identify dial readings of many different forms and specifications, especially in noise environments, and the recognition accuracy and robustness are insufficient.
A noise-enhancing multi-category dial pointer reading recognition method is proposed. By acquiring instrument images, key area information is segmented and extracting, and the dial pointer reading is calculated based on category information. The method includes determining the center of the dial, calculating the pointer angle and scale angle, and improving the robustness of the algorithm through post-processing.
It realizes effective reading recognition of dials of various types and specifications, improves the recognition accuracy and robustness in noise environments, and can effectively filter noise blocks and estimate defect scales.
Smart Images

Figure CN114581915B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic recognition technology, and in particular to a noise-robust multi-category dial pointer reading recognition method and device. Background Art
[0002] In the field of automatic identification of pointer instruments, relevant research has been done both at home and abroad. The researchers who started related work earlier were Robert Sablatnig's team and F.Correa Alegria's team. They have made many explorations in the automatic acquisition algorithm of instrument readings, such as introducing Hough Transformation into this field, and using methods such as feature extraction, image correction, straight line detection, silhouette pointer extraction, and angle calculation to realize instrument reading calculation.
[0003] The existing technical solutions mainly design reading recognition algorithms for specific types of instruments and suppress surface noise through Mask-RCNN and other methods. Among them, the first type of solution is designed for reading recognition of a specific type of instrument. A typical representative of this type of solution is to use a camera to collect images and use digital image processing technology to achieve a method for automatic recognition and interpretation of pointer-type instrument readings with higher accuracy than human eye observation. And, the second type of solution is to use convolutional neural networks to achieve instrument target positioning, use Hough transform to achieve dial and pointer detection, and then obtain instrument readings. Summary of the invention
[0004] The present invention aims to solve one of the technical problems in the related art at least to a certain extent.
[0005] To this end, the first object of the present invention is to propose a noise-robust multi-category dial pointer reading recognition method to achieve recognition of dial readings of various different shapes and specifications.
[0006] The second object of the present invention is to provide a noise-robust multi-category dial pointer reading recognition device.
[0007] A third object of the present invention is to provide a non-transitory computer-readable storage medium.
[0008] A fourth object of the present invention is to provide a computer program product.
[0009] To achieve the above object, a first embodiment of the present invention provides a method, comprising:
[0010] Acquire image information of the instrument to be detected, and determine target position information and category information of the instrument to be detected based on the image information;
[0011] Segmenting the image information according to the target position information, and extracting key area information in the dial from the image information;
[0012] A preset rule corresponding to the category information is determined according to the category information, and a dial pointer reading result is obtained according to the preset rule and the key area information.
[0013] Optionally, in one embodiment of the present invention, the category information includes a pointer oil level gauge, and the step of obtaining a dial pointer reading result according to the preset rule and the key area information includes:
[0014] Determine the center coordinates of the dial according to the key area information;
[0015] Obtaining mask information corresponding to the key area information, and calculating the pointer angle of the dial according to the mask information;
[0016] The scale angle is obtained according to the coordinates of the center of the dial.
[0017] Optionally, in one embodiment of the present invention, the key area information includes scale information and pointer information.
[0018] The step of determining the center coordinates of the dial according to the key area information includes:
[0019] Acquire the center coordinates of the scale connected regions according to the scale information and the pointer information, and fit a circle passing through the center of each scale connected region according to the center coordinates;
[0020] When the dial is regular, the coordinates of the center of the circle are used as the coordinates of the center of the dial;
[0021] When the dial is irregular, a straight line where the pointer area is located is fitted, and the center of the circle is projected onto the straight line to obtain the coordinates of the center of the dial.
[0022] Optionally, in an embodiment of the present invention, the acquiring mask information corresponding to the key area information, and calculating the pointer angle of the dial according to the mask information, includes:
[0023] The coordinates of the center of the pointer mask are calculated according to the mask information, and the pointer angle of the dial is calculated according to the coordinates of the center of the dial and the coordinates of the center of the pointer mask.
[0024] Optionally, in one embodiment of the present invention, obtaining the scale angle according to the center coordinates of the dial includes:
[0025] According to the center coordinates of each scale connected area, the scale angle information of each scale connected domain is calculated;
[0026] Sorting the scale angle list to obtain an ordered list, wherein the scale angle list includes scale angle information of each scale connected domain;
[0027] Calculate the median of the angle differences between adjacent scales in the ordered list;
[0028] Deleting the scales in the ordered list whose adjacent angle differences and medians satisfy a first preset relationship;
[0029] For scales in the ordered list whose adjacent angle differences and medians satisfy a second preset relationship, supplement the scales according to the differences;
[0030] Determine the dial division value according to the number of scale angles, and obtain the dial reading according to the angle method.
[0031] Optionally, in an embodiment of the present invention, the category information includes a dual-pointer temperature meter, and the step of obtaining a dial pointer reading result according to the preset rule and the key area information includes:
[0032] Determine the coordinates of the center of the dial according to the intersection of the straight lines fitted by the two pointers contained in the dual-pointer thermometer;
[0033] The pointer mask information is obtained from the dial and the pointer mask center is calculated. According to the center coordinates of the dial and the deflection angle of the pointer center coordinates relative to the center coordinates of the dial, the angles of the two pointers are calculated.
[0034] Calculate the angle information of the digital area according to the center coordinates of the digital connected area;
[0035] Sort the list of digital area angles to obtain an ordered list;
[0036] Determine the dial division value according to the number of scale angles, and obtain the dial reading according to the angle method.
[0037] Optionally, in an embodiment of the present invention, the category information includes a pressure gauge or an electrical gauge, and the step of obtaining a dial pointer reading result according to the preset rule and the key area information includes:
[0038] Determine the center coordinates of the dial according to the key area information;
[0039] Obtaining mask information corresponding to the key area information, and calculating the pointer angle of the dial according to the mask information;
[0040] Get the scale angle list and the digital area angle list;
[0041] Adjust the dial according to the scale angle list and the digital area angle list;
[0042] Identify dial numbers based on dial correction;
[0043] Get the dial reading according to the angle method based on dial digital recognition.
[0044] To achieve the above-mentioned object, a second embodiment of the present invention provides a noise-robust multi-category dial pointer reading recognition device, comprising:
[0045] An acquisition module is used to acquire image information of the instrument to be detected, and determine target position information and category information of the instrument to be detected based on the image information;
[0046] A segmentation module, used to segment the image information according to the target position information, and extract key area information in the dial from the image information;
[0047] A determination module is used to determine a preset rule corresponding to the category information according to the category information, and obtain a dial pointer reading result according to the preset rule and the key area information.
[0048] To achieve the above-mentioned purpose, the third aspect of the present invention proposes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the noise-robust multi-category dial pointer reading recognition method described in the first aspect of the present invention is implemented.
[0049] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present invention proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the noise-robust multi-category dial pointer reading recognition method described in the first aspect embodiment of the present invention.
[0050] In summary, the present invention proposes a noise-robust multi-category dial pointer reading recognition method, apparatus, computer equipment and non-temporary computer-readable storage medium, which can effectively identify dial categories and dial readings, thereby improving the effectiveness of the pointer reading recognition method for dial readings of various different shapes and specifications, and, based on the connected domain information, filtering out noise blocks with smaller areas, and setting filtering rules for the center position of the circumscribed rectangular frame of the reference digital area to effectively distinguish decimal points from noise points; for the remaining scale angle information, the missing scales can be effectively estimated by obtaining adjacent scales to improve the accuracy and robustness of the algorithm reading recognition.
[0051] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0053] Figure 1 A schematic flow chart of a noise-robust multi-category dial pointer reading recognition method provided by an embodiment of the present invention;
[0054] Figure 2 A schematic diagram of a noise-robust multi-category dial pointer reading recognition solution provided by an embodiment of the present invention;
[0055] Figure 3 A schematic structural diagram of a noise-robust multi-category dial pointer reading recognition device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0057] A noise-robust multi-category dial pointer reading recognition method and device according to an embodiment of the present invention will be described below with reference to the accompanying drawings.
[0058] Figure 1 A schematic flow chart of a noise-robust multi-category dial pointer reading recognition method provided by an embodiment of the present invention.
[0059] like Figure 1 As shown, the noise-robust multi-category dial pointer reading recognition method includes the following steps:
[0060] Step S1: Acquire image information of the instrument to be detected, and determine the target position information and category information of the instrument to be detected according to the image information.
[0061] In one embodiment of the present invention, the category information may include: a pointer oil level gauge, a dual-pointer temperature gauge, a pressure gauge or an electrical gauge.
[0062] Step S2: Segment the image information according to the target position information, and extract key area information in the dial from the image information.
[0063] It should be noted that in one embodiment of the present invention, for the pointer-type instrument detected by the instrument detection module, there is often some background interference information that is useless for the instrument reading calculation. In order to achieve the final reading calculation, it is necessary to use a segmentation algorithm on the detected instrument to extract the pointer, scale and digital area in the dial, which are more important for reading recognition.
[0064] Step S3: Determine a preset rule corresponding to the category information according to the category information, and obtain the dial pointer reading result according to the preset rule and the key area information.
[0065] In one embodiment of the present invention, when the category information of the instrument to be detected is a pointer-type oil level meter, the center coordinates of the dial are determined according to the key area information, the mask information corresponding to the key area information is obtained, the pointer angle of the dial is calculated according to the mask information, and the scale angle is obtained according to the center coordinates of the dial.
[0066] Specifically, in one embodiment of the present invention, the pointer oil level gauge reading process mainly includes the following steps:
[0067] Step 1: Determine the center of the dial.
[0068] In one embodiment of the present invention, scale information and pointer information are required to calculate the center of the dial. Through the dial segmentation module, the algorithm obtains the mask information of the pointer, scale, and digital area, and calculates the information of each connected domain in the scale area (center point, area size), and filters out noise areas with smaller areas based on the connected domain information; the algorithm is used to calculate the coordinates of the center points of all scale connected domains, and the least squares method is used to fit a circle passing through the center of each scale connected domain based on these coordinates.
[0069] And, in one embodiment of the present invention, when the dial is regular, the center of the fitting circle can be regarded as the center of the instrument dial;
[0070] When the dial is irregular, the center of the fitting circle cannot be regarded as the center of the instrument dial. It is also necessary to use the least squares method to fit the straight line where the pointer area is located, project the center of the fitting circle onto the straight line, and obtain the coordinates of the center of the dial.
[0071] Step 2: Calculate the pointer angle.
[0072] In one embodiment of the present invention, the pointer mask center can be calculated from the pointer mask information obtained by the dial segmentation module, that is, the pointer center coordinate (p x ,p y ), according to the coordinates of the center of the circle (c x ,c y ) and the deflection angle of the pointer center coordinates relative to the dial center coordinates, the pointer angle can be calculated:
[0073]
[0074] Step 3: Get the scale angle.
[0075] In one embodiment of the present invention, when calculating the center of the dial, the algorithm calculates the center coordinates of each connected domain of the scales, and the angle information of each connected domain of the scales can be calculated using formula (1). However, due to the occlusion, contamination, or lighting of the dial, the scale information obtained by segmentation may contain noise or be missing. Some noise scales have been filtered out according to the size of the connected domain. At this time, the remaining scale angle information is further processed to improve the robustness of the algorithm reading recognition.
[0076] Furthermore, in one embodiment of the present invention, the post-processing process of the scale angle information is as follows:
[0077] Step a: Sort the scale angle list to obtain an ordered list d = {d1, d2, d3, ... d n};
[0078] Step b: Calculate the median mid of the angle differences between adjacent scales in d g ;
[0079] Step c: Delete the adjacent angles in d whose difference is less than 0.7×mid g Scale of
[0080] Step d: For adjacent angles in step d with a difference greater than 1.8×mid g The scale is supplemented according to the difference.
[0081] The above process can effectively alleviate the noise or scale missing problem in the scale segmentation information.
[0082] Step 4: Calculate the reading.
[0083] In one embodiment of the present invention, after the above steps, the algorithm has obtained the pointer angle information and the scale angle information. At this time, it is only necessary to determine the dial division value f=1 (10 scales) or f=2 (5 scales) according to the number of scale angles, and the dial reading can be obtained according to the angle method. The pointer angle is p, and the angles of two adjacent scales are d. i ,d i+1 , then the oil level gauge reading is:
[0084]
[0085] In one embodiment of the present invention, when the category information of the instrument to be detected is a double-pointer thermometer, the coordinates of the center of the dial are determined according to the intersection of the straight lines fitted by the two pointers contained in the double-pointer thermometer; the pointer mask information is obtained from the dial and the pointer mask center is calculated, and the angles of the two pointers are calculated according to the center coordinates of the dial and the deflection angle of the pointer center coordinates relative to the center coordinates of the dial; the angle information of the digital area is calculated according to the center coordinates of the digital connected area; the digital area angle list is sorted to obtain an ordered list; the division value of the dial is determined according to the number of scale angles, and the dial reading is obtained according to the angle method.
[0086] Specifically, in one embodiment of the present invention, the dual-pointer temperature gauge reading process mainly includes the following steps:
[0087] Step 1: Calculate the center of the dial.
[0088] In one embodiment of the present invention, the dual-pointer thermometer contains two pointers. When calculating the center of a circle, it is only necessary to fit the straight line where the two pointers are located. The intersection of the straight lines can be the coordinates of the center of the dial (c x ,c y ).
[0089] Step 2: Calculate the pointer angle.
[0090] In one embodiment of the present invention, the calculation method is the same as that of the pointer type oil level gauge, and the angles p1 and p2 of the two pointers can be calculated.
[0091] Step 3: Calculate the digital area angle.
[0092] In one embodiment of the present invention, first, the information of each connected domain of the digital area (center point, area size) is calculated, and the connected domains with smaller areas (possibly noise) are filtered out. The center of the remaining connected domains of the digital area is the center coordinate of the digital area, and then the angle information of the digital area can be calculated. The obtained angle information is sorted to obtain the digital area angle list d.
[0093] Step 4: Calculate the reading.
[0094] It should be noted that, in one embodiment of the present invention, the calculation method of the dual-pointer temperature gauge is the same as that of the pointer-type oil level gauge, and the reading results of the two pointers can be calculated.
[0095] In one embodiment of the present invention, when the category information of the instrument to be detected is a pressure gauge and an electrical meter, the center coordinates of the dial are determined according to the key area information, the mask information corresponding to the key area information is obtained, the pointer angle of the dial is calculated according to the mask information, and the scale angle list and the digital area angle list are obtained; the dial is adjusted according to the scale angle list and the digital area angle list, the dial number is recognized based on the dial adjustment, and the dial reading is obtained according to the angle method based on the dial number recognition.
[0096] Specifically, in one embodiment of the present invention, the process of reading the pressure gauge and the electrical meter mainly includes the following steps:
[0097] Step 1: Calculate the center of the dial.
[0098] It should be noted that in one embodiment of the present invention, the calculation method of the pressure gauge and the electrical meter is the same as that of the pointer oil level gauge, and the coordinates of the center of the dial (c x ,c y ).
[0099] Step 2: Calculate the pointer angle.
[0100] It should be noted that, in one embodiment of the present invention, the calculation method is the same as that of the pointer type oil level gauge, and the pointer angle p can be calculated.
[0101] Step 3: Get the scale angle and digital area angle.
[0102] In one embodiment of the present invention, the calculation method is the same as that of the pointer type oil level gauge and the double pointer type oil level gauge, and the scale angle list d can be obtained. scale and a list of numeric area angles d number .
[0103] Step 4: Adjust the dial.
[0104] In one embodiment of the present invention, the reference information used in dial adjustment is the digital area. From the appearance of the instrument, it can be seen that the minimum scale number and the maximum scale number of the pointer instrument should be symmetrical along the vertical axis. Therefore, when calculating, according to the existing digital area angle list d number Sort them and then find the two adjacent scales with the largest angle difference d number-i ,d number-j , and calculate the mean of the two angles d′, then the rotation angle r of the dial can be calculated:
[0105] r=d′-270°
[0106] After the dial is adjusted, the digital area is also adjusted, which facilitates the segmentation of the digital area, the segmentation and recognition of characters in the digital recognition process.
[0107] Step 5: Identify the dial numbers.
[0108] In one embodiment of the present invention, when the dial digits are recognized, in order to reduce the amount of calculation, only the two digit regions closest to the pointer angle need to be recognized. When determining the angles corresponding to the two digit regions, the angle of the scale that is closer to the digit region and has a larger connected domain area is used as the angle of the digit region rather than the angle of the digit region itself, so as to solve the problem of angle deviation existing in noise or instrument manufacturing.
[0109] For a single digit segmented by an external rectangular frame, a filling operation must be performed first. The height and width of the rectangular frame are recorded as h and w respectively, and the size of the black border to be filled in the vertical and horizontal directions is h′ and w′ respectively, where h′ can be 5.
[0110]
[0111] Furthermore, in one embodiment of the present invention, the rectangular frame of the dial digital area may contain decimal points and noise, and their distribution is observed to formulate a scheme for distinguishing numbers, decimal points and noise. The specific scheme includes the following steps:
[0112] Step a: For a bounding box whose height exceeds half of the height of the rectangular box and whose center height is close to the center height of the rectangular box, it is regarded as a digital box;
[0113] Step b: In addition, any bounding box with smaller width and height and a center height lower than 1 / 3 of the height of the rectangular box is considered as a decimal point box;
[0114] Step c: The remaining bounding boxes are considered as noise boxes.
[0115] In subsequent calculations, only the number box and the decimal point box need to be considered. The result recognized by the printed number recognition network is a single number result. The result of the single number recognition needs to be combined with the recognized decimal point to finally obtain the value corresponding to the entire number area.
[0116] Step 6: Calculate the reading.
[0117] In one embodiment of the present invention, after the above steps, based on the pointer angle information and adjacent digital information, the dial reading can be obtained according to the angle method. The pointer angle is p, and the values and angles of the two adjacent digital areas are (n1, d i ),(n2,d i+1 ), the meter reading is:
[0118]
[0119] Based on the above description, for ease of understanding, Figure 2 A schematic diagram of a noise-robust multi-category dial pointer reading recognition solution provided by the present invention.
[0120] In summary, the present invention proposes a noise-robust multi-category dial pointer reading recognition method. According to the connected domain information, noise blocks with smaller areas are filtered out, and filtering rules based on the center position of the rectangular frame circumscribing the reference digital area are set to effectively distinguish decimal points from noise points; for the remaining scale angle information, the missing scales can be effectively estimated by acquiring adjacent scales, so as to improve the accuracy and robustness of the algorithm reading recognition.
[0121] Figure 3 A schematic structural diagram of a noise-robust multi-category dial pointer reading recognition device provided by an embodiment of the present invention.
[0122] like Figure 3 As shown, the noise-robust multi-category dial pointer reading recognition device includes the following modules:
[0123] An acquisition module is used to acquire image information of the instrument to be detected, and determine target position information and category information of the instrument to be detected based on the image information;
[0124] A segmentation module is used to segment the image information according to the target position information and extract key area information in the dial from the image information;
[0125] The determination module is used to determine a preset rule corresponding to the category information according to the category information, and obtain a dial pointer reading result according to the preset rule and the key area information.
[0126] In summary, the present invention proposes a noise-robust multi-category dial pointer reading recognition device, which can effectively identify dial categories and dial readings, thereby improving the effectiveness of the pointer reading recognition method for dial readings of various different shapes and specifications, and the adopted reading recognition algorithm has better robustness for dials of different specifications.
[0127] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0128] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0129] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.
[0130] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0131] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0132] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0133] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0134] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A noise-robust multi-category dial pointer reading recognition method, characterized in that: The following steps are involved: Acquire image information of the instrument to be detected, and determine target position information and category information of the instrument to be detected based on the image information; Segmenting the image information according to the target position information, and extracting key area information in the dial from the image information; Determine a preset rule corresponding to the category information according to the category information, and obtain a dial pointer reading result according to the preset rule and the key area information; wherein, The category information includes a pointer oil level gauge, and obtaining a dial pointer reading result according to the preset rule and the key area information includes: Determine the center coordinates of the dial according to the key area information, wherein the key area information includes scale information and pointer information, obtain the center coordinates of the scale connected area according to the scale information and the pointer information, fit a circle passing through the center of each scale connected area according to the center coordinates, when the dial is regular, use the center coordinates of the circle as the center coordinates of the dial, when the dial is irregular, fit a straight line where the pointer area is located, and project the center of the circle onto the straight line to obtain the center coordinates of the dial; Obtain mask information corresponding to the key area information, calculate the pointer angle of the dial according to the mask information; and obtain the scale angle according to the center coordinates of the dial.
2. The method according to claim 1, characterized in that The obtaining of mask information corresponding to the key area information, and calculating the pointer angle of the dial according to the mask information, includes: The coordinates of the center of the pointer mask are calculated according to the mask information, and the pointer angle of the dial is calculated according to the coordinates of the center of the dial and the coordinates of the center of the pointer mask.
3. The method according to claim 1, characterized in that Obtaining the scale angle according to the center coordinates of the dial includes: According to the center coordinates of each scale connected area, the scale angle information of each scale connected domain is calculated; Sorting the scale angle list to obtain an ordered list, wherein the scale angle list includes scale angle information of each scale connected domain; Calculate the median of the angle differences between adjacent scales in the ordered list; Deleting the scales in the ordered list whose adjacent angle differences and medians satisfy a first preset relationship; For scales in the ordered list whose adjacent angle differences and medians satisfy a second preset relationship, supplement the scales according to the differences; Determine the dial division value according to the number of scale angles, and obtain the dial reading according to the angle method.
4. A noise-robust multi-category dial pointer reading recognition method, characterized in that: The following steps are involved: Acquire image information of the instrument to be detected, and determine target position information and category information of the instrument to be detected based on the image information; Segmenting the image information according to the target position information, and extracting key area information in the dial from the image information; Determine a preset rule corresponding to the category information according to the category information, and obtain a dial pointer reading result according to the preset rule and the key area information; wherein, The category information includes a dual-pointer temperature meter, and obtaining a dial pointer reading result according to the preset rule and the key area information includes: Determine the coordinates of the center of the dial according to the intersection of the straight lines fitted by the two pointers contained in the dual-pointer thermometer; The pointer mask information is obtained from the dial and the pointer mask center is calculated. According to the center coordinates of the dial and the deflection angle of the pointer center coordinates relative to the center coordinates of the dial, the angles of the two pointers are calculated. Calculate the angle information of the digital area according to the center coordinates of the digital connected area; Sort the list of digital area angles to obtain an ordered list; Determine the dial division value according to the number of scale angles, and obtain the dial reading according to the angle method.
5. A noise-robust multi-category dial pointer reading recognition method, characterized in that: The following steps are involved: Acquire image information of the instrument to be detected, and determine target position information and category information of the instrument to be detected based on the image information; Segmenting the image information according to the target position information, and extracting key area information in the dial from the image information; Determining a preset rule corresponding to the category information according to the category information, and obtaining a dial pointer reading result according to the preset rule and the key area information; wherein the category information includes a pressure gauge or an electrical meter, and obtaining a dial pointer reading result according to the preset rule and the key area information includes: Determine the center coordinates of the dial according to the key area information; Obtaining mask information corresponding to the key area information, and calculating the pointer angle of the dial according to the mask information; Get the scale angle list and the digital area angle list; Adjust the dial according to the scale angle list and the digital area angle list; Identify dial numbers based on dial correction; Get the dial reading according to the angle method based on dial digital recognition.
6. A noise-robust multi-category dial pointer reading recognition device, characterized in that: include: An acquisition module is used to acquire image information of the instrument to be detected, and determine target position information and category information of the instrument to be detected based on the image information; A segmentation module, used to segment the image information according to the target position information, and extract key area information in the dial from the image information; A determination module is used to determine a preset rule corresponding to the category information according to the category information, and obtain a dial pointer reading result according to the preset rule and the key area information; wherein, The category information includes a pointer oil level gauge, and the determination module is further used for: Determine the center coordinates of the dial according to the key area information, wherein the key area information includes scale information and pointer information, obtain the center coordinates of the scale connected area according to the scale information and the pointer information, fit a circle passing through the center of each scale connected area according to the center coordinates, when the dial is regular, use the center coordinates of the circle as the center coordinates of the dial, when the dial is irregular, fit a straight line where the pointer area is located, and project the center of the circle onto the straight line to obtain the center coordinates of the dial; Obtaining mask information corresponding to the key area information, and calculating the pointer angle of the dial according to the mask information; The scale angle is obtained according to the coordinates of the center of the dial.
7. A noise-robust multi-category dial pointer reading recognition device, characterized in that: include: An acquisition module is used to acquire image information of the instrument to be detected, and determine target position information and category information of the instrument to be detected based on the image information; A segmentation module, used to segment the image information according to the target position information, and extract key area information in the dial from the image information; A determination module is used to determine a preset rule corresponding to the category information according to the category information, and obtain a dial pointer reading result according to the preset rule and the key area information; wherein, The category information includes a dual-pointer temperature gauge, and the determination module is further used for: Determine the coordinates of the center of the dial according to the intersection of the straight lines fitted by the two pointers contained in the dual-pointer thermometer; The pointer mask information is obtained from the dial and the pointer mask center is calculated. According to the center coordinates of the dial and the deflection angle of the pointer center coordinates relative to the center coordinates of the dial, the angles of the two pointers are calculated. Calculate the angle information of the digital area according to the center coordinates of the digital connected area; Sort the list of digital area angles to obtain an ordered list; Determine the dial division value according to the number of scale angles, and obtain the dial reading according to the angle method.
8. A noise-robust multi-category dial pointer reading recognition device, characterized in that: include: An acquisition module is used to acquire image information of the instrument to be detected, and determine target position information and category information of the instrument to be detected based on the image information; A segmentation module, used to segment the image information according to the target position information, and extract key area information in the dial from the image information; A determination module is used to determine a preset rule corresponding to the category information according to the category information, and obtain a dial pointer reading result according to the preset rule and the key area information; wherein, The category information includes a pressure gauge or an electrical gauge, and the determination module is further used for: Determine the center coordinates of the dial according to the key area information; Obtaining mask information corresponding to the key area information, and calculating the pointer angle of the dial according to the mask information; Get the scale angle list and the digital area angle list; Adjust the dial according to the scale angle list and the digital area angle list; Identify dial numbers based on dial correction; Get the dial reading according to the angle method based on dial digital recognition.
9. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented, or the method according to claim 4, or the method according to claim 5.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented, or the method according to claim 4, or the method according to claim 5.
Citation Information
Patent Citations
Pointer type instrument reading identification method based on deep learning
CN110659636A
Pointer instrument reading identification method
CN114037824A