Overhead tank flow evaluation method and device, electronic equipment and storage medium
By using image acquisition and processing technology, the flow status of elevated troughs can be detected in real time, which solves the problems of easy sensor damage and strong subjectivity of manual observation in traditional methods, and realizes accurate and automated monitoring of elevated trough flow.
Patent Information
- Application Number
- CN202511654843.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-02-13
AI Technical Summary
In existing technologies for monitoring flow in elevated troughs, contact sensors are prone to corrosion and clogging, and manual observation is highly subjective, making it impossible to achieve real-time, automated, and highly reliable flow assessment. In particular, it is difficult to accurately detect the flow status when the pump is stopped.
Images are captured in real time using image acquisition equipment, and then image segmentation and preprocessing are performed to label fluid, background, and pipe areas. The flow status is determined by the area width, and a preset correlation is established to achieve accurate detection of the flow status.
It enables real-time and accurate detection of the flow rate of the elevated trough even when the pump is stopped, reducing the risk of equipment damage, reducing labor costs, avoiding subjective misjudgment, and possessing high reliability and automation characteristics.
Smart Images

Figure CN121527705A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oil and gas drilling technology, and in particular to a method, apparatus, electronic device, and storage medium for evaluating the flow rate of elevated trenches. Background Technology
[0002] In industrial sectors such as chemical, mining, water conservancy, and wastewater treatment, the transport of liquids through inclined pipelines to semi-open horizontal tanks is a common configuration. During drilling, the fluid morphology in the elevated tank is a direct parameter for judging abnormal downhole conditions such as well kicks and overflows, directly affecting drilling safety and efficiency. Complex conditions (such as formation flow effects and overflows) can lead to abnormal outlet flow rates, causing changes in the flow state at the elevated tank outlet, resulting in continuous flow at the outlet even when the pump is stopped.
[0003] Currently, flow monitoring in elevated pipes mainly relies on contact sensors (such as electromagnetic flowmeters and ultrasonic flowmeters) or manual observation. Contact sensors are typically placed before inclined pipes, and their activation thresholds and inherent environmental noise prevent the accurate capture of small flow rates and intermittent trickles. They also suffer from problems such as susceptibility to corrosion and clogging, and high maintenance costs. Furthermore, their measurement accuracy drifts significantly when dealing with mixed, multiphase, high-viscosity fluids. Manual observation, under space-constrained pipe conditions and complex lighting environments, suffers from limitations such as high subjectivity, low efficiency, and inability to provide real-time response, making quantitative assessment impossible and failing to meet the urgent requirements of drilling processes for real-time performance, automation, and high reliability. Summary of the Invention
[0004] This invention provides a method, apparatus, electronic device, and storage medium for evaluating the flow rate of an elevated trough, in order to solve the difficulty of real-time detection of the flow rate status at the pipeline outlet when the pump is stopped, and to achieve accurate detection of the flow rate status at the pipeline outlet when the pump is stopped.
[0005] According to one aspect of the present invention, a method for evaluating the flow rate of an elevated trough is provided, the method comprising:
[0006] When the pump is stopped, the camera is controlled to acquire a first image in real time, and the first image is segmented to obtain a second image; the image segmentation is used to label the fluid area, background area and pipe area in the image.
[0007] If a fluid region exists in the second image, then the second image is preprocessed to obtain a third image; the image preprocessing includes removing background regions and pipe regions;
[0008] The width of the fluid region is determined based on the third image, and the flow rate status is determined based on the width of the region; there is a preset correlation between the width of the region and the flow rate status.
[0009] According to another aspect of the present invention, an elevated trough flow rate assessment device is provided, the device comprising:
[0010] The image acquisition module is used to control the imaging device to acquire a first image in real time when the pump is stopped, and to perform image segmentation processing on the first image to obtain a second image; the image segmentation processing is used to label the fluid area, background area and pipe area in the image;
[0011] An image processing module is used to preprocess the second image to obtain a third image if a fluid region exists in the second image; the image preprocessing includes removing background regions and pipe regions.
[0012] The detection module is used to determine the width of the fluid region based on the third image, and to determine the flow rate status based on the width of the region; there is a preset correlation between the width of the region and the flow rate status.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] At least one processor; and
[0015] A memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the elevated trough flow assessment method according to any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the elevated trough flow assessment method according to any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the elevated trough flow assessment method according to any embodiment of the present invention.
[0019] The technical solution of this invention, under pump shutdown conditions, controls an imaging device to acquire a first image in real time, performs image segmentation processing on the first image to obtain a second image; the image segmentation processing is used to label the fluid region, background region, and pipe region in the image to achieve accurate segmentation of the fluid region, background region, and pipe region, facilitating subsequent accurate extraction of the physical features of the fluid. Further, if a fluid region exists in the second image, the second image is preprocessed to obtain a third image; the image preprocessing includes removing the background region and pipe region, achieving accurate segmentation of the background region and pipe region in the second image to retain the fluid region, thereby determining the region width of the fluid region based on the third image, and determining the flow state based on the region width; there is a preset correlation between the region width and the flow state, solving the difficulty of real-time detection of the flow state at the pipe outlet under pump shutdown conditions, and achieving accurate detection of the flow state at the pipe outlet under pump shutdown conditions.
[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0022] Figure 1 This is a flowchart of an elevated trough flow rate assessment method provided by an embodiment of the present invention;
[0023] Figure 2 This is a flowchart of another method for evaluating the flow rate of an elevated trough according to an embodiment of the present invention;
[0024] Figure 3 This is a schematic diagram of the structure of an elevated trough flow assessment device according to an embodiment of the present invention;
[0025] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the elevated trough flow assessment method according to an embodiment of the present invention. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] Example 1
[0029] Figure 1 This is a flowchart illustrating a method for assessing the flow rate of an elevated channel according to an embodiment of the present invention. This embodiment is applicable to assessing the outlet flow rate status of an elevated channel pipeline. The method can be executed by an elevated channel flow rate assessment device, which can be implemented in hardware and / or software and can be configured in any electronic device with network communication capabilities. Figure 1 As shown, the elevated trough flow rate assessment method of the present invention may include:
[0030] S110. Under the condition of pump shutdown, control the imaging device to acquire the first image in real time, perform image segmentation processing on the first image to obtain the second image; the image segmentation processing is used to label the fluid area, background area and pipe area in the image.
[0031] Image segmentation refers to dividing an image into several non-overlapping sub-regions, such that features within the same sub-region have a certain similarity, while features between different sub-regions exhibit significant differences. Image segmentation methods can include, but are not limited to, threshold-based segmentation methods, region-based segmentation methods, edge-based segmentation methods, and deep learning-based segmentation methods.
[0032] Threshold-based segmentation methods: By setting different gray-level thresholds, the gray-level histogram of the image is classified, and pixels with gray-level values within the same range are considered to belong to the same class.
[0033] Region-based segmentation methods: Region growing starts from a known point and forms a region by combining neighboring points similar to the known point according to the similarity criterion; Split-merge method first divides the image into regular regions, and then splits regions with different characteristics and merges neighboring regions with the same characteristics according to the similarity criterion.
[0034] Edge-based segmentation methods first extract the region boundaries, then determine the regions defined by the boundaries, involving two parts: edge detection and edge connection. By detecting edge points in the image and linking them into contours according to a certain strategy, a segmented region is formed.
[0035] Deep learning-based segmentation methods utilize convolutional neural networks (CNNs) to automatically learn high-level features in images, achieving pixel-level dense prediction. For example, fully convolutional networks (FCNs) convert traditional CNNs into a fully convolutional form, suitable for image segmentation tasks. The classic semantic segmentation model (U-Net), based on an improved FCN, features a symmetric encoder-decoder architecture and skip connections, enabling accurate recovery of image details while maintaining efficient feature extraction, achieving high-precision image segmentation. Instance segmentation models (Mask R-CNN, Faster R-CNN) can accurately detect and label targets in images.
[0036] Furthermore, image closing operations can be performed on the second image to remove edge burrs and isolated noise, resulting in smoother and more accurate region contours in the second image. Image closing operations can include dilation operations to expand the boundaries of fluid regions and fill in small internal voids.
[0037] Optionally, the imaging device can be installed at a location that simultaneously captures the fluid at the pipe outlet and in the horizontal tank, facilitating accurate capture of the fluid outflow from the pipe outlet. The imaging device can be a high-speed industrial camera, enabling non-contact measurement and completely avoiding the risk of equipment damage caused by fluid corrosion or impurity blockage. Furthermore, the imaging device and the system for image and data processing can achieve continuous automatic detection around the clock. Compared to traditional manual inspection, this not only significantly reduces labor costs but also avoids subjective misjudgments caused by personnel fatigue and differences in experience, ensuring the accuracy and continuity of data collection.
[0038] Furthermore, explosion-proof light sources can be symmetrically arranged on both sides of the imaging device to provide uniform and stable illumination to the imaging area, overcoming the influence of ambient light variations and ensuring image quality. The core hardware of this invention requires only a high-speed industrial camera and explosion-proof light sources, reducing the need for complex pipeline modifications and calibration compared to traditional measuring instruments such as electromagnetic flowmeters and ultrasonic sensors. The equipment is easy to install and debug, and subsequent maintenance only requires periodic lens cleaning and algorithm model updates, resulting in lower costs than traditional sensors.
[0039] S120. If there is a fluid region in the second image, then perform image preprocessing on the second image to obtain a third image; the image preprocessing includes the removal of background regions and pipe regions.
[0040] The fluid region can be understood as the area formed by fluid flowing out from the outlet of the elevated channel pipe to the horizontal channel of the elevated channel. The third image can be understood as the second image retaining only the fluid region.
[0041] Specifically, image preprocessing of the second image to obtain the third image may include: converting the pixel data of the second image into color data in the HSV color space; for the background region's color data being within a first color threshold range and the pipeline region's color data being within a second color threshold range, the background region can be extracted from the color data using the first color threshold range to create a first mask data, and the pipeline region can be extracted from the color data using the second color threshold range to create a second mask data; merging the first mask data and the second mask data to form a third mask data, and optimizing the third mask data through morphological operations to form a fourth mask data; applying the fourth mask data to the second image to remove the background region and the pipeline region to obtain the third image.
[0042] In this embodiment, optionally, image preprocessing of the second image to obtain the third image may include steps A1-A2:
[0043] Step A1: Obtain the reference image, which is an image with the background area and the pipe area marked.
[0044] Specifically, obtaining the reference image may include: under the first working condition, controlling the imaging device to acquire multiple fourth images, performing image segmentation processing on the fourth images to obtain the reference image; the first working condition is the condition where there is no fluid flow at the pipe outlet.
[0045] Specifically, after acquiring multiple fourth images, a weighted average method can be used to convert the fourth images to grayscale. This is done by summing the RGB channels of the color image according to different weights, thus converting it into a grayscale image. A filtering algorithm is then used to denoise the grayscale image, removing noise while preserving the edge information of the background and pipe regions to avoid edge blurring. Next, image enhancement techniques are used to improve the image contrast and expand the grayscale dynamic range of the image, making the boundaries of the background and pipe regions clearer and more distinguishable, thereby obtaining an updated second image. This allows for subsequent pixel-level comparison between the updated second image and the baseline image to obtain the third image.
[0046] Step A2: Perform pixel-level difference comparison between the second image and the reference image to obtain the third image.
[0047] Specifically, if both the second image and the reference image are grayscale images, the pixel values (grayscale values) at corresponding positions in the second and reference images can be subtracted. When the difference exceeds a preset difference threshold, it is determined to be a difference pixel, and a difference mask image, i.e., the third image, is finally generated. The difference mask image can be understood as an image described using two colors of pixels: one color represents the difference region, and the other color represents the similar region, thereby distinguishing the fluid region.
[0048] The subtraction of pixel values at corresponding positions in the second image and the reference image can include: calculating the absolute value of the difference between corresponding pixel values in the two images, which can be expressed as:
[0049] ;
[0050] Where A(x,y) and B(x,y) are the pixel values of the second image and the reference image at position (x,y), respectively.
[0051] If both the second image and the reference image are RGB images, the similarity of pixel values at corresponding positions in the second image and the reference image can be calculated using Euclidean distance or Mahalanobis distance. The larger the distance value, the smaller the similarity. That is, when the calculated distance value is greater than the preset distance threshold, it is determined to be a difference pixel, and finally a difference mask image, the third image, is generated.
[0052] Optionally, before performing pixel-level difference comparison between the second image and the reference image, key feature points of the second image and the reference image can be matched using feature algorithms such as SIFT and ORB, aligning one image to the coordinate system of the other image. This avoids the problem of misjudgment of differences due to slight displacement, rotation, or scaling between the second image and the reference image, and improves the accuracy of difference localization.
[0053] In this embodiment of the invention, a reference image marked with a background area and a pipe area is obtained; by comparing the second image and the reference image at the pixel level, the background area and pipe area can be removed more specifically, making the obtained third image representing the fluid area more accurate.
[0054] S130. Determine the width of the fluid region based on the third image, and determine the flow status based on the width of the region; there is a preset correlation between the width of the region and the flow status.
[0055] The region width can be understood as the width of the fluid region in the first direction, which is perpendicular to the fluid flow direction.
[0056] Specifically, determining the region width of the fluid region based on the third image may include steps B1-B2:
[0057] Step B1: Determine the first pixel data of the fluid region in the third image corresponding to the first direction; the first direction is the direction perpendicular to the fluid flow direction.
[0058] Step B2: Determine the width of the fluid region based on the first pixel data.
[0059] Specifically, there is a first correlation between the first pixel data and the region width. Based on the first correlation and the first pixel data, the region width of the fluid region is determined.
[0060] Further determination of the region width of the fluid region based on the first pixel data may include: obtaining the second pixel data corresponding to the inner diameter of the pipe region in the second image, and obtaining the physical inner diameter of the pipe outlet; determining a scaling parameter based on the physical inner diameter and the second pixel data; and determining the region width of the fluid region by multiplying the scaling parameter and the first pixel data.
[0061] The physical inner diameter can be understood as the actual inner diameter of the pipe outlet.
[0062] Specifically, if there is a second correlation between the physical inner diameter and the second pixel data and the scaling parameter, then the scaling parameter is determined based on the second correlation, the physical inner diameter, and the second pixel data. Alternatively, determining the scaling parameter based on the physical inner diameter and the second pixel data can also include determining the ratio of the physical inner diameter to the second pixel data as the scaling parameter.
[0063] Optionally, determining the traffic status based on the region width may include: identifying the region width based on a traffic status determination model to determine the traffic status; the traffic status determination model is used to describe different traffic statuses corresponding to different region width ranges. The traffic status determination model can be a neural network model built using machine learning methods. The traffic status determination model of this invention can subdivide the traffic status into multiple levels, providing richer status information.
[0064] The technical solution of this invention, under pump shutdown conditions, controls an imaging device to acquire a first image in real time, performs image segmentation processing on the first image to obtain a second image; the image segmentation processing is used to label the fluid region, background region, and pipe region in the image to achieve accurate segmentation of the fluid region, background region, and pipe region, facilitating subsequent accurate extraction of the physical features of the fluid. Further, if a fluid region exists in the second image, the second image is preprocessed to obtain a third image; the image preprocessing includes removing the background region and pipe region, achieving accurate segmentation of the background region and pipe region in the second image to retain the fluid region, thereby determining the region width of the fluid region based on the third image, and determining the flow state based on the region width; there is a preset correlation between the region width and the flow state, solving the difficulty of real-time detection of the flow state at the pipe outlet under pump shutdown conditions, and achieving accurate detection of the flow state at the pipe outlet under pump shutdown conditions.
[0065] Example 2
[0066] Figure 2 This is a flowchart of another method for evaluating the flow rate of an elevated trough provided by an embodiment of the present invention. The technical solution of this embodiment further optimizes the process of S130 in the aforementioned embodiments based on the above embodiments. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the methods for evaluating the flow rate of elevated troughs include:
[0067] S210. Under the condition of pump shutdown, control the imaging device to acquire the first image in real time, perform image segmentation processing on the first image to obtain the second image; the image segmentation processing is used to label the fluid area, background area and pipe area in the image.
[0068] S220. If there is a fluid region in the second image, then perform image preprocessing on the second image to obtain a third image; the image preprocessing includes the removal of background regions and pipe regions.
[0069] S230. Determine the region width of the fluid region based on the third image, and determine the flow state based on the region width. The region width range and the flow state have a preset correspondence.
[0070] Specifically, the traffic status is determined based on a preset correspondence and the area width. That is, different area width ranges correspond to a traffic status. The preset correspondence determines which area width range the area width falls into, thereby determining the corresponding traffic status.
[0071] Optionally, the preset correspondence may include a first correspondence, a second correspondence, a third correspondence, a fourth correspondence, a fifth correspondence, a sixth correspondence, and a seventh correspondence;
[0072] The first correspondence is the correspondence between the width range of the first region and the interruption state; the width range of the first region is from zero to the first width threshold.
[0073] The second correspondence is the correspondence between the width range of the second region and the line flow state; the width range of the second region is from the first width threshold to the second width threshold.
[0074] The third correspondence is the correspondence between the width range of the third region and the width state of the chopsticks; the width range of the third region is from the second width threshold to the third width threshold;
[0075] The fourth correspondence is the correspondence between the width range of the fourth region and the one-finger width state; the width range of the fourth region is from the third width threshold to the fourth width threshold.
[0076] The fifth correspondence is the correspondence between the width range of the no region and the two-finger width state; the width range of the fifth region is from the fourth width threshold to the fifth width threshold;
[0077] The sixth correspondence is the correspondence between the width range of the sixth region and the three-finger width state; the width range of the sixth region is from the fifth width threshold to the sixth width threshold;
[0078] The seventh correspondence is the correspondence between the width range of the seventh region and the full flow status; the width range of the seventh region is the range where the region width is greater than the sixth width threshold; the full flow status can be understood as the status corresponding to the normal flow at the pipeline outlet after the pump is turned on.
[0079] The first width threshold is less than the second width threshold, the second width threshold is less than the third width threshold, the third width threshold is less than the fourth width threshold, the fourth width threshold is less than the fifth width threshold, and the fifth width threshold is less than the sixth width threshold.
[0080] Exemplarily, the first width threshold can be 0.01 cm, the second width threshold can be 0.1 cm, the third width threshold can be 0.4 cm, the fourth width threshold can be 1.5 cm, the fifth width threshold can be 2.5 cm, and the sixth width threshold can be 3.5 cm. Determining the flow state based on the preset correspondence and the regional width D can be as follows: If D < 0.01 cm, the flow state is a cut-off state; if 0.01 cm < D < 0.1 cm, the flow state is a linear flow state; if 0.1 cm < D < 0.4 cm, the flow state is a chopstick-width state; if 0.4 cm < D < 1.5 cm, the flow state is a finger-width state; if 1.5 cm < D < 2.5 cm, the flow state is a two-finger-width state; if 2.5 cm < D < 3.5 cm, the flow state is a three-finger-width state; if D > 3.5 cm, it is a full-flow state.
[0081] In addition, the present invention may further include a display module and an alarm module. The display module is used to display in real time data such as the flow state, the state duration, the original picture, the segmented image, etc. The image data and the data after water flow segmentation can also be uploaded to the monitoring center, facilitating the staff to remotely monitor the flow condition of the elevated trough. The alarm module can trigger an audible and visual alarm according to the set program benchmark, and the set program benchmark can be the warning information corresponding to the flow state. The method for evaluating the flow of the elevated trough of the present invention can also be used to monitor the flow condition of the fluid under the pump-on condition.
[0082] In the technical solution of the embodiment of the present invention, under the pump-off condition, the shooting device is controlled to collect the first image in real time, and the first image is subjected to image segmentation processing to obtain the second image; the image segmentation processing is used to label the fluid region, the background region, and the pipeline region in the image. If there is a fluid region in the second image, the second image is subjected to image preprocessing to obtain the third image; the image preprocessing includes operations of removing the background region and the pipeline region. The regional width of the fluid region is determined based on the third image, and the flow state is determined based on the regional width. There is a preset correspondence between the regional width range and the flow state. By introducing the preset correspondence between the regional width range and the flow state, multi-level precise monitoring of the flow state is realized, the difficulty of real-time detection of the flow state at the pipeline outlet under the pump-off state is solved, and precise detection of the flow state at the pipeline outlet under the pump-off state is realized.
[0083] Embodiment III
[0084] Figure 3 It is a schematic structural diagram of an elevated trough flow evaluation device provided by an embodiment of the present invention. This embodiment is applicable to the situation of evaluating the outlet flow state of the elevated trough pipeline. The elevated trough flow evaluation device can be implemented in the form of hardware and / or software, and the elevated trough flow evaluation device can be configured in any electronic device with network communication functions. Such as Figure 3As shown, the elevated trough flow assessment device includes:
[0085] The image acquisition module 310 is used to control the imaging device to acquire a first image in real time when the pump is stopped, and to perform image segmentation processing on the first image to obtain a second image; the image segmentation processing is used to label the fluid area, background area and pipe area in the image.
[0086] The image processing module 320 is used to perform image preprocessing on the second image to obtain a third image if a fluid region exists in the second image; the image preprocessing includes removing background regions and pipe regions;
[0087] The detection module 330 is used to determine the width of the fluid region based on the third image, and to determine the flow rate status based on the width of the region; there is a preset correlation between the width of the region and the flow rate status.
[0088] Based on the above embodiments, optionally, the image processing module includes: an image acquisition unit, used to acquire a reference image, the reference image being an image marked with a background area and a pipe area; and a comparison unit, used to perform pixel-level difference comparison between the second image and the reference image to obtain a third image.
[0089] Based on the above embodiments, optionally, the image acquisition unit is used to: control the shooting device to acquire multiple fourth images under a first working condition, perform image segmentation processing on the fourth images to obtain a reference image; the first working condition is a condition in which there is no fluid flow at the pipe outlet.
[0090] Based on the above embodiments, optionally, the detection module includes a width determination unit, which is used to: determine first pixel data of the fluid region in the third image corresponding to a first direction; the first direction is a direction perpendicular to the fluid flow direction; and determine the region width of the fluid region based on the first pixel data.
[0091] Based on the above embodiments, optionally, the width determination unit is further configured to: acquire second pixel data corresponding to the inner diameter of the pipe region in the second image, and acquire the physical inner diameter of the pipe outlet; determine a scaling parameter based on the physical inner diameter and the second pixel data; and determine the product of the scaling parameter and the first pixel data as the region width of the fluid region.
[0092] Optionally, based on the above embodiments, determining a ratio parameter based on the physical inner diameter and the second pixel data includes: determining the ratio of the physical inner diameter to the second pixel data as a ratio parameter.
[0093] Based on the above embodiments, optionally, the detection module includes a first flow state determination unit, which is used to: identify the region width based on the flow state determination model and determine the flow state; the flow state determination model is used to describe different flow states corresponding to different region width ranges.
[0094] Based on the above embodiments, optionally, the area width range has a preset correspondence with the traffic status, and the detection module includes a second traffic status determination unit, which is used to: determine the traffic status based on the preset correspondence and the area width.
[0095] Based on the above embodiments, optionally, the preset correspondence includes a first correspondence, a second correspondence, a third correspondence, a fourth correspondence, a fifth correspondence, a sixth correspondence, and a seventh correspondence; the first correspondence is the correspondence between the width range of a first region and the flow interruption state; the width range of the first region is zero to a first width threshold; the second correspondence is the correspondence between the width range of a second region and the linear flow state; the width range of the second region is from the first width threshold to the second width threshold; the third correspondence is the correspondence between the width range of a third region and the width of a chopstick state; the width range of the third region is from the second width threshold to the third width threshold; the fourth correspondence is the correspondence between the width range of a fourth region and the width of a finger state; the width range of the fourth region is the third width... The width range is from the first width threshold to the fourth width threshold; the fifth correspondence is the correspondence between the width range of the first region and the two-finger width state; the fifth region width range is from the fourth width threshold to the fifth width threshold; the sixth correspondence is the correspondence between the width range of the sixth region and the three-finger width state; the sixth region width range is from the fifth width threshold to the sixth width threshold; the seventh correspondence is the correspondence between the width range of the seventh region and the full flow state; the seventh region width range is the range where the region width is greater than the sixth width threshold; the first width threshold is less than the second width threshold, the second width threshold is less than the third width threshold, the third width threshold is less than the fourth width threshold, the fourth width threshold is less than the fifth width threshold, and the fifth width threshold is less than the sixth width threshold.
[0096] Based on the above embodiments, optionally, the imaging device is installed at a position that simultaneously captures the fluid in the pipe outlet and the horizontal tank, and the imaging device is a high-speed industrial camera.
[0097] Based on the above embodiments, optionally, explosion-proof light sources are symmetrically arranged on both sides of the shooting device.
[0098] The elevated trough flow assessment device provided in this embodiment of the invention can execute the elevated trough flow assessment method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.
[0099] Example 4
[0100] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0101] Figure 4 A schematic diagram of an electronic device that can be used to implement the elevated trough flow assessment method of embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0102] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0103] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0104] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the overhead trough flow assessment method.
[0105] In some embodiments, the overhead trough flow assessment method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded into and / or mounted on electronic device 10 via read-only memory (ROM) 12 and / or communication unit 19. When the computer program is loaded into random access memory (RAM) 13 and executed by processor 11, one or more steps of the overhead trough flow assessment method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the overhead trough flow assessment method by any other suitable means (e.g., by means of firmware).
[0106] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0107] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0108] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0109] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0110] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0111] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0112] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0113] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for evaluating the flow rate of an elevated trough, characterized in that, The method includes: When the pump is stopped, the camera is controlled to acquire a first image in real time, and the first image is segmented to obtain a second image; the image segmentation is used to label the fluid area, background area and pipe area in the image. If a fluid region exists in the second image, then the second image is preprocessed to obtain a third image; the image preprocessing includes removing background regions and pipe regions; The width of the fluid region is determined based on the third image, and the flow rate status is determined based on the width of the region; there is a preset correlation between the width of the region and the flow rate status.
2. The method according to claim 1, characterized in that, The second image is preprocessed to obtain the third image, including: Obtain a reference image, which is an image marked with a background area and a pipe area; The second image and the reference image are compared at the pixel level to obtain the third image.
3. The method according to claim 2, characterized in that, Obtain the baseline image, including: In the first operating condition, the camera is controlled to capture multiple fourth images, and the fourth images are processed by image segmentation to obtain a reference image; the first operating condition is when there is no fluid flow at the pipe outlet.
4. The method according to claim 1, characterized in that, Determining the region width of the fluid region based on the third image includes: Determine the first pixel data in the third image corresponding to the fluid region in the first direction; the first direction is a direction perpendicular to the fluid flow direction. The width of the fluid region is determined based on the first pixel data.
5. The method according to claim 4, characterized in that, Determining the region width of the fluid region based on the first pixel data includes: Obtain the second pixel data corresponding to the inner diameter of the pipe region in the second image, and obtain the physical inner diameter of the pipe outlet; The proportional parameters are determined based on the physical inner diameter and the second pixel data; The product of the scaling parameter and the first pixel data is determined as the width of the fluid region.
6. The method according to claim 5, characterized in that, Determining the scaling parameters based on the physical inner diameter and the second pixel data includes: The ratio of the physical inner diameter to the second pixel data is determined as a scaling parameter.
7. The method according to claim 1, characterized in that, Determining the traffic status based on the area width includes: The region width is identified based on the flow state determination model to determine the flow state; the flow state determination model is used to describe different flow states corresponding to different region width ranges.
8. The method according to claim 1, characterized in that, The region width range has a preset correspondence with the traffic status. Determining the traffic status based on the region width includes: Based on the preset correspondence and the region width, the traffic status is determined.
9. The method according to claim 8, characterized in that, The preset correspondence includes a first correspondence, a second correspondence, a third correspondence, a fourth correspondence, a fifth correspondence, a sixth correspondence, and a seventh correspondence. The first correspondence is the correspondence between the width range of the first region and the interruption state; the width range of the first region is from zero to the first width threshold. The second correspondence is the correspondence between the width range of the second region and the state of the line flow; The width range of the second region is from the first width threshold to the second width threshold; The third correspondence is the correspondence between the width range of the third region and the width state of the chopsticks; the width range of the third region is from the second width threshold to the third width threshold; The fourth correspondence is the correspondence between the width range of the fourth region and the one-finger width state; the width range of the fourth region is from the third width threshold to the fourth width threshold. The fifth correspondence is the correspondence between the width range of the no region and the two-finger width state; the width range of the fifth region is from the fourth width threshold to the fifth width threshold; The sixth correspondence is the correspondence between the width range of the sixth region and the three-finger width state; the width range of the sixth region is from the fifth width threshold to the sixth width threshold; The seventh correspondence is the correspondence between the width range of the seventh region and the full flow status; the width range of the seventh region is the range where the region width is greater than the sixth width threshold. The first width threshold is less than the second width threshold, the second width threshold is less than the third width threshold, the third width threshold is less than the fourth width threshold, the fourth width threshold is less than the fifth width threshold, and the fifth width threshold is less than the sixth width threshold.
10. The method according to claim 1, characterized in that, The imaging device is installed at a position that simultaneously captures the fluid at the pipe outlet and in the horizontal tank, and the imaging device is a high-speed industrial camera.
11. The method according to claim 10, characterized in that, The shooting equipment has explosion-proof light sources arranged symmetrically on both sides.
12. A device for assessing the flow rate of an elevated trough, characterized in that, The device includes: The image acquisition module is used to control the imaging device to acquire a first image in real time when the pump is stopped, and to perform image segmentation processing on the first image to obtain a second image; the image segmentation processing is used to label the fluid area, background area and pipe area in the image; An image processing module is used to preprocess the second image to obtain a third image if a fluid region exists in the second image; the image preprocessing includes removing background regions and pipe regions. The detection module is used to determine the width of the fluid region based on the third image, and to determine the flow rate status based on the width of the region; there is a preset correlation between the width of the region and the flow rate status.
13. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the elevated trough flow assessment method according to any one of claims 1-11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the elevated trough flow assessment method according to any one of claims 1-11.
15. A computer program product comprising a computer program that, when executed by a processor, implements the elevated trough flow assessment method according to any one of claims 1-11.