A liquid level detection system and method based on machine vision
By integrating the coaxial optical path of the machine vision system, the reliability and efficiency of liquid level detection have been improved, solving the problems of imaging difficulties and simultaneous information recognition in traditional liquid level detection, and meeting the real-time and data traceability requirements of the pharmaceutical and biomedical fields.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-11
- Publication Date
- 2026-03-31
AI Technical Summary
Traditional liquid level detection technologies have difficulty imaging in transparent liquids and highly reflective containers, and cannot simultaneously achieve liquid level measurement and container information identification, resulting in a high misjudgment rate and poor measurement consistency, which cannot meet the real-time and data traceability requirements of the pharmaceutical and biomedical fields.
A machine vision-based liquid level detection system is adopted. By integrating the coaxial optical path of the trigger control module, laser module, supplementary lighting module, turning optical path module and image acquisition module, a back laser beam is generated and directional supplementary lighting is performed to capture the liquid surface contour line and the front features of the container, so as to realize the synchronous execution of liquid level measurement and information recognition.
It improves the reliability and efficiency of liquid level detection, reduces the false judgment rate, and realizes the synchronous identification of liquid level measurement and container information, meeting the real-time and data traceability requirements of the pharmaceutical and biomedical fields.
Smart Images

Figure CN121089861B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation inspection, and more particularly to a liquid level detection system and method based on machine vision. Background Technology
[0002] Traditional liquid level detection technologies include contact, non-contact, and manual visual inspection methods, but all have significant technical bottlenecks. Contact detection requires direct contact with the liquid, making the mechanical structure prone to jamming and wear, resulting in high maintenance costs. Among non-contact methods, ultrasonic methods are affected by temperature drift, liquid surface fluctuations, and foam interference, making it difficult to achieve high accuracy over a large range. Manual visual inspection suffers from subjective judgment differences, resulting in insufficient measurement consistency and repeatability. In fields such as pharmaceuticals and biomedicine, the above technologies cannot meet the requirements of real-time process control, data traceability, and continuous production. Therefore, machine vision liquid level detection technology is currently commonly used as the core means of non-contact measurement in industrial automation. By quantifying the liquid level through image processing, it has been widely applied in fields such as biomedicine, pharmaceuticals, petrochemicals, and food and beverage.
[0003] However, in machine vision liquid level detection, the optical properties of the liquid surface make imaging difficult: transparent liquids are unrecognizable due to weak light reflection, and the strong reflection of highly reflective containers (such as glass bottles) obscures the true liquid level (false positive rate >20%); container characteristics introduce interference, the lens effect produced by the cross-section of cylindrical or spherical containers distorts the background markings, and scratches, stains and bubbles on the container walls are easily misjudged as the edge of the liquid surface; image information is usually limited to liquid level height detection, and the algorithm mainly focuses on the location and calculation of the liquid level line, failing to effectively extract and analyze other information contained in the image (such as sample barcodes). Summary of the Invention
[0004] This invention provides a machine vision-based liquid level detection system and method to achieve simultaneous execution of liquid level measurement and frontal information recognition, thereby improving the reliability and efficiency of liquid level detection.
[0005] According to one aspect of the present invention, a machine vision-based liquid level detection system is provided. The system includes a trigger control module, a laser module, a supplementary lighting module, a deflection optical path module, a container sample rack, and an image acquisition module. The laser module is located on the back of the container sample rack; the supplementary lighting module is located on the front of the container sample rack; the image acquisition module is located on the reflected optical path of the deflection optical path module; and the trigger control module is pulse-connected to the laser module, the supplementary lighting module, and the image acquisition module, respectively.
[0006] The trigger control module is used to send pulse signals to the laser module, the supplementary lighting module and the image acquisition module respectively when a candidate container in the container sample rack is detected to enter the container detection area;
[0007] The laser module is used to generate a back laser beam when the pulse signal is detected;
[0008] The supplementary lighting module is used to provide directional supplementary lighting to the surface barcode of the candidate container based on a preset angle when the pulse signal is detected.
[0009] The deflection optical path module is used to reflect the back laser beam to the back of the candidate container to form the liquid surface outline of the candidate container and to reflect the surface barcode.
[0010] The image acquisition module is used to simultaneously capture the liquid surface contour line and the surface barcode when the pulse signal is detected, so as to obtain the target liquid level image of the candidate container.
[0011] According to another aspect of the present invention, a machine vision-based liquid level detection method is provided, applicable to any machine vision-based liquid level detection system provided in the embodiments of the present invention; the liquid level detection system includes a trigger control module, a laser module, a supplementary lighting module, a deflection optical path module, a container sample rack, and an image acquisition module; the laser module is located on the back of the container sample rack; the supplementary lighting module is located on the front of the container sample rack; the image acquisition module is located on the reflected optical path of the deflection optical path module; the trigger control module is pulse-connected to the laser module, the supplementary lighting module, and the image acquisition module respectively; the method includes:
[0012] When the trigger control module detects a candidate container in the container sample rack entering the container detection area, it sends pulse signals to the laser module, the supplementary lighting module, and the image acquisition module, respectively.
[0013] When the laser module detects the pulse signal, it generates a back-facing laser beam.
[0014] When the pulse signal is detected, the supplementary lighting module applies directional supplementary lighting to the surface barcode of the candidate container based on a preset angle.
[0015] The back laser beam is reflected to the back of the candidate container through the deflection optical path module, forming the liquid surface outline of the candidate container and reflecting the surface barcode.
[0016] When the pulse signal is detected, the image acquisition module simultaneously captures the liquid surface outline and the surface barcode to obtain the target liquid level image of the candidate container.
[0017] The machine vision-based liquid level detection system of the present invention includes a trigger control module, a laser module, a supplementary lighting module, a deflection optical path module, a container sample rack, and an image acquisition module. The laser module is located on the back of the container sample rack; the supplementary lighting module is located on the front of the container sample rack; the image acquisition module is located on the reflected optical path of the deflection optical path module; the trigger control module is pulse-connected to the laser module, the supplementary lighting module, and the image acquisition module respectively; the trigger control module is used to send pulse signals to the laser module, the supplementary lighting module, and the image acquisition module respectively when a candidate container in the container sample rack is detected to enter the container detection area; the laser module is used to generate a back laser beam when the pulse signal is detected; the supplementary lighting module is used to provide directional supplementary lighting to the surface barcode of the candidate container based on a preset angle when the pulse signal is detected; the deflection optical path module is used to reflect the back laser beam to the back of the candidate container to form the liquid surface contour line of the candidate container and the reflected surface barcode; the image acquisition module is used to simultaneously capture the liquid surface contour line and the surface barcode when the pulse signal is detected to obtain the target liquid level image of the candidate container. The above scheme integrates coaxial optical paths, allowing a single frame image to simultaneously contain the liquid surface outline and the front features of the container, enabling the synchronous execution of liquid level measurement and front information recognition, thus improving the reliability and efficiency of liquid level detection.
[0018] 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
[0019] Figure 1 This is a structural block diagram of a machine vision-based liquid level detection system provided in an embodiment of the present invention.
[0020] Figure 2 This is an example image of the target liquid level provided in an embodiment of the present invention;
[0021] Figure 3 This is a hardware architecture diagram of a machine vision-based liquid level detection system provided in an embodiment of the present invention.
[0022] Figure 4 This is a flowchart of a machine vision-based liquid level detection method provided in an embodiment of the present invention. Detailed Implementation
[0023] 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.
[0024] 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.
[0025] Figure 1 This is a structural block diagram of a machine vision-based liquid level detection system provided in an embodiment of the present invention. This embodiment is applicable to the automated liquid level detection of different containers. See also... Figure 1 In this embodiment of the invention, the machine vision-based liquid level detection system may include a trigger control module 10, a laser module 20, a supplementary lighting module 40, a deflection optical path module 30, a container sample rack 50, and an image acquisition module 60; the laser module 20 is located on the back of the container sample rack 50; the supplementary lighting module 40 is located on the front of the container sample rack 50; the image acquisition module 60 is located on the reflected optical path of the deflection optical path module 30; the trigger control module 10 is pulse-connected to the laser module 20, the supplementary lighting module 40, and the image acquisition module 60 respectively.
[0026] The trigger control module 10 is used to send pulse signals to the laser module 20, the supplementary light module 40 and the image acquisition module 60 respectively when a candidate container in the container sample rack 50 is detected to enter the container detection area.
[0027] In this context, "candidate container" refers to a transparent / semi-transparent container currently in the container sample rack awaiting liquid level detection. The container detection area is set based on actual conditions or empirical values, specifically determined by the trigger control module. A pulse signal is a brief electrical signal used to control the start, stop, or operation of other devices.
[0028] Laser module 20 is used to generate a back laser beam when a pulse signal is detected.
[0029] Among them, the back-facing laser beam refers to the laser beam generated on the back of the candidate container.
[0030] It should be noted that this laser module can use a 650nm wavelength semiconductor laser and be equipped with a wave-shaped cylindrical mirror group to generate a narrow linewidth line laser.
[0031] The supplementary lighting module 40 is used to provide directional supplementary lighting to the surface barcode of the candidate container based on a preset angle when a pulse signal is detected.
[0032] The preset angle is determined through extensive experimentation and by human intervention based on actual conditions or experience; this application does not impose specific limitations on this aspect. A surface barcode refers to a barcode (or QR code) directly printed, engraved, or affixed to the surface of a container; such barcodes can be used to track, identify, and manage relevant information about the container.
[0033] For example, when the supplementary lighting module 40 detects a pulse signal, it uses a high color rendering LED (Light Emitting Diode) array to provide directional supplementary lighting to the surface barcode of the candidate container at a 45-degree tilt angle. The supplementary lighting intensity is adjustable in the range of 500-1500 lux, ensuring that the barcode and container structural features are clearly imaged in a strong backlight environment.
[0034] The deflection optical path module 30 is used to reflect the back laser beam to the back of the candidate container to form the liquid surface outline of the candidate container and the barcode on the reflective surface.
[0035] Among them, the liquid surface contour line refers to the obvious deflection contour line that appears on the surface of the container when the laser beam is projected due to the difference in refractive index between air and liquid at the liquid surface.
[0036] The image acquisition module 60 is used to simultaneously capture the liquid surface contour line and surface barcode when a pulse signal is detected, so as to obtain the target liquid level image of the candidate container.
[0037] The target liquid level image refers to a fused image of the liquid surface outline and the surface barcode; for example, see... Figure 2 Barcode.
[0038] In this embodiment of the invention, the trigger control module 10 is used to send pulse signals to the laser module 20, the supplementary lighting module 40, and the image acquisition module 60 respectively when a candidate container in the container sample rack 50 is detected to enter the container detection area; the laser module 20 is used to generate a back laser beam when the pulse signal is detected; the supplementary lighting module 40 is used to provide directional supplementary lighting to the surface barcode of the candidate container based on a preset angle when the pulse signal is detected; the deflection optical path module 30 is used to reflect the back laser beam to the back of the candidate container to form the liquid surface contour line of the candidate container and the reflected surface barcode; the image acquisition module 60 is used to simultaneously capture the liquid surface contour line and the surface barcode when the pulse signal is detected to obtain the target liquid level image of the candidate container. This scheme, through coaxial optical path integration, allows a single frame image to simultaneously contain the liquid surface contour line and the front features of the container, achieving synchronous execution of liquid level measurement and front information recognition, thus improving the reliability and efficiency of liquid level detection.
[0039] Optional, see Figure 3 The optical path module 30 includes a first reflector 2 and a second reflector 7; the first reflector 2 is located on the back of the container sample holder; the second reflector 7 is located on the front of the container sample holder; the first reflector is used to receive the back laser beam and project the back laser beam onto the back of the candidate container 9 to form the liquid surface outline of the candidate container 9; the second reflector 7 is used to reflect the surface barcode 8.
[0040] For further details, please refer to [link / reference]. Figure 3 The reflected light paths of the first reflector 2 and the second reflector 7 converge coaxially after being turned; the camera target surface of the image acquisition module 60 is located at the focal plane of the coaxial light path formed by the first reflector 2 and the second reflector 7; the image acquisition module 60 is specifically used to capture the liquid surface contour line and the surface barcode simultaneously in a single exposure according to the preset exposure time when the pulse signal is detected, so as to obtain the target liquid level image of the candidate container 9.
[0041] For example, see [link to previous article] Figure 3 Laser module 1 generates a laser beam; the laser beam is projected onto the back of candidate container 9 via first reflector 2. Due to the difference in refractive index between air and liquid, a distinct deflection contour line appears on the surface of candidate container 9 at the liquid surface, forming the liquid surface contour line of candidate container 9; supplementary lighting module 6 provides directional supplementary lighting to the surface barcode 8 of candidate test tube 9 at a 45-degree tilt angle; second reflector 7 receives and reflects the image from the front of the container; first reflector 2 and second reflector 7 are configured with a preset precision folding angle, and after optical adjustment, the dual reflection light paths converge coaxially. At this time, the camera target surface of the image acquisition module is positioned at the focal plane of the coaxial light path, and a single exposure simultaneously captures the liquid surface contour line and the surface barcode, obtaining the target liquid level image of candidate container 9.
[0042] Optional, see below Figure 3The trigger control module includes a photoelectric sensing unit 3 and a beam constraint aperture unit 4; the container sample holder includes a beam through-hole 5; the photoelectric sensing unit 3 is located on the side of the container sample holder; the beam constraint aperture unit 4 is fixed to the photoelectric sensing unit 3; the beam through-hole 5 is located at the bottom of the container sample holder; the photoelectric sensing unit 3 is used to generate and emit a detection beam; wherein, the axis of the detection beam is perpendicular to the forward direction of the candidate container 9; the beam constraint aperture unit 4 is used to limit the beam diameter of the detection beam emitted by the photoelectric sensing unit 3; the beam through-hole 5 is used to ensure that the detection beam passes perpendicularly through the slide rail plane of the container sample holder; the photoelectric sensing unit 3 is also used to determine that the candidate container has entered the container detection area when the detection beam is detected to be blocked, and to send pulse signals to the laser module, the supplementary light module and the image acquisition module respectively.
[0043] The detection beam refers to the laser beam generated by the photoelectric sensor to detect whether a candidate container is located within the container detection area. The beam diameter refers to the diameter or width of the detection beam, used to describe the beam's spread and focusing.
[0044] For further details, please refer to [link / reference]. Figure 3 The photoelectric sensing unit 3 includes a first photoelectric sensor and a second photoelectric sensor; the first photoelectric sensor and the second photoelectric sensor are respectively located on both sides of the slide rail plane of the container sample holder; the first photoelectric sensor is used to generate a detection beam and project the detection beam onto the second photoelectric sensor; the second photoelectric sensor is used to receive the detection beam, and if it does not receive the detection beam, it determines that the detection beam is blocked, and sends pulse signals to the laser module, the supplementary light module and the image acquisition module respectively.
[0045] It should be noted that both the first and second photoelectric sensors are through-beam laser photoelectric switches, and are respectively mounted vertically on both sides of the slide rail plane of the container sample holder.
[0046] For further details, please refer to [link / reference]. Figure 3 The beam constraint aperture unit 4 includes a first beam constraint aperture and a second beam constraint aperture; the first beam constraint aperture is fixed to the transmitting end of the first photoelectric sensor; the second beam constraint aperture is fixed to the receiving end of the second photoelectric sensor; the first beam constraint aperture is used to limit the beam diameter of the detection beam emitted by the first photoelectric sensor; the second beam constraint aperture is used to limit the beam diameter of the detection beam received by the second photoelectric sensor.
[0047] It should be noted that the aperture diameters of the first beam constraint aperture and the second beam constraint aperture are the same; the aperture diameter is determined based on the moving speed of the candidate container and the preset exposure time of the image acquisition module.
[0048] For example, the aperture of the aperture stop can be determined by the following formula:
[0049]
[0050] Where D refers to the aperture size of the diaphragm, used to control and limit the size of the opening through which the detection beam passes. V refers to the moving speed of the candidate container. t refers to the exposure time of the image acquisition module. δ refers to the tolerance margin, which can be 0.2 mm.
[0051] Optional, see Figure 1 The system also includes an image processing module 70; the image processing module 70 is connected to the image acquisition module 60; the image acquisition module 60 is also used to transmit the target liquid level image to the image processing module 70 after obtaining the target liquid level image; the image processing module 70 is used to parse the target liquid level image to obtain the container identifier and current liquid level height of the candidate container.
[0052] Container identification refers to the relevant markings used to quickly and accurately identify the contents, purpose, and properties of a container. Current liquid level refers to the real-time height of the liquid inside the container, that is, the vertical distance between the liquid surface and the bottom of the container.
[0053] Based on the same inventive concept, a machine vision-based liquid level detection method is provided, applicable to any of the machine vision-based liquid level detection systems provided in the embodiments of this invention. Figure 4 This is a flowchart of a machine vision-based liquid level detection method provided in an embodiment of the present invention. It should be noted that for parts not described in detail in this embodiment, please refer to the relevant descriptions in other embodiments. Figure 4 As shown, the machine vision-based liquid level detection method includes:
[0054] S110. When the trigger control module detects that a candidate container in the container sample rack has entered the container detection area, it sends pulse signals to the laser module, the supplementary light module, and the image acquisition module respectively.
[0055] Optionally, the trigger control module includes a photoelectric sensing unit and a beam constraint aperture unit; the container sample holder includes a beam through-hole; the photoelectric sensing unit is located on the side of the container sample holder; the beam constraint aperture unit is fixed to the photoelectric sensing unit; the beam through-hole is located at the bottom of the container sample holder; correspondingly, a detection beam is generated and emitted by the photoelectric sensing unit; wherein, the axis of the detection beam is perpendicular to the forward direction of the candidate container; the beam constraint aperture unit limits the beam diameter of the detection beam emitted by the photoelectric sensing unit; the beam through-hole ensures that the detection beam passes perpendicularly through the slide rail plane of the container sample holder; when the photoelectric sensing unit detects that the detection beam is blocked, it determines that the candidate container has entered the container detection area and sends pulse signals to the laser module, the supplementary lighting module, and the image acquisition module respectively.
[0056] Specifically, the photoelectric sensing unit includes a first photoelectric sensor and a second photoelectric sensor; the first photoelectric sensor and the second photoelectric sensor are respectively located on both sides of the slide rail plane of the container sample holder; correspondingly, the first photoelectric sensor generates a detection beam and projects the detection beam onto the second photoelectric sensor; the second photoelectric sensor receives the detection beam, and if it does not receive the detection beam, it determines that the detection beam is blocked, and sends pulse signals to the laser module, the supplementary lighting module and the image acquisition module respectively.
[0057] It should be noted that both the first and second photoelectric sensors are through-beam laser photoelectric switches, and are respectively mounted vertically on both sides of the slide rail plane of the container sample holder.
[0058] Specifically, the beam constraint aperture unit includes a first beam constraint aperture and a second beam constraint aperture; the first beam constraint aperture is fixed to the transmitting end of the first photoelectric sensor; the second beam constraint aperture is fixed to the receiving end of the second photoelectric sensor; correspondingly, the beam diameter of the detection beam emitted by the first photoelectric sensor is limited by the first beam constraint aperture; and the beam diameter of the detection beam received by the second photoelectric sensor is limited by the second beam constraint aperture.
[0059] It should be noted that the aperture diameters of the first beam constraint aperture and the second beam constraint aperture are the same; the aperture diameter is determined based on the moving speed of the candidate container and the preset exposure time of the image acquisition module.
[0060] S120: When a pulse signal is detected by the laser module, a back-facing laser beam is generated.
[0061] S130. When a pulse signal is detected by the supplementary lighting module, the surface barcode of the candidate container is illuminated in a directional manner based on a preset angle.
[0062] S140. The back laser beam is reflected to the back of the candidate container through the deflection optical path module, forming the liquid surface outline of the candidate container and the barcode on the reflective surface.
[0063] Optionally, the deflection optical path module includes a first reflector and a second reflector; the first reflector is located on the back of the container sample holder; the second reflector is located on the front of the container sample holder; correspondingly, the first reflector receives the back laser beam and projects the back laser beam onto the back of the candidate container to form the liquid surface outline of the candidate container; the second reflector reflects the surface barcode.
[0064] Furthermore, the reflected light paths of the first and second reflectors converge coaxially after being deflected; the camera target surface of the image acquisition module is located at the focal plane of the coaxial light path formed by the first and second reflectors; correspondingly, when the pulse signal is detected by the image acquisition module, the liquid surface contour line and surface barcode are captured simultaneously in a single exposure according to the preset exposure time, thereby obtaining the target liquid level image of the candidate container.
[0065] S150. When the pulse signal is detected by the image acquisition module, the liquid surface outline and surface barcode are captured simultaneously to obtain the target liquid level image of the candidate container.
[0066] In one optional embodiment, the liquid level detection system further includes an image processing module; the image processing module is communicatively connected to the image acquisition module; correspondingly, after obtaining the target liquid level image through the image acquisition module, the target liquid level image is transmitted to the image processing module; the image processing module parses the target liquid level image to obtain the container identifier of the candidate container and the current liquid level height.
[0067] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A machine vision based liquid level detection system, characterized in that, The trigger control module, the laser module, the light supplement module, the turning light path module, the container sample holder and the image acquisition module; the laser module is located at the back of the container sample holder; the light supplement module is located at the front of the container sample holder; the image acquisition module is located on the reflected light path of the turning light path module; the trigger control module is respectively connected with the laser module, the light supplement module and the image acquisition module; The trigger control module is used for sending pulse signals to the laser module, the light supplement module and the image acquisition module respectively when detecting that the candidate container in the container sample holder enters the container detection area; The laser module is used for generating a back laser beam when identifying the pulse signal; The light supplement module is used for performing directional light supplement on the surface code of the candidate container based on a preset angle when identifying the pulse signal; The turning light path module is used for reflecting the back laser beam to the back of the candidate container to form a liquid surface contour line of the candidate container and reflecting the surface code; The image acquisition module is used for capturing the liquid surface contour line and the surface code simultaneously to obtain a target liquid level image of the candidate container when identifying the pulse signal; The turning light path module includes a first mirror and a second mirror; the first mirror is located at the back of the container sample holder; the second mirror is located at the front of the container sample holder; The first mirror is used for receiving the back laser beam and projecting the back laser beam to the back of the candidate container to form a liquid surface contour line of the candidate container; The second mirror is used for reflecting the surface code; The reflected light paths of the first mirror and the second mirror are coaxially converged after turning; a camera target surface of the image acquisition module is located at a coaxial light path focal plane formed by the first mirror and the second mirror; The image acquisition module is specifically used for capturing the liquid surface contour line and the surface code simultaneously by single exposure according to a preset exposure time to obtain a target liquid level image of the candidate container when identifying the pulse signal.
2. The system of claim 1, wherein, The trigger control module includes a photoelectric sensing unit and a beam constraint diaphragm unit; the container sample holder includes a beam through hole; the photoelectric sensing unit is located at the side of the container sample holder; the beam constraint diaphragm unit is fixed to the photoelectric sensing unit; the beam through hole is located at the bottom of the container sample holder; The photoelectric sensing unit is used for generating and emitting a detection beam; wherein the axis of the detection beam is perpendicular to the advancing direction of the candidate container; The beam constraint diaphragm unit is used for limiting the beam diameter of the detection beam emitted by the photoelectric sensing unit; The beam through hole is used for ensuring that the detection beam vertically passes through the sliding rail plane of the container sample holder; The photoelectric sensing unit is also used for determining that the candidate container enters the container detection area when identifying that the detection beam is blocked, and sending pulse signals to the laser module, the light supplement module and the image acquisition module respectively.
3. The system of claim 2, wherein, The photoelectric sensing unit comprises a first photoelectric sensor and a second photoelectric sensor; the first photoelectric sensor and the second photoelectric sensor are respectively located on two sides of the sliding rail plane of the container sample rack; The first photoelectric sensor is configured to generate a detection light beam and project the detection light beam to the second photoelectric sensor; The second photoelectric sensor is configured to receive the detection light beam and determine that the detection light beam is blocked in the case that the detection light beam is not received, and send a pulse signal to the laser module, the light supplement module and the image acquisition module respectively.
4. The system of claim 3, wherein, The first photoelectric sensor and the second photoelectric sensor are both reflective laser photoelectric switches and are respectively vertically installed on two sides of the sliding rail plane of the container sample rack.
5. The system of claim 3, wherein, The light beam constraint diaphragm unit comprises a first light beam constraint diaphragm and a second light beam constraint diaphragm; the first light beam constraint diaphragm is fixed to the emission end of the first photoelectric sensor; the second light beam constraint diaphragm is fixed to the receiving end of the second photoelectric sensor; The first light beam constraint diaphragm is configured to limit the beam diameter of the detection light beam emitted by the first photoelectric sensor; The second light beam constraint diaphragm is configured to limit the beam diameter of the detection light beam received by the second photoelectric sensor.
6. The system of claim 5, wherein, The diaphragm light transmission aperture of the first light beam constraint diaphragm and the second light beam constraint diaphragm is the same; the diaphragm light transmission aperture is determined according to the moving speed of the candidate container and the preset exposure time of the image acquisition module.
7. The system of claim 1, wherein, The system further comprises an image processing module; the image processing module is in communication connection with the image acquisition module; The image acquisition module is further configured to, after obtaining a target liquid level image, transmit the target liquid level image to the image processing module; The image processing module is configured to analyze the target liquid level image to obtain the container identification and the current liquid level height of the candidate container.
8. A machine vision-based liquid level detection method, characterized by, The application is applied to the liquid level detection system based on machine vision in any one of claims 1-7; the liquid level detection system comprises a trigger control module, a laser module, a light supplement module, a turning light path module, a container sample rack and an image acquisition module; the laser module is located on the back of the container sample rack; the light supplement module is located on the front of the container sample rack; the image acquisition module is located on the reflected light path of the turning light path module; The trigger control module is in pulse connection with the laser module, the light supplement module and the image acquisition module respectively; the method comprises: The trigger control module sends a pulse signal to the laser module, the light supplement module and the image acquisition module respectively when detecting that a candidate container in the container sample rack enters a container detection area; The laser module generates a back laser beam when recognizing the pulse signal; The light supplement module performs directional light supplement on the surface barcode of the candidate container based on a preset angle when recognizing the pulse signal; The turning light path module reflects the back laser beam to the back of the candidate container to form a liquid surface contour line of the candidate container, and reflects the surface barcode. The turning light path module comprises a first reflector and a second reflector; the first reflector is located on the back of the container sample holder; and the second reflector is located on the front of the container sample holder. Correspondingly, the back laser beam is received by the first reflector and projected to the back of the candidate container to form a liquid level profile line of the candidate container; and the surface barcode is reflected by the second reflector; The image acquisition module simultaneously captures the liquid level profile line and the surface barcode when the pulse signal is identified to obtain a target liquid level image of the candidate container. The reflected light paths of the first reflector and the second reflector are coaxially converged after turning; and a camera target surface of the image acquisition module is located at a coaxial light path focal plane formed by the first reflector and the second reflector. Correspondingly, the image acquisition module simultaneously captures the liquid level profile line and the surface barcode according to a preset exposure time in a single exposure to obtain a target liquid level image of the candidate container.
Citation Information
Patent Citations
Self-compensation type laser liquid level measuring system
CN110132374A
Metal liquid level measurement system of non-ferrous metal continuous ingot casting line
CN114061699A