Vision-based ship closed cabin liquid level monitoring method and system
By installing cameras and laser light sources in the enclosed compartments of ships and using computer vision processing technology to construct liquid level models, the problems of inaccurate and time-consuming liquid level measurement in existing technologies have been solved, enabling rapid and accurate liquid level monitoring and early warning.
Patent Information
- Application Number
- CN202410031208.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-09
- Publication Date
- 2026-02-17
AI Technical Summary
Current technologies for measuring liquid levels in enclosed compartments of ships rely on manual labor, which is time-consuming and inaccurate, and cannot meet the rapid and accurate measurement needs of intelligent ships.
A vision-based approach is adopted, which involves installing cameras and laser light sources above the compartment and using computer vision processing technology to construct a feature line extraction model of the boundary between the compartment wall and the liquid surface. Combined with geometric principles, the liquid level is calculated to achieve accurate and rapid extraction and early warning of the liquid level.
It enables rapid and accurate measurement and early warning of liquid levels in enclosed chambers, reducing manual operation time and improving measurement efficiency and accuracy.
Smart Images

Figure CN121540243A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent ship operation and maintenance technology, and more specifically, to a vision-based method and system for monitoring liquid levels in enclosed ship compartments. Background Technology
[0002] As ships develop towards large-scale, high-speed, intelligent, and unmanned operations, the research on intelligent ships is one of the key research areas in the shipbuilding industry, with broad application and development prospects.
[0003] Currently, liquid level measurement in enclosed ship compartments still relies on manual experience and is time-consuming. Therefore, providing an accurate and convenient monitoring system for measuring liquid levels in compartments has become a pressing technical problem to be solved in the field of intelligent ship operation and maintenance. Summary of the Invention
[0004] In view of the shortcomings of existing technologies, a vision-based method and system for monitoring liquid levels in enclosed ship compartments is proposed. This invention utilizes one or more cameras installed on the upper part of the compartment and relies on computer vision processing technology to construct a visual model for extracting the feature lines of the boundary between the compartment wall and the liquid surface, thereby achieving accurate and rapid extraction of liquid levels and enabling effective early warning and monitoring of liquid levels in the compartment.
[0005] The technical means employed in this invention are as follows: A vision-based method for monitoring liquid levels in enclosed ship compartments, comprising: S1. A laser is emitted at a certain angle to the liquid surface through a laser light source located above the liquid surface; an image acquisition device located above the liquid surface is used to capture an image of the liquid surface, and the liquid surface image includes the incident light spot generated by the laser irradiating the liquid surface; S2. Obtain the intrinsic parameters and installation position parameters of the image acquisition device, obtain the coordinates of the center point of the light spot in the liquid surface image through image processing technology, and input the coordinates of the center point of the light spot, the intrinsic parameters of the image acquisition device, and the installation position parameters into the preset liquid level calculation model to obtain the liquid level height. S3. The liquid level data is uploaded to the ship server, and the ship server provides early warnings on the liquid volume and level value of the enclosed compartment based on the liquid level data and the pre-stored tank capacity table information.
[0006] Furthermore, the optical axis of the video acquisition device is perpendicular to the liquid surface when the ship is stationary, and the laser light source is on the same plane as the optical axis of the video acquisition device.
[0007] Furthermore, the coordinates of the center point of the light spot in the liquid surface image are obtained through image processing techniques, including: The liquid surface image containing the incident light spot is segmented using adaptive thresholding; The Canny operator is used to perform edge detection on the light spot, thereby obtaining the coordinates of the center point of the light spot.
[0008] Furthermore, the Canny operator is used to perform edge detection on the light spot, thereby obtaining the coordinates of the center point of the light spot, including: First, find the bounding rectangle of the incident light spot's edge image; The coordinates of the center point can be easily determined from the circumscribed rectangle.
[0009] Furthermore, the preset liquid level calculation model is as follows:
[0010] Where H is the height of the enclosed chamber, h is the height of the liquid level in the chamber, x is the coordinates of the center point of the spot formed by the intersection of the laser beam and the liquid surface, and the distance from the origin of the image, f is the focal length of the lens of the image acquisition device, α is the angle between the incident light source and the horizontal plane, and R is the distance between the mounting point of the image acquisition device and the laser light source.
[0011] Furthermore, the preset liquid level calculation model is as follows: Three laser light sources are evenly distributed around the image acquisition device and illuminate the liquid surface at an angle of 120° to the liquid surface. This results in three incident points of the laser beam on the liquid surface. The height of the liquid surface is calculated based on the area of the triangle formed by the three light sources and the area of the triangle formed by the three incident points.
[0012] Furthermore, S2 also includes: Liquid level height data is obtained from three consecutive frames of liquid surface images. If the output of three consecutive detections is not the same liquid level height, the detection continues. When the output of three consecutive static detections is the same liquid level height, the static detection considers that the liquid level has reached this height.
[0013] Furthermore, if the detected liquid level is greater than the set value, the detection continues; if the detected liquid level is less than the set value, the shaking begins and the dynamic detection process begins.
[0014] This invention also discloses a vision-based liquid level monitoring system for enclosed ship compartments, comprising: A liquid surface image extraction unit is used to emit a laser at a certain angle onto the liquid surface through a laser light source located above the liquid surface; and to capture an image of the liquid surface through an image acquisition device located above the liquid surface, thereby acquiring a liquid surface image, wherein the liquid surface image includes the incident light spot generated by the laser irradiating the liquid surface; The liquid level height acquisition unit is used to acquire the intrinsic parameters and installation position parameters of the image acquisition device, acquire the coordinates of the center point of the light spot in the liquid level image through image processing technology, and input the coordinates of the center point of the light spot, the intrinsic parameters of the image acquisition device, and the installation position parameters into a preset liquid level calculation model to obtain the liquid level height. The monitoring and early warning unit is used to upload the liquid level data to the ship server, and the ship server provides early warnings on the liquid volume and level value of the closed compartment based on the liquid level data and pre-stored tank capacity table information.
[0015] Compared with the prior art, the present invention has the following advantages: 1. This invention involves installing a camera and a laser emitter inside a closed cargo hold of a ship, transmitting the obtained liquid level value inside the hold to the ship's server via a network. Based on the extracted liquid level information and the hold capacity table information, the liquid quantity and level value of the closed hold are given.
[0016] 2. Based on the installation position of the camera and laser light source and the position of the light spot, this invention provides a liquid level height calculation model according to geometric principles, thereby enabling rapid acquisition of the liquid level data in the chamber. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the process of a vision-based liquid level monitoring method for enclosed ship compartments according to the present invention.
[0019] Figure 2 This is a schematic diagram of the monitoring execution process in the embodiment.
[0020] Figure 3 This is a schematic diagram of the image processing part in the embodiment.
[0021] Figure 4 This is a schematic diagram of the first liquid level height calculation model given in the embodiment.
[0022] Figure 5a This is a front view of the second liquid level height calculation model given in the embodiment.
[0023] Figure 5b This is a top view of the second liquid level calculation model given in the embodiment.
[0024] Figure 6aThis is a plan view of the second liquid level height calculation model given in the embodiment.
[0025] Figure 6b This is a top plan view of the second liquid level height calculation model given in the embodiment.
[0026] Figure 7 This is a schematic diagram of the second liquid level height calculation model given in the embodiment. Detailed Implementation
[0027] 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.
[0028] like Figure 1-2 As shown, the present invention provides a vision-based method for monitoring liquid levels in enclosed ship compartments, comprising: S1. A laser is emitted at a certain angle to the liquid surface through a laser light source located above the liquid surface; an image acquisition device located above the liquid surface is used to capture an image of the liquid surface, and the liquid surface image includes the incident light spot generated by the laser irradiating the liquid surface.
[0029] In this embodiment, various cameras are installed in the enclosed compartments of the ship as image acquisition devices to collect video information from each compartment. Specifically, a CCD sensor is selected as the image sensor, which has the following characteristics: small size and light weight; low image noise and low distortion; and low power consumption.
[0030] S2. Obtain the intrinsic parameters and installation position parameters of the image acquisition device, obtain the coordinates of the center point of the light spot in the liquid surface image through image processing technology, and input the coordinates of the center point of the light spot, the intrinsic parameters of the image acquisition device, and the installation position parameters into the preset liquid level calculation model to obtain the liquid level height.
[0031] In this embodiment, a laser light source that is on the same plane as the optical axis of the CCD camera lens emits a laser beam into the liquid in the sealed chamber at a certain angle. The laser beam will form an incident light point on the liquid surface. Depending on the height of the liquid surface, the position of the incident light point formed by the laser light source on the liquid surface will be different, thereby obtaining liquid level information to calculate the liquid level height.
[0032] Videos captured in enclosed compartments of ships are often unclear and susceptible to interference from noise, which can negatively impact calculation efficiency. Therefore, preprocessing is necessary to remove irrelevant information before measuring liquid levels in enclosed compartments. Figure 3 As shown, the main preprocessing steps are as follows: Image containing the incident light spot is segmented using an adaptive threshold; to obtain the edge information of the light spot, the Canny operator is used for edge detection, thereby obtaining the coordinates of the center point of the light spot. Specifically, based on the known shape information of the incident light spot from the edge detection method, the center point coordinates of this irregular shape are found as follows: First, the circumscribed rectangle of the incident light spot's edge image is found. Then, based on the circumscribed rectangle, the center point coordinates can be easily determined. Finally, the coordinates of the image centroid are obtained using the Canny operator, and finally substituted into the calculation formula to obtain the height of the liquid surface.
[0033] After obtaining the precise coordinates of the light spot center, the page height is calculated by combining the intrinsic parameters of the image acquisition device and the position data. Specifically, in one optional implementation, such as... Figure 4 As shown, let the height of the enclosed chamber be H, and the liquid level in the chamber be h. A laser light source and a CCD camera are installed on the top of the chamber. The CCD camera is installed at point O, with its optical axis at a 90° angle to the liquid surface. Point L is the incident light source, and the incident light source and the camera's optical axis are on the same plane, with an angle α between the incident light source and the horizontal plane. The distance from OL is R. The light spot formed by the light source on the liquid surface is N, and the distance from point N to the camera's optical axis is y. Point A is the imaging position of the incident light spot N in the camera, and AO = x. Q and P are the projection points of the laser light source and the camera on the liquid surface, respectively. x is the coordinate of the center point of the light spot formed by the intersection of the laser beam and the liquid surface, and its distance from the image origin. The focal length of the lens is f. From the figure, we can see that:
[0034]
[0035]
[0036] OO'A~ P O'N
[0037] The liquid level height is obtained as follows:
[0038] Because a single light source can introduce errors during measurement, in another optional embodiment of the invention, three laser light sources, evenly distributed around the image acquisition device, are used to illuminate the liquid surface at an angle of 120° to each other. This results in three incident points of the laser beam on the liquid surface. The height of the liquid surface is then calculated based on the area of the triangle formed by the three light sources and the area of the triangle formed by the three incident points. Figures 5a-7 As shown, the area-based liquid level measurement method increases the change in parameters per unit liquid level, thereby improving the accuracy of liquid level measurement. To ensure that the optical axis is perpendicular to the liquid surface, the camera needs to be installed vertically facing the liquid surface. Three laser light sources, LA, LB, and LC, with beams La, Lb, and Lc respectively, are symmetrically installed around the camera, ensuring that the laser beams and the camera's optical axis are on the same plane. The angles between the beams and the optical axis are α1, α2, and α3, respectively, and the angles can be automatically adjusted according to different enclosed chambers. That is, the liquid level height h is calculated using the area s formed by the three light spots in the image. The specific process includes: The similarity relationships of triangles can be used to:
[0039] Where S1 is the area of the triangle formed by the three light spots on the liquid surface.
[0040] Since the laser light source is installed in an equilateral triangle with the optical center O of the camera, the projection of the optical center O on the liquid surface is O', the angle between the projections of the laser beam on the liquid surface is 120°, and the area formed by the three laser points on the liquid surface is S1.
[0041] like Figure 6a , 6b As shown:
[0042]
[0043]
[0044] Therefore, the area formed by the three light spots (A', B', C') on the page is:
[0045] By substituting the area s of the light spot obtained from image processing, h' can be solved, and the liquid level height h = H - h' can be calculated.
[0046] We only need to obtain the coordinates of the center point of the ellipse formed by the intersection of the laser beam and the liquid surface. Based on the center point coordinates, the height of the liquid surface can be obtained using both position-based and area-based liquid level measurement methods.
[0047] Since the liquid in the enclosed compartment will slosh on the surface during navigation, making its characteristics obvious but not stable, further, as a preferred embodiment of the present invention, when detecting the liquid level, this application adopts a detection method based on a combination of static detection and dynamic detection, that is, firstly, the liquid level is continuously statically detected, and then the result of the continuous detection is used to determine whether dynamic detection is required.
[0048] The static detection process works as follows: The liquid level height values from the first two static detection images are cached. If three consecutive static detections output different liquid level heights, static detection continues. If three consecutive static detections output the same liquid level height, the static detection process considers the liquid level to have reached that height. If this height is greater than a set value, static detection continues; if this height is less than the set value, shaking begins, and the dynamic detection process begins. Specifically, static detection involves acquiring image information from the enclosed chamber using a CCD camera, preprocessing the image (including filtering, image segmentation, etc.) to obtain the coordinates of the center point of the incident light spot, and finally substituting these coordinates into a calculation formula to obtain the liquid level height.
[0049] Features at the interface between the liquid surface and the edge wall are acquired, and the stability of the page is determined based on these features. When the liquid surface is relatively stable, the features at the interface are also relatively stable. These features are extracted using the Canny operator. The collected static image information is then used to determine the ship's swaying period through autocorrelation, thus determining whether dynamic detection is necessary.
[0050] The dynamic detection process determines the current liquid level height based on the period of liquid surface sloshing. Due to the inherent instability of dynamic detection, static detection is performed after the dynamic detection exceeds a set threshold to confirm the accuracy of the dynamic detection result. Specifically, dynamic detection involves the liquid level height h forming a periodic oscillation function when the liquid surface sloshes periodically. If the liquid level height at a certain moment is a function h(t), and an autocorrelation algorithm is performed between this function and the liquid level height function after a time difference τ, then:
[0051] when When the value is at its maximum, the time difference This refers to the period of the liquid surface height swaying.
[0052] S3. The liquid level data is uploaded to the ship server, and the ship server provides early warnings on the liquid volume and level value of the enclosed compartment based on the liquid level data and the pre-stored tank capacity table information.
[0053] Cameras and laser emitters are installed inside the ship's enclosed cargo holds to transmit the obtained liquid level values to the ship's server via a network. Based on the extracted liquid level information and the tank capacity table information, the liquid volume and level value of the enclosed tank are determined.
[0054] This invention proposes a method and system for liquid level detection and early warning in enclosed ship compartments, based on computer vision technology. The invention utilizes one or more cameras installed on the upper part of the compartment and employs computer vision processing technology to construct a visual model or algorithm for extracting the feature lines of the boundary between the compartment wall and the liquid surface. It calculates the liquid capacity and level of the compartment based on the compartment's capacity table. Based on various threshold information set for the liquid level in the compartment, it establishes a visual monitoring system for the liquid level status of enclosed ship compartments, providing functions such as high or low level early warning information, feature liquid level image extraction, and push notifications.
[0055] This invention also discloses a vision-based liquid level monitoring system for enclosed ship compartments, comprising: A liquid surface image extraction unit is used to emit a laser at a certain angle onto the liquid surface through a laser light source located above the liquid surface; and to capture an image of the liquid surface through an image acquisition device located above the liquid surface, thereby acquiring a liquid surface image, wherein the liquid surface image includes the incident light spot generated by the laser irradiating the liquid surface; The liquid level height acquisition unit is used to acquire the intrinsic parameters and installation position parameters of the image acquisition device, acquire the coordinates of the center point of the light spot in the liquid level image through image processing technology, and input the coordinates of the center point of the light spot, the intrinsic parameters of the image acquisition device, and the installation position parameters into a preset liquid level calculation model to obtain the liquid level height. The monitoring and early warning unit is used to upload the liquid level data to the ship server, and the ship server provides early warnings on the liquid volume and level value of the closed compartment based on the liquid level data and pre-stored tank capacity table information.
[0056] The description of the vision-based liquid level monitoring system for enclosed ship compartments of the present invention is relatively simple because it corresponds to the vision-based liquid level monitoring method for enclosed ship compartments in the above embodiments. For related similarities, please refer to the description of the vision-based liquid level monitoring method for enclosed ship compartments in the above embodiments, which will not be described in detail here.
[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A vision-based method of monitoring the liquid level in a closed compartment of a ship, characterized in that, The application relates to a liquid level detection method and device for a closed cabin of a ship. S1, emitting laser light to a liquid surface at a certain angle through a laser light source located above the liquid surface; and acquiring a liquid surface image through an image acquisition device located above the liquid surface, the liquid surface image comprising an incident light spot generated by the laser light irradiating the liquid surface; S2, acquiring internal parameters and installation position parameters of the image acquisition device, acquiring a light spot center point coordinate in the liquid surface image through an image processing technology, inputting the light spot center point coordinate, the internal parameters and the installation position parameters of the image acquisition device into a preset liquid level calculation model, and obtaining a liquid surface height; S3, uploading the liquid surface height data to a ship server, and giving a prewarning prompt for a liquid storage amount and a liquid level value of the closed cabin according to the liquid surface height data and pre-stored cabin capacity table information.
2. A vision-based liquid level monitoring method for a closed compartment of a ship as claimed in claim 1, wherein, An optical axis of the video acquisition device is perpendicular to the liquid surface when the ship is static, and the optical axis of the laser light source and the video acquisition device are located on the same plane.
3. A vision-based liquid level monitoring method for a closed compartment of a ship as claimed in claim 1, wherein, The method for acquiring the light spot center point coordinate in the liquid surface image through the image processing technology comprises the following steps: segmenting the liquid surface image containing the incident light spot through an adaptive threshold value; detecting the edge of the light spot through a Canny operator, so as to obtain the center point coordinate of the light spot.
4. A vision-based liquid level monitoring method for a closed compartment of a ship as claimed in claim 3, wherein, The method for detecting the edge of the light spot through the Canny operator, so as to obtain the center point coordinate of the light spot, comprises the following steps: firstly, finding an external rectangle of the edge image of the incident light spot; according to the external rectangle, the center point coordinate value can be easily judged.
5. A vision-based liquid level monitoring method for a closed compartment of a ship as claimed in claim 1, wherein, The preset liquid level calculation model is as follows: wherein H is the height of the closed cabin, h is the liquid surface height of the liquid in the cabin, x is the distance between the center point coordinate of the light spot formed by the intersection of the laser light beam and the liquid surface and the image origin, f is the focal length of the lens of the image acquisition device, alpha is the included angle between the incident light source and the horizontal plane, and R is the distance between the installation point of the image acquisition device and the laser light source.
6. A vision-based liquid level monitoring method for a closed compartment of a ship as claimed in claim 1, wherein, The preset liquid level calculation model is as follows: three laser light sources are evenly distributed around the image acquisition device, and the three laser light sources respectively irradiate the liquid surface at an angle of 120 degrees with the liquid surface, so as to obtain three incident points of the laser light beam on the liquid surface; the height of the liquid surface is calculated according to the areas of the triangle formed by the three laser light sources and the areas of the triangle formed by the three incident points.
7. A vision-based liquid level monitoring method for a closed compartment of a ship as claimed in claim 1, wherein, S2 further comprises the following steps: acquiring liquid level height data according to three continuous liquid surface images; when the output of the three continuous detections is not the same liquid level height, the detection is continuously carried out; when the output of the three continuous static detections is the same liquid level height, the static detection considers that the liquid level reaches the height.
8. A vision-based liquid level monitoring method for a closed compartment of a ship as claimed in claim 7, wherein, if the detected liquid level height is greater than a set value, the detection is continuously carried out; if the detected liquid level height is less than the set value, the ship starts to shake and enters a dynamic detection process.
9. A vision-based liquid level monitoring system for a closed compartment of a ship, characterized in that The application relates to a liquid level detection method and device for a closed cabin of a ship. A liquid surface image extraction unit is configured to emit laser light to a liquid surface at a certain angle through a laser light source located above the liquid surface; and acquire a liquid surface image through an image acquisition device located above the liquid surface, the liquid surface image comprising an incident light spot generated by the laser light irradiating the liquid surface; A liquid level height acquisition unit is configured to acquire an intrinsic parameter of the image acquisition device and an installation position parameter, acquire a light spot center point coordinate in a liquid level image through an image processing technique, input the light spot center point coordinate, the intrinsic parameter of the image acquisition device and the installation position parameter into a preset liquid level calculation model, and obtain the liquid level height; A monitoring and early warning unit is configured to upload the liquid level height data to a ship server, and the ship server performs early warning and prompting on the closed cabin liquid inventory and the liquid level value according to the liquid level height data and the pre-stored tank capacity table information.