Valve position autonomous acquisition and identification system and method based on computer vision
By using computer vision technology, accurate valve position identification was achieved under high and low temperature, high pressure and vibration environments. This solved the problems of low reliability of sensor anti-interference and status identification, realized second-level inspection and rapid fault location, and improved the safety and accuracy of aero-engine testing.
Patent Information
- Application Number
- CN202511171706.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-11-25
AI Technical Summary
Existing technologies have insufficient anti-interference capabilities and low reliability of valve position sensors under high and low temperature, high pressure and vibration environments, resulting in large valve condition detection errors and affecting the safety and accuracy of aero-engine testing.
A computer vision-based valve position autonomous acquisition and recognition system is adopted, including a field acquisition module, a computer room processing module, and a remote processing module. It acquires image data through a high-definition camera, and combines image preprocessing, positioning recognition, and valve position comparison analysis to achieve accurate measurement and real-time comparison of valve position and trigger safety warnings.
It enables precise identification and second-level inspection of valve positions in harsh environments, reduces fault location time, improves detection accuracy and safety, and reduces the time cost of manual inspection.
Smart Images

Figure CN121012907A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of aero-engine test and computer vision and industrial automation control, and particularly relates to a valve position autonomous acquisition and identification system and method based on computer vision, which is suitable for aero-engine test. BACKGROUND
[0002] In aero-engine test, the key boundary valve is the core executive component of the environmental simulation system, and its valve position state directly determines the pressure, temperature and flow accuracy of the test cabin. The existing technology mainly monitors the valve opening degree in real time through a valve position sensor, and relies on manual inspection or a distributed data acquisition system to realize state identification. However, such technology has significant defects in harsh working conditions of high and low temperature (-55℃ to 550℃), high pressure (35MPa level fuel environment) and wide frequency vibration (20-2000Hz): First, the sensor anti-interference ability is insufficient. The magnetic permeability of the core material of the traditional sensor will decay in a high temperature environment, resulting in output signal drift out of tolerance, and the Hall sensor will also have errors under strong electromagnetic interference; Second, the state identification reliability is low. Although the existing distributed acquisition system can synchronize thousands of measuring points, it does not design a special diagnostic algorithm for valve position signals, and only threshold alarm cannot distinguish between real faults and transient disturbances, which will interfere with detection. SUMMARY
[0003] The present application aims to provide a valve position autonomous acquisition and identification system and method based on computer vision to solve the problem that the use environment of the key boundary valve in the prior art is relatively harsh, and the valve position sensor is prone to damage in high temperature, low temperature, high pressure and vibration environments. If this damage is not discovered and handled in time, it not only affects the normal operation of the test, but also may cause safety hazards.
[0004] The present application is realized by the following scheme: A valve position autonomous acquisition and identification system based on computer vision, comprising a field acquisition module, a computer room processing module and a remote processing module; the field acquisition module comprises a camera acquisition module and a PLC acquisition module, the camera acquisition module comprises an identification mark arranged on a valve body and a camera, the camera acquires image data of the valve body disc, and the PLC acquisition module is used for acquiring valve position feedback data on the valve body; the computer room processing module is provided with a processing unit for processing the image data of the valve body disc and the valve position feedback data; and the remote processing module displays, queries or processes according to the comparison result value of the processing unit.
[0005] Based on the above one kind based on computer vision's valve valve position autonomous acquisition identification system, the machine room processing module includes streaming media service module, image preprocessing module, image positioning identification module, data acquisition gateway module, valve position contrast analysis module, valve position alarm processing module and data storage module; The streaming media service module is used for providing video transmission. The image preprocessing module is used for processing image data. The image positioning identification module is used for positioning the valve disc of the preprocessed image. The data acquisition gateway module is used for data analysis and data transmission. The valve position contrast analysis module is used for comparing and analyzing the valve position identification value and the valve position acquisition value. The valve position alarm processing module is used for storing alarm information, and the alarm information is pushed to the front-end interface in the form of broadcast.
[0006] Based on the above one kind based on computer vision's valve valve position autonomous acquisition identification system, the remote processing module includes a valve identification picture display module, an automatic pop-up window display module, an alarm voice reminding module, an emergency processing module and an alarm record query module. The valve identification picture display module is used for playing and displaying the real-time processing process picture of valve identification. The alarm automatic pop-up window display module is used for displaying the alarm information and the real-time identification picture in the form of pop-up window on the client interface after the client receives the valve alarm message from the server. The alarm voice reminding module is used for playing the alarm information in the form of voice on the client after the client receives the valve alarm message from the server. The emergency processing module is used for emergency processing and recording the processing results. The alarm record query module is used for querying the historical alarm records.
[0007] The scheme also discloses a computer vision-based valve valve position autonomous identification method, which comprises the following steps: Step 1: streaming extraction, image data extraction; Step 2: valve image preprocessing; Step 3: positioning the center and radius of the valve disc; Step 4: positioning the fully open and fully closed positions of the valve disc; Step 5: positioning the valve disc pointer; Step 6: valve position identification value calculation, through the determined fully closed and fully open positions, the proportional relationship between the angle and the range is used for calculation; Step 7: identification data superposition and push stream display, the data is superposed on the original valve image and pushed to the streaming media service module. Step 8: Collect valve position sensor data; Step 9: Valve position contrast analysis, absolute value contrast analysis of valve position identification value and valve position collection value, if it exceeds the preset condition, alarm processing is carried out; Step 10: Valve alarm processing, store alarm information, and push alarm information to the front-end interface in the form of broadcast; Step 11: Valve alarm prompt, after the client receives the valve alarm message from the server, the client interface will automatically display the alarm information and real-time identification picture in the form of pop-up window, and automatically play the alarm information in the form of voice to remind the operator to handle the fault; Step 12: Emergency treatment, the operator manually confirms the valve alarm information, selects whether it is a false alarm or a real fault has occurred, if the valve has really alarmed, the operator performs emergency treatment and records the treatment result.
[0008] In step 2, the valve image preprocessing includes scaling and transformation, graying, denoising and smoothing, dilation and corrosion; In step 3, positioning is performed by recognizing the circular positioning mark installed on the valve; In step 4, positioning is performed by recognizing the positioning mark installed on the valve; In step 5, positioning is performed by recognizing the pointer type positioning mark installed on the valve; The preset condition is: a threshold value is set, if it exceeds the threshold value, and the threshold value is triggered for three consecutive scanning periods, a first level alarm is triggered, if it is not restored within 10 seconds, it is upgraded to a second level alarm and PLC interlocking protection is started, then alarm processing is carried out; the calculation formula is: ABS(X1-X2)>T Where X1 is the valve position identification value, X2 is the valve position collection value, and T is the valve position alarm threshold.
[0009] In step 2, it further includes the following steps: Step 21: Scaling and transformation, using bilinear interpolation algorithm, by applying bilinear interpolation to each pixel point on the target image, using the weighted average value of adjacent pixels in the original image to estimate the value of the new pixel, so as to realize the scaling operation of the image while maintaining the details and quality of the image; Step 22: Graying, converting the original three-channel RGB color image into a single-channel gray image; the value when R=G=B is called the gray value, so the value range of the gray value is 0-255; The RGB to gray calculation formula is: Gray=(R*30+G*59+B*11+50) / 100; Step 23: denoising and smoothing, noise including speckle, noise and excess points, lines generated when shooting the valve; image denoising algorithm includes: median filter, mean filter, Gaussian filter, bilateral filter, wherein the mean filter and Gaussian filter are linear filters, and the median filter and bilateral filter are nonlinear filters; for speckle and noise, the median filter is used to eliminate, and for other parts not of interest, the image is filtered and eliminated through blurring or image addition and subtraction; Step 24: expansion and corrosion, expansion is to find the local maximum value, and corrosion is to find the local minimum value; simply, expansion is to increase the white area and reduce the black area, and corrosion is the opposite; in the valve identification, the corrosion / expansion operation is used to strengthen or eliminate the scale area and the pointer.
[0010] In step 4, specifically, the square block positioning mark installed on the valve is identified for positioning, a geometric image is used for labeling, a small frame is a full-closed position, and a large frame is a full-open position; through identification and size area calculation of the large and small frames, the starting point is positioned.
[0011] In step 5, the pointer positioning mark installed on the valve is identified for positioning, the radial gray sum is calculated to efficiently position the pointer, and the accuracy is verified through testing; the radial gray sum method has smaller calculation amount and higher efficiency through calculation of the radial gray sum; The principle of the RGS method is that the color difference between the valve position disc and the pointer is large, and the gray value difference in the corresponding gray image is also large, the gray sum s on the radius of the valve position disc is calculated, when the sum value is maximum or minimum, the radius direction is the direction of the pointer, and the center of the circle is combined to determine the position of the pointer.
[0012] In step 6, specifically, the final reading of the valve position depends on the center of the valve position disc, the angle of the pointer offset from the actual scale and the range; after the center of the valve position disc, the direction of the pointer and the range are determined, the indication is calculated through the angle of the pointer offset; the start / stop scale is determined by using the scale fitting method to find the scale, and then the start / stop scale is determined according to the positional relationship of the scale; the calculation formula is:
[0013] Wherein a is the included angle between the scale start point and the end point and the center, β is the angle of the pointer offset from the scale start point, and R is the range.
[0014] In summary, due to the adoption of the above technical scheme, the beneficial effects of the present application are: 1. This solution is mainly used for real-time valve position identification of the main pipes for softened circulating cooling water, high-temperature air (up to 500℃), low-temperature air (down to -60℃), and high-pressure air (≤1.2MPa) in the power center and various engine test benches. Through high-definition cameras and computer vision processing technology, combined with real-time data fusion technology, it achieves accurate measurement and identification of valve positions, so as to compare them with the valve positions collected by the original PLC control system in real time. When the valve position sensor malfunctions, the difference between the valve position collected by the PLC and the valve position identified by the camera will exceed the threshold, thereby triggering a valve safety warning prompt and displaying a pop-up window showing the real-time valve image, which facilitates quick location of the faulty valve and provides strong support for emergency response by test personnel.
[0015] 2. Compared with the efficiency of traditional manual inspection, this system can achieve real-time inspection within seconds and automatically alarm reminders. For example, it takes about 30 minutes to manually inspect 30 valves, while this system can achieve inspection response within seconds by using multi-threaded parallel recognition and processing of 30 cameras.
[0016] 3. Traditional manual valve location requires on-site inspection one by one, while this system automatically displays the valve name and location in a pop-up window after identifying the fault, and automatically broadcasts voice and displays camera footage in a pop-up window. The fault location time is reduced from an average of 10 minutes to less than 2 seconds. Attached Figure Description
[0017] Figure 1 This is a network architecture diagram of the present invention; Figure 2 This is a system architecture diagram of the present invention; Figure 3 This is a logical architecture diagram of the present invention. Detailed Implementation
[0018] All features disclosed in this specification, or all steps in all disclosed methods or processes, may be combined in any way, except for mutually exclusive features and / or steps.
[0019] Any feature disclosed in this specification (including any appended claims and abstract) may be replaced by other equivalent or similar features, unless specifically stated otherwise. That is, unless specifically stated otherwise, each feature is merely one example of a series of equivalent or similar features.
[0020] In the description of this invention, it should be understood that the terms "upper," "lower," "left," "right," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a predetermined orientation, or be constructed and operated in a predetermined orientation. Therefore, they should not be construed as limitations on this invention.
[0021] Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature.
[0022] Example 1 like Figures 1-2 As shown, the present invention provides a technical solution: A valve position autonomous recognition system based on computer vision includes, but is not limited to, a field acquisition module, a computer room processing module, and a remote processing module. The field acquisition module comprises a camera acquisition module and a PLC acquisition module. The camera acquisition module includes an identification mark and a camera mounted on the valve body. The camera acquires image data of the valve body disc. The PLC acquisition module is used to process the valve position feedback data on the valve body. The computer room processing module is equipped with a processing unit for the image data of the valve body disc and the valve position feedback data. The remote processing module displays, queries, or processes the data based on the comparison results from the processing unit.
[0023] Based on the above structure, this solution provides early warning by collecting on-site valve position feedback data and comparing and analyzing image data from identified markers. This improves the accuracy of early warnings. Compared to traditional manual inspections, this system can achieve real-time, second-level inspections and automatic alarm reminders (for example, manually inspecting 30 valves takes approximately 30 minutes, while this system achieves second-level inspection response through multi-threaded parallel recognition processing of 30 cameras). Traditional manual fault valve location requires on-site inspection one by one, while this system automatically displays the valve name and location in a pop-up window after identifying a fault, along with automatic voice broadcast and pop-up display of camera footage. The fault location time is reduced from an average of 10 minutes manually to within 2 seconds.
[0024] As an example, the data center processing module may include a streaming media service module, an image preprocessing module, an image positioning and recognition module, a data acquisition gateway module, a valve position comparison and analysis module, a valve position alarm processing module, and a data storage module; The streaming media service module supports camera access from brands such as Hikvision, Dahua, and Uniview. It supports RTSP protocol streaming and push streaming, and WebRTC playback, reducing video latency. The image preprocessing module uses the RTSP protocol to pull real-time video from the camera and extracts frames from the video to obtain images; it performs operations such as scaling and transformation, grayscale conversion, noise reduction and smoothing, dilation and erosion on the images to provide high-quality images for valve recognition. The image positioning and recognition module locates the center, radius, fully open, fully closed, and pointer position of the valve disc in the pre-processed image. Based on the recognized center, radius, fully open, fully closed, and pointer positions, it calculates the angle and range of the pointer relative to the fully open and fully closed positions to obtain the valve position value. The data such as the disc, center, pointer, fully open and fully closed positions, valve position recognition value, and valve position acquisition value are superimposed on the original valve image and pushed to the streaming media service module for display on the front-end monitoring interface. The data acquisition gateway module establishes communication with the PLC via TCP / IP, parses the data according to the PLC communication protocol, and obtains the values from the valve position sensor. The valve position comparison and analysis module compares and analyzes the valve position identification value and the valve position acquisition value. If the value exceeds the threshold, an alarm is triggered. The valve position alarm processing module stores alarm information, including alarm time, valve name, valve number, valve position, valve position identification value, valve position acquisition value, etc.; it stores 30 seconds of video files before and after the valve position identification alarm, and will not store alarms that already exist; and it pushes the alarm information to the front-end interface via broadcast.
[0025] The data storage module is used to store various types of data.
[0026] As an example, the remote processing module may include a valve recognition screen display module, an automatic alarm pop-up display module, an alarm voice reminder module, an emergency handling module, and an alarm record query module.
[0027] The valve recognition screen display module plays and displays the real-time processing screen of valve recognition via WebRTC, including information such as the valve position positioning circle, pointer, valve position recognition value, and valve position acquisition value on the screen; The automatic alarm pop-up display module allows the client to automatically display alarm information and real-time recognition images in a pop-up window after receiving a valve alarm message from the server. The alarm voice reminder module automatically plays the alarm information via voice after the client receives the valve alarm message from the server, so as to remind the operator to deal with the fault. The emergency response module allows operators to manually confirm valve alarm information, selecting whether it is a false alarm or a genuine malfunction. If the valve has indeed issued an alarm, the operator performs emergency response and records the results. The alarm record query module allows the client to query historical alarm records, view, export, and print alarm information; it also allows playing and downloading alarm videos.
[0028] This solution is primarily used for real-time valve position identification of the main pipes for softened circulating cooling water, high-temperature air (up to 500℃), low-temperature air (down to -60℃), and high-pressure air (≤1.2MPa) in the power center and various engine test benches. Through high-definition cameras and computer vision processing technology, combined with real-time data fusion technology, it achieves accurate measurement and identification of valve positions. This allows for real-time comparison with the valve positions collected by the original PLC control system. When a valve position sensor malfunctions, the difference between the valve position collected by the PLC and the valve position identified by the camera will exceed a threshold, triggering a valve safety warning and displaying a pop-up window showing the real-time valve image. This facilitates rapid location of the faulty valve and provides strong support for emergency response by test personnel.
[0029] In this solution, the valve being monitored has a built-in valve position sensor, which is connected to the analog input module of the PLC via a signal line to collect valve position feedback data. The identification markings in this solution use high reflectivity materials (reflectivity ≥ 85%), and the pattern is a combination of concentric circles and equally divided sectors (center tolerance ± 0.1 mm, sector angle tolerance ± 0.5°). The mapping relationship with the physical valve position is established through pre-calibration. The camera in this solution has a 12mm focal length lens and an F1.4 aperture, ensuring a signal-to-noise ratio >40dB in low-light environments, and is equipped with an automatic supplemental lighting system. The camera is mounted on a fixed bracket, aimed at the valve body disc, and captures images. It is then connected to the network switch via a network cable.
[0030] Example 2 like Figure 3 As shown, based on the system of Embodiment 1 above, the present invention provides a technical solution: A method for autonomous valve position recognition based on computer vision includes the following steps: Step 1: Pulling and frame extraction. The video stream is pulled from the camera through the streaming media service, and frames are extracted from the video stream every second (the frame extraction frequency can be configured to meet real-time requirements) to obtain one frame image of each valve. Step 2: Valve image preprocessing, including scaling and transformation, grayscale conversion, denoising and smoothing, dilation and erosion. The purpose of preprocessing is to remove noise and enhance features, providing high-quality images for valve recognition. Affine and perspective transformations are used to handle image deformation, grayscale conversion reduces data volume, median and Gaussian filtering removes noise, and dilation and erosion operations enhance the features of the valve disc and pointer. Step 2 may specifically include the following steps: Step 21: Scaling and Transformation. The main purpose of scaling is to reduce the image size and computational load. Scaling is not always necessary, but if the system has requirements for the size of the input image, such as needing normalization, then scaling is required. Common scaling methods include proportional scaling and forced scaling. This method employs a bilinear interpolation algorithm. By applying bilinear interpolation to each pixel in the target image, the value of the new pixel can be estimated using the weighted average of adjacent pixels in the original image, thereby achieving image scaling while preserving image detail and quality.
[0031] like Figure 2 As shown, we need to find the pixel value of point P. The coordinates of Q11, Q21, Q12, Q22, and P are known. The pixel values of Q11, Q21, Q12, and Q22 are also known. Therefore, we first use linear interpolation with respect to X to calculate the pixel values of R1 and R2 respectively.
[0032]
[0033] In the equation on the right, the letters f(Q11), f(Q12), f(Q21), f(Q22), x1, x2, and x are all known. The calculated f(x,y1) and f(x,y2) are the pixel values of R1 and R2. Then, using single linear interpolation in the y-direction, the pixel value of point P is calculated as follows:
[0034] In the equation on the right, the letters y1, y2, and y are known, and f(x,y1) and f(x,y2) are the pixel values of R1 and R2 obtained in the previous equation. Step 22: Grayscale conversion. One purpose is to convert the original three-channel RGB color image into a single-channel grayscale image. The value when R=G=B is called the grayscale value, and therefore the range of grayscale values is 0-255.
[0035] The formula for converting RGB to grayscale is: Gray = (R*30 + G*59 + B*11 + 50) / 100 One of the important purposes of image grayscale conversion is to reduce the amount of data processed and speed up the calculation, because a grayscale image has only one channel and only one value needs to be calculated. Step 23: Denoising and smoothing are among the most important preprocessing steps, as the effectiveness of denoising can significantly impact the final result. The noise referred to here includes not only speckles and inspection noise generated during valve imaging, but also unwanted elements such as extraneous dots and lines. Classic image denoising algorithms include median filtering, mean filtering, Gaussian filtering, and bilateral filtering. Mean and Gaussian filtering are linear filters, while median and bilateral filtering are non-linear filters. For speckles and inspection noise, median filtering can be used for elimination. For other unwanted or uninteresting elements, a series of other operations can be used for filtering and elimination, such as blurring, image addition and subtraction, etc.
[0036] Median filtering is a commonly used smoothing filtering technique in image processing to remove noise from images. Its basic idea is to replace the original value of a pixel with the median value of its neighboring pixels. For grayscale images, the median filtering formula can be expressed as: output(i,j) = median(input(i-1:i+1,j-1:j+1)) Where input(i-1:i+1,j-1:j+1) represents the pixel value within a 3x3 neighborhood around pixel (i,j), and median() calculates the median of a set of numbers; Step 24: Dilation and Erosion. Dilation is an operation that finds a local maximum, while erosion is an operation that finds a local minimum. Simply put, dilation increases white areas (high pixel values) and decreases black areas (low pixel values), while erosion does the opposite. In valve recognition, erosion / dilation operations are used to enhance or eliminate scale areas and pointers, etc. In other words, dilation and erosion operations can enhance the area of interest and reduce noise, and can be regarded as a kind of filtering operation.
[0037] Given two images A and B, if A represents the image being processed and B is used to process A, then B is called a structuring element.
[0038] Dilation enlarges an image, such as when bridging cracks in text. If A and B are sets in Z2, the dilation of A⊕B with respect to A is defined as:
[0039] Erosion is a method to reduce the size of an image. In Z2, sets A and B, denoted as A⊖B, represent the portion of B's structuring element that belongs to A after translation. The erosion of A by B is as follows:
[0040] Step 3: Locate the center and radius of the valve disc by identifying the circular positioning mark installed on the valve, using Random Sampling Circle Detection (RSCD). RSCD determines the circle by randomly selecting three points on the contour and uses the standard deviation to determine the optimal dense area, which is characterized by high efficiency, accuracy and robustness.
[0041] Random Sampling Circle Detection (RSCD) aims to quickly locate an optimal circle in an image. Its principle is as follows: three points are randomly selected from the image's contour (or edge) information. A circle is defined based on these three points. This process is repeated to find all possible circles. Unlike Hough Circle Detection, this method does not use a voting count method to locate the circle center. Instead, it determines a region with the highest center density by calculating the standard deviation between the centers of possible circles within a certain area and the center of that region. The center of this region is then used as the center of the circle. Similarly, the radius is calculated by averaging the radii of all possible circles. An adaptive contour filtering mechanism is introduced into RGS, retaining only contour points with edge gradients > 50 for calculation, reducing noise interference and improving detection speed by 30%. This significantly reduces computational load while maintaining accuracy. The mathematical formula for the RGS algorithm is: The formula for calculating radial grayscale is:
[0042] Where I(x,y) is the pixel gray value, θ is the scanning angle (step size 0.1°), and the pointer direction is determined by θmax=argmaxθS(θ); Step 4: Locate the fully open and fully closed positions of the valve disc. Positioning is achieved by identifying the square positioning markers installed on the valve. Geometric images (square blocks) are used for marking; smaller frames indicate the fully closed position, and larger frames indicate the fully open position. By identifying and locating the large and small frames and calculating their areas, the starting point is determined. This method features fast calculation speed and accurate positioning, reducing overall inspection time. Step 5: Locate the valve position pointer on the valve disc. Position the valve by identifying the pointer-type positioning mark installed on the valve. Pointer positioning is the most important part of valve position identification and reading recognition. Its accuracy directly determines the final reading. Therefore, the radial grayscale sum is calculated to efficiently position the pointer, and its accuracy is verified by testing.
[0043] The Radial Gray Summation (RGS) method calculates the radial gray sum, which is more efficient and requires less computation. When the dial is accurately positioned, it can achieve an accuracy of nearly 99%.
[0044] The principle of the RGS method is as follows: In general, the color difference between the valve position plate and the pointer is large, and the corresponding gray value difference in the grayscale image is also large. By calculating the gray value and s on the radius of the valve position plate circle, when the sum is the largest (or the smallest, which is determined according to the background and pointer color of the valve position plate), the direction of the radius is the direction of the pointer. Combined with the center of the circle, the pointer position can be determined. Step 6: Valve position identification numerical calculation. Using the determined fully closed and fully open positions, the calculation is performed based on the proportional relationship between the included angle and the range. The final valve position reading depends on the center of the valve position disc, the angle of the pointer's offset from the first scale, and the range. Only after determining the valve position disc center, pointer direction, and range can the reading be calculated using the pointer offset angle. A crucial point here is calculating the starting / ending scale positions. The starting / ending scales can be determined by first using a scale fitting method to find the scales, and then determining the starting / ending scales based on the positional relationship of the scales. Calculation formula:
[0045] Where a is the angle between the starting and ending points of the scale and the center of the circle, β is the angle by which the pointer deviates from the starting point of the scale, and R is the range.
[0046] Step 7: Overlay and stream the identified data. Overlay the data such as the disc, center, pointer, fully open / fully closed position, valve position identification value, and valve position acquisition value onto the original valve image and stream it to the streaming media service module for display on the front-end monitoring interface. Step 8: Collect valve position sensor data. The data acquisition gateway establishes communication with the PLC via TCP / IP, parses the data according to the PLC communication protocol, and obtains the valve position sensor value. Step 9: Valve Position Comparison Analysis. The absolute values of the identified valve position and the acquired valve position are compared and analyzed. If the value exceeds the threshold, and this occurs for three consecutive scanning cycles (scanning cycles are configurable), a Level 1 alarm is triggered. If the value does not recover within 10 seconds, it is escalated to a Level 2 alarm, and the PLC interlock protection is activated. Alarm processing is then initiated. Calculation Formula: ABS(X1-X2)>T Where X1 is the valve position identification value (%); X2 is the valve position acquisition value (%); and T is the valve position alarm threshold (%). Step 10: Valve alarm processing, storing alarm information, including alarm time, valve name, valve number, valve location, valve position identification value, valve position acquisition value, etc.; storing video files of 30 seconds before and after the valve position identification alarm, if the alarm already exists, it will not be stored again, and pushing the alarm information to the front-end interface in a broadcast manner; Step 11: Valve alarm notification. After receiving the valve alarm message from the server, the client interface will automatically display the alarm information and real-time recognition screen in a pop-up window, and automatically play the alarm information in voice mode to remind the operator to handle the fault. Step 12: Emergency handling. The operator manually confirms the valve alarm information to determine whether it is a false alarm or a genuine malfunction. If the valve has indeed issued an alarm, the operator performs emergency handling and records the results. Step 13: Alarm record query. The client can query historical alarm records, view, export, and print alarm information, and play and download alarm videos.
[0047] To reduce the recognition error caused by valve vibration or camera vibration, the last 12 valve position values are cached, the maximum and minimum values are removed, and the remaining 10 valve position values are then weighted according to the number of times the same valve position value appears, and a weighted average algorithm is used to calculate the final valve position recognition value. The valve position recognition error is ≤0.8° in laboratory environment and ≤1.5° in high temperature vibration environment.
[0048] To improve the reliability of the system, an automatic supplemental light was configured to adapt to dim environments such as night and underground. In a continuous 1000-hour test, the system's false alarm rate was <0.1% and the missed alarm rate was 0%.
[0049] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A valve position autonomous acquisition and recognition system based on computer vision, characterized in that: It includes a field acquisition module, a computer room processing module, and a remote processing module. The field acquisition module comprises a camera acquisition module and a PLC acquisition module. The camera acquisition module includes an identification mark and a camera installed on the valve body. The camera acquires image data of the valve body disc. The PLC acquisition module is used to acquire valve position feedback data on the valve body. The computer room processing module is equipped with a processing unit for the image data of the valve body disc and the valve position feedback data. The remote processing module displays, queries, or processes the corresponding values based on the comparison results from the processing unit.
2. The valve position autonomous acquisition and recognition system based on computer vision according to claim 1, characterized in that: The data center processing module includes a streaming media service module, an image preprocessing module, an image positioning and recognition module, a data acquisition gateway module, a valve position comparison and analysis module, a valve position alarm processing module, and a data storage module. The streaming media service module is used to provide video transmission; The image preprocessing module is used for processing image data; The image positioning and recognition module is used to position the valve disc in the pre-processed image. The data acquisition gateway module is used for data parsing and data transmission; The valve position comparison and analysis module is used to compare and analyze the valve position identification value and the valve position acquisition value. The valve position alarm processing module is used to store alarm information, which is then broadcast to the front-end interface.
3. A valve position autonomous acquisition and recognition system based on computer vision according to claim 1 or 2, characterized in that: The remote processing module includes a valve recognition screen display module, an automatic alarm pop-up display module, an alarm voice reminder module, an emergency handling module, and an alarm record query module; The valve recognition screen display module is used to display the real-time processing screen of valve recognition. The automatic alarm pop-up display module is used to automatically display alarm information and real-time recognition images on the client interface in the form of a pop-up window after the client receives a valve alarm message from the server. The alarm voice reminder module is used so that after the client receives a valve alarm message from the server, the client will automatically play the alarm information in voice mode. An emergency response module is used for emergency response and to record the results. The alarm record query module is used to query historical alarm records.
4. A method for autonomously acquiring and recognizing valve positions based on a computer vision-based valve position autonomous acquisition and recognition system according to any one of claims 1 to 3, characterized in that: Includes the following steps: Step 1: Pull the stream and extract frames to extract image data; Step 2: Valve image preprocessing; Step 3: Locate the center and radius of the valve disc; Step 4: Locate the fully open and fully closed positions of the valve disc; Step 5: Position the valve position pointer on the valve disc; Step 6: Valve position identification numerical calculation. The calculation is performed using the ratio of the included angle and the range, based on the determined fully closed and fully open positions. Step 7: Identify and overlay the data onto the original valve image and push the stream to the streaming media service module; Step 8: Collect valve position sensor data; Step 9: Valve position comparison analysis. The absolute values of the valve position identification value and the valve position acquisition value are compared and analyzed. If the values exceed the preset conditions, an alarm is triggered. Step 10: Valve alarm processing, storing alarm information, and pushing the alarm information to the front-end interface via broadcast; Step 11: Valve alarm notification. After receiving the valve alarm message from the server, the client interface will automatically display the alarm information and real-time recognition screen in a pop-up window, and automatically play the alarm information in voice mode to remind the operator to handle the fault. Step 12: Emergency handling. The operator manually confirms the valve alarm information to determine whether it is a false alarm or a genuine malfunction. If the valve has indeed issued an alarm, the operator performs emergency handling and records the results.
5. The valve position autonomous acquisition and recognition method based on computer vision according to claim 4, characterized in that: In step 2, valve image preprocessing includes scaling and transformation, grayscale conversion, denoising and smoothing, dilation and erosion; In step 3, positioning is performed by identifying the circular positioning mark installed on the valve; In step 4, positioning is performed by identifying the positioning marks installed on the valve; In step 5, positioning is performed by identifying the pointer-type positioning mark installed on the valve.
6. The valve position autonomous acquisition and recognition method based on computer vision according to claim 4, characterized in that: The preset conditions are as follows: A threshold is set. If the threshold is exceeded and exceeds the threshold for three consecutive scan cycles, a level one alarm is triggered. If the alarm is not restored within 10 seconds, it is upgraded to a level two alarm and the PLC interlock protection is activated, thus performing alarm processing. The calculation formula is: ABS(X1-X2) > T Where X1 is the valve position identification value; X2 is the valve position acquisition value; and T is the valve position alarm threshold.
7. The valve position autonomous acquisition and recognition method based on computer vision according to claim 4, characterized in that: Step 2 also includes the following steps: Step 21: Scaling and transformation. A bilinear interpolation algorithm is used. By applying bilinear interpolation to each pixel in the target image, the value of the new pixel is estimated using the weighted average of the adjacent pixels in the original image, thereby achieving the scaling operation of the image while maintaining the detail and quality of the image. Step 22: Grayscale conversion, converting the original three-channel RGB color image into a single-channel grayscale image; the value when R=G=B is called the grayscale value, so the range of grayscale value is 0-255; The formula for converting RGB to grayscale is: Gray=(R*30+G*59+B*11+50) / 100; Step 23: Denoising and smoothing. Noise includes speckles, inspection noise, and extra dots and lines generated during valve imaging. Image denoising algorithms include: median filtering, mean filtering, Gaussian filtering, and bilateral filtering. Mean filtering and Gaussian filtering are linear filters, while median filtering and bilateral filtering are non-linear filters. For speckles and inspection noise, median filtering is used for elimination. For other parts of no interest, blurring or image addition / subtraction are used for filtering and elimination. Step 24: Expansion and Corrosion. Expansion is the operation of finding a local maximum value, while corrosion is the operation of finding a local minimum value. Simply put, expansion increases the white area and decreases the black area, while corrosion does the opposite. In valve identification, corrosion / expansion operations are used to strengthen or eliminate the scale area and pointer.
8. The valve position autonomous acquisition and recognition method based on computer vision according to claim 4, characterized in that: In step 4, specifically, the valve is positioned by identifying the square positioning marks installed on it, and the markings are done using geometric images. The smaller frame represents the fully closed position, and the larger frame represents the fully open position. The starting point is located by identifying and positioning the large and small frames and calculating their area.
9. The valve position autonomous acquisition and recognition method based on computer vision according to claim 4, characterized in that: In step 5, the pointer is located by identifying the pointer-type positioning mark installed on the valve, the radial grayscale sum is calculated to efficiently locate the pointer, and its accuracy is verified by testing; The radial gray-level summation method calculates the radial gray-level sum, which has less computation and higher efficiency. The principle of the RGS method is as follows: the color difference between the valve position plate and the pointer is large, and the corresponding gray value difference in the grayscale image is also large. By calculating the gray value and s on the radius of the valve position plate circle, when the sum is at its maximum or minimum, the direction of the radius is the direction of the pointer. Combined with the center of the circle, the pointer position is determined.
10. A method for autonomous acquisition and recognition of valve positions based on computer vision according to claim 4, characterized in that: In step 6, specifically, the final reading of the valve position depends on the center of the valve position disc, the angle of pointer offset from the first scale, and the range. After determining the center of the valve position disc, the pointer direction, and the range, the reading is calculated using the pointer offset angle. The starting / ending scale is determined first by using a scale fitting method to find the scale, and then by determining the starting / ending scale based on the positional relationship of the scales. Calculation formula: Where a is the angle between the starting and ending points of the scale and the center of the circle, β is the angle by which the pointer deviates from the starting point of the scale, and R is the range.