Degree detection method and system based on pressure gauge shielding
By occlusion processing and segmentation of the original image of the pressure gauge, merging the dial area, and fitting the center of the circle and the pointer direction, the problem of inaccurate scale recognition under occlusion or reflection is solved, and high-precision scale recognition is achieved.
Patent Information
- Application Number
- CN202511762842.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-03-06
Smart Images

Figure CN121617077A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically to a method and system for detecting degrees based on pressure gauge obstruction within the field of data processing technology. Background Technology
[0002] In related technologies, the scale readings of circular pointer-type pressure gauges are read using a scale segmentation and recognition method. The principle of scale segmentation and recognition is to divide the circular pointer's scale into segments. Scale segmentation and recognition requires very high image clarity; therefore, when the circular pointer-type pressure gauge is obstructed or reflects light, the readings are difficult to read, resulting in inaccurate accuracy. Summary of the Invention
[0003] The purpose of this invention is to provide a method and system for detecting pressure readings based on pressure gauge obstruction. The specific technical solution adopted is as follows: In a first aspect, embodiments of the present invention provide a method for detecting degrees based on pressure gauge obstruction, the method comprising: The original image of the pressure gauge is masked to obtain a processed image; The processed image is segmented by dial scale and pointer to obtain the first segmentation result; The first segmentation result is fused into multiple dial regions to obtain a fused dial region. By fitting the center of the fused dial area, the center position of the pressure gauge is obtained. The pointer direction is obtained by fitting a pointer line to the first segmentation result; The scale readings of the pressure gauge are determined based on the pointer direction and the center position.
[0004] Secondly, a pressure gauge obstruction-based degree detection system is provided, the system comprising: The occlusion module is used to occlude the original image of the pressure gauge to obtain a processed image; The segmentation module is used to segment the processed image into dial scales and pointers to obtain a first segmentation result; The fusion module is used to perform fusion processing on the first segmentation result for multiple dial regions to obtain a fused dial region. The center-fitting module is used to fit the center of the fused dial area to obtain the center position of the pressure gauge. The line fitting module is used to perform pointer line fitting on the first segmentation result to obtain the pointer direction; The determination module is used to determine the scale reading of the pressure gauge based on the pointer direction and the center position.
[0005] Thirdly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in the first aspect or any possible implementation thereof.
[0006] Fourthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0007] This invention offers the following advantages: By occluding the original image of the pressure gauge, a processed image is obtained. This processed image is then segmented into dial scales and pointers to obtain a first segmentation result. This image segmentation improves the performance of the segmentation model, leading to higher accuracy in the first segmentation result. Next, the first segmentation result is fused from multiple dial areas to obtain a fused dial area, which more closely resembles the actual dial area. This fused dial area is then fitted with a circle center to obtain a more precise center position. Finally, the first segmentation result is fitted with a pointer line to obtain the pointer direction. Based on the pointer direction and the center position, the pressure gauge's scale readings are determined. Thus, by fusing multiple dial areas to obtain a fused dial area, fitting the center of the fused dial area to obtain the center position, and combining this with line fitting to obtain the pointer direction, the pressure gauge's scale readings can be identified more accurately. In this way, even if the pressure gauge is obscured or reflects light, the scale readings of the pressure gauge can still be identified with high accuracy. Attached Figure Description
[0008] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a schematic diagram of the identification results of the obstructed pressure gauge provided in the related technology; Figure 2 This is a schematic diagram of the key results of the occlusion pressure gauge provided in the related technology; Figure 3 This is a schematic diagram illustrating the implementation process of a pressure gauge obstruction-based degree detection method provided in an embodiment of the present invention; Figure 4This is a schematic diagram illustrating an application scenario of a pressure gauge obstruction-based degree detection method provided in an embodiment of the present invention. Figure 5 This is a schematic diagram of another application scenario of a pressure gauge obstruction-based degree detection method provided in an embodiment of the present invention; Figure 6 This is a schematic diagram illustrating another application scenario of the pressure gauge obstruction-based degree detection method provided in this embodiment of the invention; Figure 7 This is a schematic diagram illustrating another application scenario of the pressure gauge obstruction-based degree detection method provided in this embodiment of the invention; Figure 8 This is a schematic diagram of another application scenario of a pressure gauge obstruction-based degree detection method provided in an embodiment of the present invention; Figure 9 This is a schematic diagram illustrating another application scenario of the pressure gauge obstruction-based degree detection method provided in this embodiment of the invention; Figure 10 This is a schematic diagram of another application scenario of a pressure gauge obstruction-based degree detection method provided in an embodiment of the present invention; Figure 11 This is a schematic diagram illustrating another application scenario of the pressure gauge obstruction-based degree detection method provided in this embodiment of the invention; Figure 12 This is a schematic diagram of another application scenario of a pressure gauge obstruction-based degree detection method provided in an embodiment of the present invention; Figure 13 This is a schematic diagram illustrating another application scenario of the pressure gauge obstruction-based degree detection method provided in this embodiment of the invention; Figure 14 This is a schematic diagram of another application scenario of a pressure gauge obstruction-based degree detection method provided in an embodiment of the present invention; Figure 15 This is a schematic diagram of another application scenario of a pressure gauge obstruction-based degree detection method provided in an embodiment of the present invention; Figure 16 This is a schematic diagram of another application scenario of a pressure gauge obstruction-based degree detection method provided in an embodiment of the present invention; Figure 17 This is a schematic diagram of the composition structure of a pressure gauge obstruction-based degree detection system provided in an embodiment of the present invention; Figure 18 This is a schematic diagram of the structure of a computer block device provided in an embodiment of the present invention. Detailed Implementation
[0010] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a pressure gauge obstruction-based degree detection method proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments may be combined from any suitable form.
[0011] In the description of the embodiments of the present invention, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present invention, "multiple" means two or more.
[0012] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0013] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0014] In some embodiments, when using dial segmentation recognition, because the dial of the circular pointer needs to be segmented, dial recognition requires very high image clarity. Therefore, when performing dial segmentation recognition on pressure gauge images with non-destructive occlusion, the resulting recognition result is as follows: Figure 1 As shown, the pointer and scale cannot be accurately identified, thus making it impossible to accurately determine the readings on the pressure gauge.
[0015] In some embodiments, key points are used to identify the four points A, B, O, and O1 of the pressure gauge pointer (e.g., ...). Figure 2 As shown in the diagram, the pointer's position is calculated using the included angle, and the pointer's degree can be determined. If the key points are offset (for example, the four points above are slightly offset), the angle calculation will have a deviation of several degrees, resulting in less accurate precision. While the dial is unaffected by points AB being obscured, the key point method essentially fails when points O and O1 are obscured or obscured by reflections.
[0016] Based on this, embodiments of the present invention provide a method for detecting degrees based on pressure gauge obstruction. The specific scheme of this method for detecting degrees based on pressure gauge obstruction is described in detail below with reference to the accompanying drawings. Please refer to... Figure 3 The diagram illustrates a flow chart of a pressure gauge obstruction-based degree detection method according to an embodiment of the present invention. This method can be implemented through the following steps: 301. The original image of the pressure gauge is masked to obtain a processed image.
[0017] Here, the original image of the pressure gauge can be understood as a clear image of the pressure gauge. By processing this original image through methods such as occlusion, soiling, or reflection, a processed image is obtained. For example, for a circular pointer pressure gauge, some samples are artificially occluded and reflected in the data. Labeling proceeds normally, allowing the model to achieve normal segmentation even with occlusion, using segmentation to separate the dial markings and pointer. The original image of the pressure gauge is as follows: Figure 4 As shown, the processed image is as follows Figure 5 As shown.
[0018] 302, Perform dial scale and pointer segmentation on the processed image to obtain the first segmentation result.
[0019] Here, the dial and pointer corresponding to the processed image are segmented to obtain the segmented dial and pointer, i.e., the first segmentation result; where the segmented dial is as follows: Figure 6 As shown, the split pointers are as follows Figure 7 As shown. The final segmentation result is as follows. Figure 8 As shown.
[0020] 303. Perform a fusion process on the first segmentation result for multiple dial regions to obtain a fused dial region.
[0021] Here, since the processed image was obtained through occlusion processing, the dial is divided into at least two dial regions in the processed image. The multiple dial regions in the first segmentation result are then merged, stitching the multiple fragmented dial regions together into a single region, i.e., the merged region.
[0022] In some possible implementations, step 303 above can be achieved through the following steps 331 to 333 (not shown in the figures): 331. In the first segmentation result, different dial areas are determined.
[0023] Here, multiple dial areas are obtained from the first segmentation result. These different dial areas include: a first area and a second area; as shown... Figure 9As shown, the first region is region 901, and the second region is region 902. Each region is composed of multiple points, as shown... Figure 9 As shown, the points appear sparse, but in reality they are quite dense. Figure 9 In the middle, there are two divided areas, one on the left and one on the right. Of course, due to multiple occlusions, there may be more than two divided areas.
[0024] 332, at least two selection points are determined at different locations in the different dial areas.
[0025] Here, at least two selection points are selected at different locations in each dial area. The at least two selection points in the first area include: a first point and a second point, such as... Figure 10 Points A and B in the first region; at least two selected points in the second region, including: point three and point four, such as... Figure 10 Points C and D in the diagram.
[0026] 333, make a one-way connection between at least two selected points of the different dial areas to form the merged dial area.
[0027] Here, multiple selection points are connected in a unidirectional manner to form a unidirectional area, i.e., the merged dial area. In some possible implementations, firstly, the coordinate system to which the first and second areas belong is determined, for example, the vertical coordinates of the first and second areas are determined, thereby determining the vertical relationship between the first and second points, and between the third and fourth points, within this coordinate system; then, based on the vertical relationship between the first and second points, and between the third and fourth points, the first, second, third, and fourth points are connected to form a single area; and this single area is defined as the merged dial area. Figure 10 As shown, select two points A and B at arbitrary positions on both the left and right sides, and points C and D on the right. The y-axis value needs to be clearly defined to distinguish the upper and lower points. After selecting these points, the area starting from point A is no longer connected to point B, but instead connected to point C on the right. Then, it circles around the edge of the right area and returns to point D. Point D connects to point B, and point B circles around the edge of the left area and returns to point A. This forms one area. After this operation, the two areas become one, i.e., the dial area is merged.
[0028] 304. Perform a circle center fitting on the fused dial area to obtain the center position of the pressure gauge.
[0029] Here, by fitting the center of the single area formed by splicing, the center position of the pressure gauge can be obtained more accurately.
[0030] In some possible implementations, a second segmentation result is obtained by segmenting the dial scale and pointer of the original image, i.e., obtaining the segmentation data of the dial scale and pointer in the original image. Then, the center position of the pressure gauge is obtained by fitting a circle to the fused dial region using the segmentation data of the dial scale and pointer from the second segmentation result. For example, the center position of the pressure gauge is then fitted to the fused dial region using the ellipse fitting formula of OpenCV's cv2.fitEllipse; wherein, the segmentation data of the occluded dial is as follows... Figure 11 As shown, the fitting result for the obscured dial is as follows: Figure 12 As shown.
[0031] In other embodiments, the fused region can be corrected based on the dial area in the second segmentation result to obtain a corrected region; and a preset ellipse fitting formula can be used to fit the center of the corrected region to obtain the center position of the pressure gauge. For example, the edge of the fused region can be optimized using the dial area in the second segmentation result to obtain the corrected region. The preset ellipse fitting formula can be the ellipse fitting formula of OpenCV's cv2.fitEllipse. Alternatively, the center of the corrected region can be fitted using circular fitting to obtain the center position of the pressure gauge. In this way, by stitching together multiple dial areas, correcting the fused region using the dial area in the second segmentation result, and finally fitting the center of the corrected region, the center position of the pressure gauge can be accurately fitted.
[0032] 305. Perform pointer line fitting on the first segmentation result to obtain the pointer direction.
[0033] Here, candidate pointer segmentation points are obtained by fusing multiple pointer segmentation points from the first segmentation result with multiple pointer segmentation points from the second segmentation result. In other words, multiple pointer segmentation points from the second segmentation result are used to optimize the multiple pointer segmentation points from the first segmentation result, resulting in multiple candidate pointer segmentation points. For example, outliers in the multiple pointer segmentation points from the first segmentation result can be removed using the multiple pointer segmentation points from the second segmentation result, or pointer segmentation points can be added to the multiple pointer segmentation points from the first segmentation result, thereby improving the accuracy of the first segmentation result and enhancing the performance of the segmentation model. Thus, after the segmentation model is trained, even if the image of the pressure gauge is occluded or reflected, it can still accurately segment the dial and pointer of the pressure gauge to be detected.
[0034] After obtaining multiple candidate pointer segmentation points, a straight line is fitted to these points to obtain the pointer direction. For example, using the segmented pointer data and OpenCV's cv2.fitLine straight line fitting formula, the pointer direction can be accurately determined. Considering the possibility of broken pointer segments or short pointers, elliptical or rectangular methods are unsuitable; a straight line method is the most appropriate. After straight line fitting, the pointer vector direction can be obtained. The segmentation data before fitting is as follows: Figure 13 As shown, the pointer direction after fitting is as follows: Figure 14 As shown.
[0035] 306. Based on the pointer direction and the center position, determine the scale reading of the pressure gauge.
[0036] Here, the key points on the pressure gauge dial are determined by the pointer direction and the center position, and then the scale readings of the pressure gauge are identified by the key points on the dial.
[0037] In some possible implementations, step 306 above can be achieved through steps 361 and 362 (not shown in the figure): 361. Based on the pointer direction and the center position, determine the key points of the pressure gauge dial.
[0038] Here, the dial division points of the pressure gauge are determined based on the first segmentation result, thus obtaining multiple dial division points. Then, based on the center position, a first vertically downward vector is determined; for example, starting from the center, a first vertically downward vector is determined. Next, based on the center position and the dial division points, a second vector is determined; starting from the center, along the direction of each dial division point, multiple second vectors are obtained. Finally, the angle between the first and second vectors is determined, resulting in an angle set; and in this angle set, the dial division point corresponding to the negative vector with the largest angle is determined as the dial division starting point, and the dial division point corresponding to the positive vector with the smallest angle is determined as the dial division ending point. For example... Figure 15 As shown, in Figure 15 There are four key points: A, B, O, and O1. These points can be represented by the center point O(x1, y1) and the data points 1 divided by the dial. Points1 consists of multiple points P(x2, y2). The vector from point O to any point on the dial is the angle between all OP vectors and the vertical downward vector. The largest negative vector corresponds to point A, and the smallest positive vector corresponds to point B. (The directions of the positive and negative vectors are as follows...) Figure 16 (As shown).
[0039] 362. Based on the key points of the dial, determine the scale readings of the pressure gauge.
[0040] Here, the first included angle is determined based on the starting point of the dial scale, the center position, and the direction of the pointer in the key points of the dial; for example, the center position is taken as the vertex of the first included angle, and the sides from the center position to the starting point of the dial scale and the direction of the pointer are taken as the two sides of the angle, thus forming the first included angle. Figure 16 The angle ∠AOO1 is then determined based on the starting point, ending point, and center position of the dial scale in the key points of the dial. For example, the center position is taken as the vertex of the second included angle, and the sides from the center position to the starting and ending points of the dial scale are taken as the two sides of the angle, thus forming the second included angle. Figure 16 The angle ∠AOB is mentioned. The scale readings of the pressure gauge are determined based on the ratio between the first and second included angles and the maximum and minimum values of the pressure gauge. Since the maximum and minimum values of the pressure gauge are known, the scale readings of the pressure gauge can be accurately calculated using the ratio between the first and second included angles and the maximum and minimum values of the pressure gauge.
[0041] In this embodiment of the invention, the original image of the pressure gauge is occluded to obtain a processed image. The processed image is then segmented into dial scales and pointers to obtain a first segmentation result. This segmentation of the processed image improves the performance of the segmentation model, resulting in a more accurate first segmentation result. Next, the first segmentation result is fused from multiple dial areas to obtain a fused dial area. This fused dial area more closely resembles the actual dial area, allowing for precise center fitting to the fused dial area. Finally, the first segmentation result is fitted with a pointer line to obtain the pointer direction. Based on the pointer direction and the center position, the pressure gauge's scale readings are determined. Thus, by fusing multiple dial areas to obtain a fused dial area, fitting the center of the fused dial area to obtain the center position, and combining this with line fitting to obtain the pointer direction, the pressure gauge's scale readings can be identified more accurately. This ensures that even when the pressure gauge is occluded or reflects light, the scale readings can still be identified with high accuracy.
[0042] This invention provides a pressure gauge obstruction-based degree detection system. Please refer to [link / reference]. Figure 17 The system 1700 includes: The occlusion module 1701 is used to occlude the original image of the pressure gauge to obtain a processed image; Segmentation module 1702 is used to segment the processed image into dial scale and pointer segments to obtain a first segmentation result; The fusion module 1703 is used to perform fusion processing on the first segmentation result of multiple dial regions to obtain a fused dial region. The center fitting module 1704 is used to perform center fitting on the fused dial area to obtain the center position of the pressure gauge. The line fitting module 1705 is used to perform pointer line fitting on the first segmentation result to obtain the pointer direction; The determining module 1706 is used to determine the scale reading of the pressure gauge based on the pointer direction and the center position.
[0043] In some possible implementations, the determining module 1706 is further configured to determine key points on the dial of the pressure gauge based on the pointer direction and the center position; and to determine the scale readings of the pressure gauge based on the key points on the dial.
[0044] In some possible implementations, the determining module 1706 is further configured to: determine the dial division scale points of the pressure gauge based on the first division result; determine a first vertically downward vector based on the center position; determine a second vector based on the center position and the dial division scale points; determine the angle between the first vector and the second vector to obtain an angle set; and in the angle set, determine the dial division scale point corresponding to the negative vector with the largest angle as the dial scale starting point, and determine the dial division scale point corresponding to the positive vector with the smallest angle as the dial scale ending point.
[0045] In some possible implementations, the determining module 1706 is further configured to determine a first included angle based on the starting point of the dial scale, the center position, and the pointer direction in the key points of the dial; determine a second included angle based on the starting point of the dial scale, the ending point, and the center position in the key points of the dial; and determine the scale number of the pressure gauge based on the ratio between the first included angle and the second included angle and the maximum and minimum values of the pressure gauge.
[0046] In some possible implementations, the fusion module 1703 is further configured to: determine different dial areas in the first segmentation result; determine at least two selection points at different positions in the different dial areas; and unidirectionally connect the at least two selection points of the different dial areas to form the fused dial area.
[0047] In some possible implementations, the different dial areas include: a first area and a second area; at least two selection points in the first area include: a first point and a second point; at least two selection points in the second area include: a third point and a fourth point; the fusion module 1703 is further configured to determine the coordinate system to which the first area and the second area belong; in the coordinate system, determine the vertical relationship between the first point and the second point, and the vertical relationship between the third point and the fourth point; based on the vertical relationship between the first point and the second point, and the vertical relationship between the third point and the fourth point, connect the first point, the second point, the third point, and the fourth point to form a single area; and determine the single area as the fused dial area.
[0048] In some possible implementations, the center fitting module 1704 is further used to perform dial scale and pointer segmentation on the original image to obtain a second segmentation result; and to perform center fitting on the fused dial area based on the second segmentation result to obtain the center position of the pressure gauge.
[0049] In some possible implementations, the center fitting module 1704 is further configured to correct the fused region based on the dial area in the second segmentation result to obtain a corrected region; and to perform center fitting on the corrected region using a preset ellipse fitting formula to obtain the center position of the pressure gauge.
[0050] In some possible implementations, the line fitting module 1705 is further configured to obtain multiple pointer segmentation points in the first segmentation result and multiple pointer segmentation points in the second segmentation result; fuse the multiple pointer segmentation points in the first segmentation result and multiple pointer segmentation points in the second segmentation result to obtain candidate pointer segmentation points; and perform line fitting on the candidate pointer segmentation points to obtain the pointer direction.
[0051] Optionally, the transmission medium can be a wired link (e.g., but not limited to, coaxial cable, optical fiber, and Digital Subscriber Line (DSL)) or a wireless link (e.g., but not limited to, Wireless Fidelity (WIFI), Bluetooth, and mobile block device networks). It should be noted that the control block device provided in the above embodiments is only an example illustrating the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer block device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the method embodiments provided in the above embodiments belong to the same concept, and their specific implementation processes are detailed in the method embodiments, and will not be repeated here.
[0052] Figure 18 This is a schematic diagram of the structure of a computer block device provided in an embodiment of the present invention. For example, as shown... Figure 18 As shown, the computer block device 1800 includes: a memory 1801, a processor 1802, and a computer program 1803 stored in the memory 1801 and running on the processor 1802, wherein when the processor 1802 executes the computer program 1803, the computer block device can execute any of the aforementioned pressure gauge obstruction-based degree detection methods.
[0053] Furthermore, embodiments of the present invention also protect a control block device, which may include a memory and a processor. The memory stores executable program code, and the processor is used to call and execute the executable program code to perform a pressure gauge occlusion-based degree detection method provided by the embodiments of the present invention. Embodiments of the present invention can divide the control block device into functional modules according to the above method examples. For example, each module may correspond to a specific function, or two or more functions may be integrated into a processing module. The integrated module can be implemented in hardware. It should be noted that the module division in the embodiments of the present invention is illustrative and only represents a logical functional division; in actual implementation, there may be other division methods. It should be noted that all relevant content of each step involved in the above method embodiments can be referenced to the functional description of the corresponding functional module, and will not be repeated here. It should be understood that the control block device provided by the embodiments of the present invention is used to execute the above-mentioned pressure gauge occlusion-based degree detection method, and therefore can achieve the same effect as the above-mentioned implementation method. When using integrated units, the control block device may include a processing module and a storage module. When the control block device is applied to a block device, the processing module can be used to control and manage the actions of the block device. The storage module can be used to support block devices in executing mutual program code, etc. The processing module can be a processor or controller, which can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. The processor can also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of Digital Signal Processing (DSP) and microprocessors, etc., and the storage module can be a memory.
[0054] Furthermore, the control block device provided in the embodiments of the present invention may specifically be a chip, component, or module. The chip may include a connected processor and a memory; wherein, the memory is used to store instructions, and when the processor calls and executes the instructions, it can cause the chip to execute the degree detection method based on pressure gauge obstruction provided in the above embodiments. The embodiments of the present invention also provide a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, it causes the computer to execute the aforementioned method steps to implement the degree detection method based on pressure gauge obstruction provided in the above embodiments.
[0055] This invention also provides a computer program product. When the computer program product is run on a computer, it causes the computer to execute the aforementioned related steps to achieve the degree detection method based on pressure gauge obstruction provided in the above embodiments. The control block device, computer-readable storage medium, computer program product, or chip provided in this invention are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here. Through the description of the above embodiments, those skilled in the art can understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the control block device can be divided into different functional modules to complete all or part of the functions described above. In the embodiments provided by this invention, it should be understood that the disclosed control block device and method can be implemented in other ways. For example, the control block device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another control block device, 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, control block device or unit, and can be electrical, mechanical or other forms.
[0056] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multiple task processing and parallel processing are possible or may be advantageous. The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. The above content is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be covered within the protection scope of the present invention.
Claims
1. A pressure gauge cover-based degree detection method, characterized by, The method comprises: The original image of the pressure gauge is shielded to obtain a processed image; The dial scale and pointer of the processed image are segmented to obtain a first segmentation result; The first segmentation result is fused to obtain a fused dial region; The center of the circle is fitted to obtain the center position of the pressure gauge; The first segmentation result is fitted to obtain the direction of the pointer; Based on the direction of the pointer and the center position, the scale number of the pressure gauge is determined.
2. The system of claim 1, wherein, Based on the direction of the pointer and the center position, the scale number of the pressure gauge is determined. Based on the direction of the pointer and the center position, the scale number of the pressure gauge is determined. Based on the first segmentation result, the dial segmentation scale point of the pressure gauge is determined; 3. The system of claim 2, wherein, Based on the center position, a first vector is determined; Based on the center position and the dial segmentation scale point, a second vector is determined; The angle between the first vector and the second vector is determined to obtain an angle set; In the angle set, the dial segmentation scale point corresponding to the negative vector with the largest angle is determined as the starting point of the dial scale, and the dial segmentation scale point corresponding to the positive vector with the smallest angle is determined as the end point of the dial scale. Based on the dial scale starting point, the center position and the direction of the pointer in the dial key point, a first included angle is determined; Based on the dial scale starting point, the dial scale end point and the center position in the dial key point, a second included angle is determined; 4. The system of claim 2, wherein, Based on the ratio between the first included angle and the second included angle and the maximum value of the pressure gauge, the scale number of the pressure gauge is determined. The first segmentation result is fused to obtain a fused dial region, comprising: In the first segmentation result, different dial regions are determined; At least two selection points are respectively determined at different positions of the different dial regions; 5. The system of claim 1, wherein, The at least two selection points of the different dial regions are connected in one direction to form the fused dial region. The different dial regions comprise a first region and a second region; the at least two selection points of the first region comprise a first point and a second point; the at least two selection points of the second region comprise a third point and a fourth point; The at least two selection points of the different dial regions are connected in one direction to form the fused dial region, comprising: The coordinate system to which the first region and the second region belong is determined; 6. The system of claim 5, wherein, In the coordinate system, the up-down relationship between the first point and the second point, and the up-down relationship between the third point and the fourth point are determined; Based on the up-down relationship between the first point and the second point, and the up-down relationship between the third point and the fourth point, the first point, the second point, the third point and the fourth point are connected to form a single region; The single region is determined as the fused dial region.
7. The system of claim 1, wherein, The center fitting on the fused dial region obtains the center position of the pressure gauge, and comprises: The original image is subjected to dial scale and pointer segmentation to obtain a second segmentation result. The center fitting on the fused dial region based on the second segmentation result obtains the center position of the pressure gauge.
8. The system of claim 7, wherein, The center fitting on the fused dial region based on the second segmentation result obtains the center position of the pressure gauge, and comprises: The fused region is corrected based on the dial region in the second segmentation result to obtain a corrected region. An elliptical fitting formula is used to fit the center of the corrected region to obtain the center position of the pressure gauge.
9. The system of claim 1, wherein, The pointer straight line fitting on the first segmentation result obtains a pointer direction, and comprises: A plurality of pointer segmentation points in the first segmentation result and a plurality of pointer segmentation points in the second segmentation result are obtained. The plurality of pointer segmentation points in the first segmentation result and the plurality of pointer segmentation points in the second segmentation result are fused to obtain candidate pointer segmentation points. The candidate pointer segmentation points are subjected to straight line fitting to obtain the pointer direction.
10. A pressure gauge cover based degree detection system, characterized in that, The system comprises: An occlusion module for performing occlusion processing on an original image of a pressure gauge to obtain a processed image; A segmentation module for performing dial scale and pointer segmentation on the processed image to obtain a first segmentation result; A fusion module for performing fusion processing on the first segmentation result to obtain a fused dial region; A center fitting module for fitting the center of the fused dial region to obtain the center position of the pressure gauge; A straight line fitting module for fitting the straight line of the pointer in the first segmentation result to obtain a pointer direction; A determination module for determining the scale number of the pressure gauge based on the pointer direction and the center position.