Rising stem gate valve opening and closing state monitoring method
Through digital image processing technology, the opening and closing status of the open rod gate valve is monitored in real time, solving the defects of manual judgment and traditional sensors in the prior art, and achieving efficient and safe monitoring effects.
Patent Information
- Application Number
- CN202510370591.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-06-27
AI Technical Summary
The judgment of the opening and closing status of the existing open rod gate valve depends on manual judgment or traditional sensors, resulting in high labor costs, high working intensity, high safety risks, and complex wiring, high cost, and difficult installation and maintenance.
Using digital image processing technology, the camera collects the image of the open rod gate valve, uses HSV color space screening and mask calculation to obtain the geometric center coordinates of the valve stem end, and calculate the extension ratio of the valve stem end, and determine the opening and closing state based on the preset threshold.
Real-time and non-contact monitoring of the open and closed state of the open rod gate valve is realized, reducing labor costs and wiring complexity, and improving monitoring safety and efficiency.
Smart Images

Figure CN120219360A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent operation and maintenance of rail transit, and relates to a method for monitoring the opening and closing state of a rising-stem gate valve. Background Art
[0002] In the field of intelligent operation and maintenance of rail transit, pump houses are an important part to ensure the normal and safe operation of the railway system. As a pipeline valve with a simple structure and convenient operation, the rising-stem gate valve is widely used in various pump houses. At present, to judge the opening and closing state of the rising-stem gate valve, one is to rely on manual judgment, formulate inspection plans, arrange personnel on duty, and confirm by means of observing the position of the valve stem regularly and checking the valve body identification; the other is to realize automatic identification through traditional devices such as limit switches and pressure sensors. However, the manual judgment method requires on-site observation by the on-duty personnel, increasing labor costs, work intensity, and safety risks. At the same time, the results lack objectivity and real-time nature; the installation requirements of traditional sensor devices cover each gate valve, resulting in complex wiring, high costs, difficult installation and maintenance, and easy failure. This is contrary to the improvement of efficiency and stability of quality in the construction of the intelligent operation and maintenance system of rail transit. Summary of the Invention
[0003] To solve this situation, the present invention proposes a method for monitoring the opening and closing state of a rising-stem gate valve, replacing manual judgment and traditional sensors, and enabling operation and maintenance personnel to master the opening and closing state information of the rising-stem gate valve in real time.
[0004] To achieve the above object, the solution of the present invention is: S1. Calibrate parameters and preset frame-drawing rules; S2. Collect images of the rising-stem gate valve, and obtain the region of interest according to the calibrated parameters and frame-drawing rules; S3. In the region of interest, perform masking operations through screening in the HSV color space to obtain a set of target blocks, select the block with the largest area in the set of target blocks as the current actual valve stem end, and calculate the geometric center coordinates of the end; S4. Calculate the extension ratio of the current actual valve stem end, and judge the opening and closing state in combination with a preset threshold.
[0005] Further, step S1, calibrating parameters and presetting frame-drawing rules, specifically includes the following steps:
[0006] S11. Calibrate the parameters of each rising-stem gate valve in the fully open state, and the parameters include the handwheel center coordinates (x Si , y Si ), the valve stem end coordinates (x Ei , y Ei ) and the valve stem width r i , where the subscript i represents the i-th rising-stem gate valve in the image, and the value range is [1, N], and N represents the total number of rising-stem gate valves in the image.
[0007] S12. The preset frame-drawing rule is that when each outside screw non-rising stem gate valve is in the maximum opening state, a calibration center line is formed by connecting the center of the handwheel (x Si , y Si ) and the end of the valve stem (x Ei , y Ei ), and a rectangular area R i is constructed. Preferably, the length of the rectangular area is 1.2 times the length of the center line, and the width of the rectangular area is 2 times the width of the valve stem.
[0008] Further, in step S2, an image of the outside screw non-rising stem gate valve is collected, and according to the parameters and the frame-drawing rule in step S1, an interest region set R = {R i |i = 1, 2,..., N} is obtained.
[0009] Further, in step S3, within the interest region set R, masking operations are performed through screening in the HSV color space to obtain a set of target blocks. The block with the largest area in the set of target blocks is selected as the currently visible end of the valve stem, and the geometric center coordinates of the end are calculated. Specifically, it includes the following steps:
[0010] S31. Manually specify the HSV value range of the end of the valve stem. The lower limit is (H l , S l , V l ), and the upper limit is (H h , S h , V h ), where H, S, and V respectively represent hue, saturation, and value. The subscript l represents the lower limit, and the subscript h represents the upper limit. Preferably, two ranges are specified, which are respectively
[0011]
[0012] where the subscript 1 represents bright color, and the subscript 2 represents dark color.
[0013] S32. Using the HSV value range of the end of the valve stem in S31, perform a masking operation on the interest region set R to obtain a binary image. The binary image is the set of target blocks Q = {Q ij |i = 1, 2,..., N; j = 1, 2,..., M i}, where the subscript j represents the jth target block in the interest region R i , and the value range is [1, M i , and M i represents the total number of target blocks in the interest region R i ;
[0014] S33. According to the set of target blocks Q obtained in S32, traverse the set of target blocks Q and calculate the area S(Q ij), select each region of interest R i The block with the largest area in it, the formula is as follows
[0015]
[0016] Among them, T i represents the target block with the largest area in the region of interest R i as the current actual valve stem end. Calculate the center coordinates of the current actual valve stem end T i as
[0017]
[0018] Among them, x b , y b , w b , h b respectively represent the abscissa of the upper left corner point, the ordinate of the upper left corner point, the width, and the height of the smallest circumscribed rectangle (sides parallel to the coordinate axes) of the current actual valve stem end T i .
[0019] Furthermore, in step S4, calculate the extension ratio of the current actual valve stem end, and judge the opening and closing state in combination with a preset threshold, which specifically includes the following steps:
[0020] S41. According to the calibrated handwheel center coordinates (x Si , y Si ) described in S1, and according to the current actual valve stem end coordinates (x Ti , y Ti ) described in S3, calculate the extension length L i of the current actual valve stem end as
[0021]
[0022] S42. Calculate the length of the calibrated center line described in S1 as
[0023]
[0024] Combined with the current actual valve stem extension length L i described in S41, calculate the extension ratio
[0025] S43. Preset the opening and closing threshold as r0, and judge the opening and closing state. If r i ≤r0, then the i-th rising-stem gate valve is in the closed state; if r i >r0, then the i-th rising-stem gate valve is in the open state.
[0026] The present invention has the following beneficial effects: The present invention monitors the opening and closing states of a rising-stem gate valve by means of digital image processing. This method is a non-contact real-time monitoring method, ensuring safety and efficiency; through real-time image processing, a more accurate judgment of the opening and closing states is provided; the opening and closing states of multiple valve stems can be monitored by one camera, reducing costs and reducing the occurrence of failures. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a schematic diagram of the scenario involved in the present invention.
[0028] Figure 2 It is a block diagram of the working principle of the present invention.
[0029] Figure 3 It is a schematic diagram of the monitoring results of the embodiment DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0031] For the convenience of understanding by those skilled in the art, an embodiment is used here to illustrate the calibration parameters and preset the frame-drawing rules: The camera is installed inside the pump house, and the center coordinates (x S1 , y S1 ) of the handwheel of each rising-stem gate valve in the maximum opening state are calibrated as (291, 229), (x S2 , y S2 ) = (381, 207), (x S3 , y S3 ) = (534, 244), the end coordinates of the valve stem (x E1 , y E1 ) = (301, 106), (x E2 , y E2 ) = (388, 119), (x E3 , y E3 ) = (559, 74), and the widths of the valve stems are r1 = 8, r2 = 5, r3 = 10. The frame-drawing rules are preset for use in subsequent steps.
[0032] For the convenience of understanding by those skilled in the art, an embodiment is used here to illustrate the masking operation by screening in the HSV color space to obtain a set of target blocks, selecting the block with the largest area in the set of target blocks as the current actual valve stem end, and calculating the geometric center coordinates of the end.
[0033] Specifically, the set range is
[0034]
[0035] Among them, the subscript 1 represents bright red, and the subscript 2 represents dark red. The obtained end geometric center coordinates are (x T1 , y T1 ) = (299, 141), (x T2 , y T2 ) = (387, 142), (x T3 , y T3 ) = (549, 144).
[0036] For the convenience of understanding by those skilled in the art, an embodiment is now used to illustrate the calculation of the current actual valve stem end extension ratio and the judgment of the opening and closing states in combination with a preset threshold:
[0037] Specifically, the obtained current actual valve stem end extension lengths L1, L2, and L3 are 88.36, 65.28, and 101.12 respectively, and the center line lengths are 123.02, 88.01, and 170.29 respectively.
[0038] In this embodiment, the calculated current actual valve stem end extension ratios r1, r2, and r3 are 0.70, 0.72, and 0.59 respectively. The threshold r0 is 0.6, and the judged rising stem gate valve states are opened, opened, and closed in sequence.
Claims
1. A method for monitoring the opening and closing status of a rising stem gate valve, characterized in that: The following steps are involved: S1. Calibrate parameters and preset frame rules; S2, collecting the image of the rising-stem gate valve, and obtaining the region of interest according to the calibrated parameters and the frame drawing rules; S3. In the region of interest, a mask operation is performed by HSV color space screening to obtain a target block set, and the block with the largest area in the target block set is selected as the current actual valve stem end, and the geometric center coordinates of the end are calculated; S4. Calculate the current actual valve stem end extension ratio, and determine the opening and closing state based on the preset threshold.
2. The method for monitoring the opening and closing status of a rising stem gate valve according to claim 1, characterized in that: The step S1, calibrating parameters and presetting frame drawing rules, specifically includes the following steps: S11, calibrating the parameters of each rising-stem gate valve in the maximum opening state, wherein the parameters include the handwheel center coordinate, the valve stem end coordinate and the valve stem width; S12. The preset framing rule is that when each rising-stem gate valve is in the maximum opening state, a rectangular area is constructed with the line connecting the center of the handwheel and the end of the valve stem as the calibration center line. The length of the rectangular area is 1.2 times the length of the center line, and the width of the rectangular area is 2 times the width of the valve stem.
3. The method for monitoring the opening and closing status of a rising stem gate valve according to claim 1, characterized in that: The step S3, in the region of interest, performs mask operation by HSV color space screening to obtain a target block set, selects the block with the largest area in the target block set as the current actual valve stem end, and calculates the geometric center coordinates of the end, specifically including the following steps: S31, manually set the HSV value range of the valve stem end; S32, using the HSV value range of the valve stem end in S31, performing a mask operation on the region of interest to obtain a binary image, wherein the binary image is a target block set; S33. According to the target block set obtained in S32, the area of each target block is calculated, the block with the largest area is selected as the current actual valve stem end, and the center coordinates of the current actual valve stem end are calculated.
4. The method for monitoring the opening and closing status of a rising stem gate valve according to claim 1, characterized in that: The step S4, calculating the current actual valve stem end extension ratio and judging the opening and closing state in combination with a preset threshold, specifically includes the following steps: S41, according to the calibrated hand wheel center coordinates described in S1, and according to the current actual valve stem end coordinates described in S3, calculating the current actual valve stem end extension length; S42, combining the current actual valve stem extension length described in S41 and the calibrated center line described in S1, calculating the current actual valve stem end extension ratio; S43, preset the opening and closing threshold and determine the opening and closing status.