A method, device and medium for three-dimensional error compensation of an intelligent towed streamer
Patent Information
- Application Number
- CN202611123006.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-07-28
AI Technical Summary
[0005]因此,本发明提供了一种智能拖曳的拖缆三维误差补偿测角方法解决导致拖缆三维角度检测结果难以稳定支撑拖曳作业判断的问题
[0051] The beneficial effects of this invention are as follows: By correcting the partition assignment of the tow cable measurement pixel band through angle compensation values, the adaptability of the tow cable angle detection results to changes in camera installation angle, ship attitude reference value, and tow cable departure point position can be improved, making the assignment results of the tow cable measurement pixel band in the semi-circular angle measurement area more consistent with the actual spatial direction of the tow cable; after the compensation measurement pixel band is formed, the compensated angle is no longer easily affected by image projection deviation, and the horizontal azimuth and elevation angles in the three-dimensional angle of the tow cable have a more stable measurement basis, thereby improving the continuity, accuracy, and reliability of the determination of the priority angle measurement partition of the tow cable spatial attitude judgment.
Smart Images

Figure CN122631026B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical measurement technology, and in particular to a method, device and medium for three-dimensional error compensation angle measurement of an intelligent towed cable. Background Technology
[0002] With the development of intelligent towing operations, ship-assisted maneuvering, and marine engineering monitoring technologies, three-dimensional angle detection of towlines has gradually become an important research direction in towing status perception, and is widely used in scenarios such as port towing, escort assistance, berthing and unberthing operations, and confined water maneuvering. After the towline is extended from the hull structure, its spatial direction is directly related to the towing azimuth, towline attitude, and hull stress state. Therefore, it is necessary to continuously measure the horizontal azimuth and elevation angles of the towline relative to the hull coordinate system. In recent years, technologies such as deck monitoring equipment, camera calibration, image recognition, and spatial conversion have matured, providing a foundation for visual image-based towline angle detection. By establishing an optical angle measurement benchmark on the deck working plane and combining it with the towline area identification results in real-time deck measurement images, non-contact measurement conditions can be provided for acquiring the spatial angle of the towline.
[0003] Existing technologies for detecting towline angles using monocular deck images typically rely on the towline projection position in the image to directly determine the angle. This is easily affected by factors such as the camera's installation angle, changes in the ship's attitude, and the spatial position of the towline's departure point. This results in a deviation between the image plane angle and the actual spatial angle, making it difficult to reliably support towing operation judgments with the towline's three-dimensional angle detection results. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a three-dimensional error compensation angle measurement method for intelligent towing cables to solve the problem that the three-dimensional angle detection results of towing cables are difficult to stably support the judgment of towing operations.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a three-dimensional error compensation angle measurement method for intelligent towing cable, comprising,
[0008] The semi-circular angle measurement area is divided with the towline launch point as the measurement origin. The semi-circular angle measurement area is further divided into multiple angle measurement zones under the fixed camera angle. The correspondence between the multiple angle measurement zones and the camera parameters, the ship attitude reference value and the towline launch point position is recorded to obtain the optical angle measurement reference.
[0009] The measurement range of the real-time deck measurement image is defined by using an optical angle measurement reference. Within the measurement range, the tow cable area in the real-time deck measurement image is identified. The tow cable area is screened for connectivity along the tow cable departure point. Linear interference areas that are not continuously connected to the tow cable departure point are eliminated, forming a tow cable measurement pixel band.
[0010] The coverage relationship between the tow cable measurement pixel band and multiple angle measurement zones is compared to determine the initial angle. The zone assignment of the tow cable measurement pixel band is corrected by the angle compensation value corresponding to the initial angle to obtain the compensated measurement pixel band.
[0011] The compensated angle is determined by the position of the compensated measurement pixel band in multiple angle measurement zones. The compensated angle is then spatially converted with camera parameters, ship attitude reference value and tow cable departure point to generate tow cable three-dimensional angle. The tow cable three-dimensional angle is then used to determine the priority angle measurement zone of the next frame of real-time deck measurement image.
[0012] As a preferred embodiment of the intelligent towing cable three-dimensional error compensation angle measurement method of the present invention, wherein: the towing cable departure point is the spatial position where the towing cable is led out from the hull structure and enters the external waters.
[0013] The camera parameters are the focal length, principal point position, installation height, pitch angle, and yaw angle, which characterize the camera's imaging relationship.
[0014] The ship attitude reference values are the reference values of the ship's roll angle, pitch angle, and heading angle recorded during the offline calibration phase;
[0015] The location of the towline launch point is the spatial coordinate of the towline launch point in the ship's coordinate system.
[0016] The real-time deck measurement images are real-time images collected by the deck monitoring equipment during towing operations for measuring the towing angle.
[0017] As a preferred embodiment of the intelligent towing cable three-dimensional error compensation angle measurement method of the present invention, wherein: the division of the semi-circular angle measurement area into multiple angle measurement partitions under the fixed viewpoint of the camera is specifically as follows:
[0018] Set up a measurement origin mark at the towline departure point, and use the measurement origin mark as the center to draw the inner and outer boundaries of a semicircle on the deck working plane.
[0019] Multiple plane reference points are set up along the outer boundary of the semicircle, and each plane reference point is matched with the measurement origin point to form multiple radial boundaries.
[0020] Acquire deck calibration images from a fixed camera viewpoint;
[0021] Locate the image center of the semicircular angle measurement region according to the measurement origin mark in the deck calibration image, and divide the semicircular angle measurement region according to the inner boundary, outer boundary and multiple radial boundaries to obtain multiple angle measurement partitions.
[0022] As a preferred embodiment of the intelligent towing cable three-dimensional error compensation angle measurement method of the present invention, wherein: identifying the towing cable area in the real-time measurement image of the deck within the measurement range specifically involves,
[0023] By mapping the semicircular angle measurement area in the optical angle measurement reference to the real-time measurement image of the deck and retaining the image content within the semicircular angle measurement area, the measurement range image is obtained.
[0024] Retrieve the pre-registered tow cable appearance information and organize the tow cable color, tow cable material and tow cable category into tow cable text prompts.
[0025] The tow cable positioning area is obtained by matching the text prompts of the tow cable with the measurement range image.
[0026] The image content within the tow cable positioning area is segmented at the pixel level, and the pixel content outside the tow cable positioning area is removed to generate the tow cable segmentation area.
[0027] The tow cable segmentation area is mapped onto the real-time measurement image of the deck, and the image content where the tow cable is located is delineated by the outer contour of the tow cable segmentation area, thus forming the tow cable area in the real-time measurement image of the deck.
[0028] As a preferred embodiment of the intelligent towing cable three-dimensional error compensation angle measurement method of the present invention, wherein: the formation of the towing cable measurement pixel band specifically refers to...
[0029] Within the towline area in the real-time measurement image of the deck, mark the image position corresponding to the towline departure point as the starting connected point;
[0030] Starting from the initial connected point, the adjacent pixels in the cable region are connected and expanded pixel by pixel, and the pixels that are continuously connected to the initial connected point are organized into the initial connected region.
[0031] Following the pixel extension order from the starting connected point to the edge of the initial connected region, the center line of the linear pixels in the initial connected region is extracted, and the continuous pixels passed through by the center line are marked as the direction screening region.
[0032] Connectivity verification is performed on linear pixels in the cable-dragging area that have not entered the directional screening area, and linear pixels that are not continuously connected to the directional screening area are marked as linear interference areas;
[0033] Separate the linear interference region from the tow cable region, and mark the pixels in the direction screening region that are continuously connected to the starting connection point as continuous pixels of the tow cable.
[0034] Connect the continuous pixels of the tow cable into a tow cable measurement pixel band extending along the direction of the tow cable departure point.
[0035] As a preferred embodiment of the intelligent towing cable three-dimensional error compensation angle measurement method of the present invention, wherein: determining the initial angle specifically involves,
[0036] The tow cable measurement pixel band is compared with multiple angle measurement partitions one by one, and the covered pixels of the tow cable measurement pixel band falling into multiple angle measurement partitions are marked to form a covered pixel record.
[0037] Skeletonization processing is performed on the tow cable measurement pixel band in the covered pixel record, and the continuous backbone of the tow cable measurement pixel band is marked as the tow cable measurement skeleton.
[0038] According to the pixel direction from the tow cable departure point to the end of the tow cable measurement skeleton, the tow cable measurement skeleton is divided into continuous skeleton segments, and the angle measurement partitions of the continuous skeleton segments are recorded to form the skeleton passage record.
[0039] Based on the skeleton's record, the angle measurement zones traversed by the tow cable measurement skeleton are defined, and the intersection position between the tow cable measurement skeleton and the radial boundary of the angle measurement zone is marked to form a boundary landing point record;
[0040] The corresponding comparison is performed on the covering pixel record, skeleton passage record and boundary landing point record, and the angle measurement partition that simultaneously contains covering pixels, skeleton passage and boundary landing point is retained to form angle measurement candidate partitions;
[0041] Mark the angle position of the candidate angle measurement partition in the semi-circular angle measurement region as the initial angle.
[0042] As a preferred embodiment of the intelligent towing cable three-dimensional error compensation angle measurement method of the present invention, wherein: obtaining the compensation measurement pixel band specifically refers to...
[0043] The initial angle is matched with the camera parameters, ship attitude reference value and tow cable launch point position in the optical angle measurement reference to obtain the angle compensation value corresponding to the initial angle.
[0044] The angle compensation value is converted into the partition boundary offset in the semi-circular angle measurement area, and the radial boundary position between multiple angle measurement partitions is adjusted using the partition boundary offset to obtain the compensation partition boundary.
[0045] The angle measurement partitions to which each pixel in the tow cable measurement pixel band belongs are redefined using the compensation partition boundaries to obtain the compensation partition assignment.
[0046] Pixels that deviate from the extension direction of the tow cable measurement skeleton in the compensation partition are delineated, while pixels that fit the extension direction of the tow cable measurement skeleton are retained to form a compensation pixel set.
[0047] The set of compensated pixels is connected into a compensated measurement pixel band that extends along the direction of the tow cable departure point.
[0048] As a preferred embodiment of the intelligent towing cable three-dimensional error compensation angle measurement method of the present invention, the spatial conversion maps the compensated angle to the towing cable direction ray in the camera coordinate system, corrects the imaging deviation of the towing cable direction ray using camera parameters, transfers the corrected towing cable direction ray to the ship coordinate system using the ship attitude reference value, calibrates the spatial direction of the towing cable with the towing cable departure point as the ray starting point, and generates a three-dimensional angle of the towing cable including the horizontal azimuth angle and the elevation angle.
[0049] In a second aspect, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements any step of the intelligent towing cable three-dimensional error compensation angle measurement method as described in the first aspect of the present invention.
[0050] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the intelligent towing cable three-dimensional error compensation angle measurement method as described in the first aspect of the present invention.
[0051] The beneficial effects of this invention are as follows: By correcting the partition assignment of the tow cable measurement pixel band through angle compensation values, the adaptability of the tow cable angle detection results to changes in camera installation angle, ship attitude reference value, and tow cable departure point position can be improved, making the assignment results of the tow cable measurement pixel band in the semi-circular angle measurement area more consistent with the actual spatial direction of the tow cable; after the compensation measurement pixel band is formed, the compensated angle is no longer easily affected by image projection deviation, and the horizontal azimuth and elevation angles in the three-dimensional angle of the tow cable have a more stable measurement basis, thereby improving the continuity, accuracy, and reliability of the determination of the priority angle measurement partition of the tow cable spatial attitude judgment. Attached Figure Description
[0052] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the 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.
[0053] Figure 1 A flowchart for a three-dimensional error compensation angle measurement method for intelligent towing cables.
[0054] Figure 2 This is a diagram showing the relationship between optical angle measurement references.
[0055] Figure 3 A map for identifying and screening cable-hauled areas.
[0056] Figure 4 This is a diagram showing angle compensation and angle output. Detailed Implementation
[0057] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0058] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0059] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0060] Reference Figures 1-4 As one embodiment of the present invention, this embodiment provides a three-dimensional error compensation angle measurement method for intelligent towing cable, comprising the following steps:
[0061] S1. Divide the semi-circular angle measurement area with the towline departure point as the measurement origin. Divide the semi-circular angle measurement area into multiple angle measurement zones under the fixed angle of the camera. Record the correspondence between the multiple angle measurement zones and the camera parameters, the ship attitude reference value and the position of the towline departure point to obtain the optical angle measurement reference.
[0062] S1.1. Set up a measurement origin mark at the towline departure point, and use the measurement origin mark as the center to delineate the inner and outer boundaries of a semicircle on the deck working plane. Specifically,
[0063] The measurement origin mark is an identifiable planar marker fixed at the vertical projection position of the towline launch point. The center of the measurement origin mark coincides with the projection point of the towline launch point on the deck working plane. The deck working plane is the flat deck area within the imaging range of the deck monitoring equipment that bears the towline launch and towline swing.
[0064] Using the center of the measurement origin mark as the center, the inner boundary of the semicircle is defined by the distance between the towline departure point and the nearest position in the image of the deck monitoring equipment that fully displays the outer contour of the towline. The outer boundary of the semicircle is defined by the distance between the towline departure point and the position in the image of the deck monitoring equipment that fully displays the outer contour of the towline. The inner and outer boundaries of the semicircle form a semicircular angle measurement area for measuring the angle of the towline.
[0065] S1.2. Multiple planar reference points are established along the outer boundary of the semicircle, and each of these reference points is mapped to the measurement origin point, forming multiple radial boundaries. Specifically,
[0066] The plane reference markers are point-like plane marks fixed on the outer boundary of the semicircle, with the center of each plane reference marker falling on the outer boundary of the semicircle. Starting from one end of the semicircle angle measurement area, plane reference markers are arranged along the outer boundary of the semicircle at equal angular intervals. The equal angular interval is the ratio between the total angle of the semicircle angle measurement area and the number of angle measurement zones, so that two adjacent plane reference markers form a consistent included angle relative to the center of the measurement origin marker. The center of each plane reference marker is connected to the center of the measurement origin marker to form a straight line mark. The straight line mark extends from the measurement origin marker to the outer boundary of the semicircle and serves as a radial boundary. Angle measurement zones are formed between adjacent radial boundaries.
[0067] S1.3. Acquire a deck calibration image containing the measurement origin marker, the inner boundary of the semicircle, the outer boundary of the semicircle, and the plane reference marker under a fixed camera viewpoint; locate the image center of the semicircular angle measurement region according to the measurement origin marker in the deck calibration image, and divide the semicircular angle measurement region according to the inner boundary, outer boundary, and multiple radial boundaries to obtain multiple angle measurement partitions, specifically,
[0068] In the deck calibration image, the outer contour of the measurement origin marker is identified. The intersection of the lateral and longitudinal midpoints of the outer contour is marked as the image center of the semicircular angle measurement region. The inner and outer boundaries of the semicircle, along with multiple radial boundaries, are mapped to identifiable boundary lines in the deck calibration image. The image region between the inner and outer boundaries of the semicircle is preserved, and the image region is cropped using two adjacent radial boundaries to form an angle measurement partition. Multiple angle measurement partitions are obtained by continuously cropping the image region bounded by two adjacent radial boundaries from one end point to the other along the semicircular angle measurement region. The image center is the image position corresponding to the center of the outer contour of the measurement origin marker, and the inner, outer, and radial boundaries are all identifiable boundary lines in the deck calibration image that coincide with the corresponding boundaries on the deck working plane.
[0069] S1.4 Record the correspondence between multiple angle measurement zones and camera parameters, ship attitude reference values, and towline launch point positions to obtain the optical angle measurement reference. Specifically,
[0070] Multiple angle measurement zones are numbered sequentially according to their arrangement within the semicircular angle measurement regions. The number, image boundary position, and corresponding angle position of each angle measurement zone are then bound to the focal length, principal point position, installation height, pitch angle, and yaw angle in the camera parameters. During the offline calibration phase, the reference values of the ship's roll angle, pitch angle, and heading angle are recorded, and the ship's attitude reference values are written into the calibration record corresponding to each angle measurement zone.
[0071] The reference values for the ship's roll, pitch, and heading angles are obtained from the roll, pitch, and heading angles collected by an attitude and heading reference device during the offline calibration phase. Existing attitude and heading reference devices typically use a fusion of a three-axis gyroscope, a three-axis accelerometer, and a three-axis magnetometer to obtain attitude estimates, and can output roll (the angle of left and right tilting about the ship's longitudinal axis), pitch (the angle of bow and stern pitching about the ship's transverse axis), and heading / yaw (the angle of heading). The attitude heading vector (representing the ship's heading angle relative to the reference direction or the yaw angle about the vertical axis) can be recorded as roll, pitch, and heading angles. For example, roll = 0.3°, pitch = -0.2°, and heading = 128.5°. The example values are only used to illustrate the recording format of the reference values. The actual values are affected by the ship's berthing attitude, camera installation status, towline launch point position, and calibration time environment. The results collected by the attitude heading reference equipment during the offline calibration phase should be used as the standard, and a certain set of values should not be fixed.
[0072] The towline launch point is written into the calibration record corresponding to each angle measurement zone according to the spatial coordinates of the towline launch point in the ship's coordinate system, so that each angle measurement zone has the corresponding image boundary position, angle position, camera parameters, ship attitude reference value and towline launch point position; all calibration records after binding are used as optical angle measurement references to limit the measurement range in the real-time measurement image on the deck and support subsequent angle conversion.
[0073] It should be noted that the offline calibration stage is the stage in which deck calibration images, camera parameters, ship attitude reference values, and tow cable launch point positions are uniformly recorded after the deck monitoring equipment is fixedly installed, the tow cable launch point position is determined, and the measurement origin marker and multiple plane reference markers are set up. The offline calibration stage involves acquiring deck calibration images containing a semi-circular angle measurement area through the deck monitoring equipment, obtaining focal length, principal point position, installation height, pitch angle, and yaw angle through the camera calibration board, recording the reference values of ship roll angle, pitch angle, and heading angle through the attitude and heading reference equipment, measuring and recording the tow cable launch point position through the ship coordinate system, and binding the above records with multiple angle measurement zones one by one to form an optical angle measurement reference for subsequent real-time measurements.
[0074] S1.5, where camera parameters are focal length, principal point position, installation height, pitch angle, and yaw angle, which characterize the camera imaging relationship; ship attitude reference values are the reference values of ship roll angle, pitch angle, and heading angle recorded during the offline calibration phase; towline launch point position is the spatial coordinate of the towline launch point in the ship coordinate system; and real-time deck measurement images are real-time images collected by deck monitoring equipment during towline operation for towline angle measurement.
[0075] S2. Using an optical angle measurement reference to limit the measurement range of the real-time deck measurement image, identify the towline area in the real-time deck measurement image within the measurement range, perform connectivity screening on the towline area along the towline departure point, and eliminate linear interference areas that are not continuously connected to the towline departure point to form a towline measurement pixel band.
[0076] S2.1. Map the semicircular angle measurement region in the optical angle measurement reference to the real-time measurement image of the deck, retain the image content within the semicircular angle measurement region, and obtain the measurement range image. Specifically,
[0077] The boundary position of the semicircular angle measurement area recorded in the optical angle measurement reference is written into the real-time deck measurement image. The inner boundary, outer boundary, and two end boundaries of the semicircle are marked in the real-time deck measurement image. The image content between the inner boundary and the outer boundary of the semicircle, and between the two end boundaries, is retained. The deck background image outside the semicircular angle measurement area is deleted to obtain the measurement range image. The boundary position of the semicircular angle measurement area comes from the correspondence between multiple angle measurement partitions formed in the deck calibration image and the camera parameters.
[0078] S2.2 Retrieve pre-registered towline appearance information from the deck monitoring equipment, and organize the towline color, towline material, and towline type from the towline appearance information into towline text prompts, specifically,
[0079] The towline color, towline material, and towline category are combined into a natural language phrase in the order of color first, material in the middle, and category last to obtain the towline text prompt. The order of color first, material in the middle, and category last can first define the visual distinguishing features between the towline and the deck background, and then define the surface attributes and cable category of the towline. This ensures that the towline text prompt clearly corresponds to the towline positioning target in the measurement range image. For example, when the towline color is green, the towline material is nylon, and the towline category is towline, the towline text prompt is "green nylon towline".
[0080] Among them, the deck monitoring equipment pre-registers the appearance information of the tow cable. The appearance information of the tow cable comes from the manual registration record of the tow cable currently in use before the tow cable operation. The tow cable color is written with the color name that can distinguish the deck background. The tow cable material is written with the surface material name of the tow cable currently in use. The tow cable category is written with the cable category name of the tow cable currently in use.
[0081] S2.3. Perform image-text matching between the tow cable text prompt and the measurement range image to obtain the tow cable positioning area. Specifically,
[0082] The tow cable text prompt and the measurement range image are fed into the Grounding DINO model. The Grounding DINO model semantically maps the tow cable color, material, and type in the tow cable text prompt to candidate image regions in the measurement range image. When a candidate image region satisfies the correspondence of tow cable color, material texture, and type shape, the Grounding DINO model outputs the bounding box of the candidate image region. If any correspondence of the candidate image region is inconsistent, it is not used as the tow cable location region. The output bounding boxes are sorted according to the degree of consistency with the tow cable text prompt, and the area covered by the bounding box with the highest degree of consistency is retained to obtain the tow cable location region.
[0083] The training process for the Grounding DINO model is as follows:
[0084] The training samples are sourced from publicly available image and text detection samples and deck tow cable annotation samples with target categories of rope, cable, tow cable and marine cable. The training samples include training images, training text prompts and training location box annotations. The training text prompts include target color, target material and target category. The training location box annotations are used to mark the area in the training image where the target corresponding to the training text prompt is located.
[0085] The Grounding DINO model includes an image feature extraction layer, a text feature extraction layer, a cross-modal feature fusion layer, and a bounding box prediction layer. The image feature extraction layer adopts a four-level feature extraction structure, processing the training image into first-scale image features, second-scale image features, third-scale image features, and fourth-scale image features. That is, the image feature extraction layer performs progressive downsampling and texture extraction on the training image according to the convolutional layers from shallow to deep, preserving the edge texture, local morphology, overall contour, and target position relationship of the training image at different resolutions, forming first-scale image features, second-scale image features, third-scale image features, and fourth-scale image features. The channel dimensions of the first-scale image features, second-scale image features, third-scale image features, and fourth-scale image features are uniformly mapped to 256 dimensions.
[0086] The text feature extraction layer encodes the target color, target material, and target category in the training text prompts into 256-dimensional text features. That is, it performs word segmentation and position encoding according to the order of the target color, target material, and target category in the training text prompts, and maps the segmented words to a unified feature space to form 256-dimensional text features that can correspond to the semantic content of the target color, target material, and target category.
[0087] The cross-modal feature fusion layer adopts a 6-layer cross-modal attention structure to perform attention matching on 256-dimensional image features and 256-dimensional text features to generate image-text fusion features. That is, the 256-dimensional image features are used as image query objects and the 256-dimensional text features are used as text matching objects. The semantic reference of the image location content in the image query object is compared with the text features corresponding to the target color, target material and target category layer by layer. The image features that present the target color, target material texture and target category form in the image location content are bound to the corresponding text tags, and the image features after the text tag binding is completed are organized into image-text fusion features.
[0088] The bounding box prediction layer adopts a 6-layer detection and decoding structure. Based on the image-text fusion features, it outputs the predicted bounding box, the predicted image-text correspondence, and the predicted target category. Specifically, it organizes the image location content with text tags layer by layer according to the image-text fusion features, delineates candidate image regions corresponding to the target color, target material texture, and target category shape, organizes the boundary positions of the candidate image regions into the predicted bounding box, organizes the matching status between the candidate image regions and the training text prompts into the predicted image-text correspondence, and organizes the category tags corresponding to the candidate image regions into the predicted target category.
[0089] During training, training images and training text prompts are fed into the Grounding DINO model. The Grounding DINO model outputs predicted bounding boxes, predicted image-text correspondences, and predicted target categories. The predicted bounding boxes are compared with the training bounding box annotations to form a bounding box regression loss. The predicted image-text correspondences are compared with the target regions corresponding to the training text prompts to form an image-text correspondence loss. The predicted target categories are compared with the target categories in the training text prompts to form a target classification loss. The bounding box regression loss, image-text correspondence loss, and target classification loss are used together to update the parameters of the image feature extraction layer, text feature extraction layer, cross-modal feature fusion layer, and bounding box prediction layer. Parameter updates are performed using backpropagation and gradient descent.
[0090] Training stops when the combined change in the bounding box regression loss, image-text correspondence loss, and object classification loss across adjacent training rounds falls below the loss convergence threshold. The loss convergence threshold is set based on the combined change in the initial training rounds, for example, by taking 10% of the combined change in the initial training rounds. This can filter out the interference of slight fluctuations in loss in the later stages of training on the decision to stop training, while preserving the adjustment space for the Grounding DINO model to continue correcting the predicted bounding boxes and the predicted image-text correspondence results, thus obtaining the trained Grounding DINO model.
[0091] It should be noted that the Grounding DINO model is an existing open vocabulary target localization model built on the DINO structure. It is used to locate candidate image regions in the measurement range image corresponding to the tow cable color, tow cable material and tow cable category based on the tow cable text prompt words, and output the location bounding box of the candidate image region.
[0092] S2.4. Perform pixel-level segmentation on the image content within the tow cable positioning area, and remove pixels outside the tow cable positioning area to generate the tow cable segmentation area. Specifically,
[0093] The location bounding box corresponding to the tow cable positioning area is written into the location prompt of the pixel-level segmentation model. The pixel-level segmentation model divides the pixels in the measurement range image into foreground and background according to the image range defined by the location bounding box. Foreground pixels within the location bounding box that fall within the outer contour of the tow cable and remain continuously connected are marked as tow cable pixels. When the pixel-level segmentation model outputs multiple candidate segmentation results, it retains the candidate segmentation results that are located inside the tow cable positioning area, have a continuous outer contour, and extend along the length direction of the tow cable. If the candidate segmentation results have a broken outer contour or exceed the boundary of the tow cable positioning area, they are not used as tow cable segmentation areas. Then, all pixels outside the tow cable positioning area and non-tow cable pixels that are not marked as tow cable pixels within the tow cable positioning area are deleted. The set of continuous tow cable pixels that are retained is organized into the tow cable segmentation area.
[0094] The training process for the pixel-level segmentation model is as follows:
[0095] The training samples are sourced from publicly available segmentation annotation samples and deck tow cable segmentation annotation samples. The training samples include training images, location cue annotations, and pixel-level segmentation annotations. Location cue annotations are used to indicate the location of the target in the training image, and pixel-level segmentation annotations are used to indicate the regions in the training image that are assigned to the tow cable foreground pixel by pixel.
[0096] The pixel-level segmentation model includes an image encoder, a cue encoder, and a mask decoder.
[0097] The image encoder encodes the training image into image embedding features, which involves dividing the training image into fixed-size image blocks, marking the positions of the image blocks according to their arrangement in the training image, and then encoding and organizing the color, texture, and edge information in each image block to form image embedding features that retain the appearance features and spatial positional relationships of the tow cable.
[0098] The prompt encoder encodes the location bounding box, target point, and boundary point in the location prompt annotation into prompt embedding features. That is, it marks the location according to the coordinate position of the location bounding box, target point, and boundary point in the training image, and organizes the target area defined by the location bounding box, the center position of the tow cable pointed to by the target point, and the outer contour position of the tow cable pointed to by the boundary point to form prompt embedding features that can constrain the segmentation range of the tow cable.
[0099] The mask decoder aligns the image embedding features and the cue embedding features according to their coordinate positions, and distinguishes between foreground and background pixels of the tow cable within the target location defined by the location cue annotation, and outputs the predicted segmentation result and the predicted segmentation result boundary.
[0100] During training, training images and location cue annotations are fed into the pixel-level segmentation model. The pixel-level segmentation model outputs the predicted segmentation result and the predicted segmentation result boundary. The predicted segmentation result is compared with the pixel-level segmentation annotation to form the segmentation loss, and the predicted segmentation result boundary is compared with the pixel-level segmentation annotation boundary to form the boundary loss. The segmentation loss and boundary loss are used together to update the parameters of the image encoder, cue encoder and mask decoder. The parameter update adopts backpropagation and gradient descent.
[0101] Training stops when the combined change in segmentation loss and boundary loss in adjacent training rounds is lower than the loss convergence threshold. The loss convergence threshold is set based on the combined change in loss in the initial training rounds, for example, 10% of the combined change in loss in the initial training rounds. This can filter out the interference of slight fluctuations in loss in the later stages of training on the decision to stop training, and retain the adjustment space for the pixel-level segmentation model to continue to correct the predicted segmentation results and the boundaries of the predicted segmentation results, thus obtaining the trained pixel-level segmentation model.
[0102] It should be noted that the pixel-level segmentation model is an existing image segmentation model built on the Segment Anything Model. It is used to perform pixel-by-pixel foreground and background segmentation of the measurement range image based on the location box corresponding to the tow cable positioning area, and output the tow cable segmentation area.
[0103] S2.5. Map the towline segmented area onto the real-time deck measurement image, and use the outer contour of the towline segmented area to delineate the image content where the towline is located, forming the towline area in the real-time deck measurement image. Specifically,
[0104] The pixel positions of the tow cable segmentation area in the measurement range image are restored to the corresponding image coordinates in the real-time deck measurement image; the edge pixels of the restored tow cable segmentation area are continuously connected to form the outer contour of the tow cable segmentation area; the image content surrounded by the outer contour of the tow cable segmentation area is marked as the image content where the tow cable is located, and the image content outside the outer contour does not enter the tow cable area, thus forming the tow cable area in the real-time deck measurement image.
[0105] The measurement range image is obtained by cropping the semi-circular angle measurement area from the real-time measurement image of the deck, and the pixel position of the tow cable segmentation area is restored according to the image coordinate correspondence before and after cropping.
[0106] S2.7. Within the towline area in the real-time deck measurement image, mark the image position corresponding to the towline departure point as the starting connected point. Specifically,
[0107] The towline departure point is projected onto the real-time measured image on the deck according to the camera parameters recorded in the optical angle measurement reference, thus obtaining the image position corresponding to the towline departure point. When the image position falls within the towline area, the image position is marked as the starting connected point. When the image position does not fall within the towline area, the edge pixel in the towline area that is closest to the image position is selected as the starting connected point. Here, the towline departure point position is the spatial coordinate of the towline departure point in the ship coordinate system, and the camera parameters are used to determine the correspondence between the spatial coordinates in the ship coordinate system and the image position in the real-time measured image on the deck.
[0108] S2.8. Using the initial connected point as the starting point for expansion, perform pixel-by-pixel connectivity expansion on adjacent pixels in the cable-stayed region, and organize the pixels continuously connected to the initial connected point into an initial connected region. Specifically,
[0109] Starting with the initial connected point as the first connected pixel, examine the adjacent pixels within the eight-neighbor area of the initial connected point that belong to the tow cable region, and add these adjacent pixels to the connected pixel set. Continue examining the adjacent pixels within the eight-neighbor area of pixels already added to the connected pixel set that belong to the tow cable region but have not yet been added to the connected pixel set, until the connected pixel set no longer adds new adjacent pixels. Organize the connected pixel set into an initial connected region that is continuously connected to the initial connected point. The eight-neighbor area refers to the positions of the eight adjacent pixels above, below, to the left, to the right, to the upper left, to the upper right, to the lower left, and to the lower right of the current pixel. Using the eight-neighbor area can simultaneously cover the pixel extension directions of the tow cable region in the horizontal, vertical, and diagonal directions, avoiding connectivity interruptions when the tow cable extends diagonally due to only checking horizontal and vertical adjacent pixels.
[0110] S2.9. Following the pixel extension order from the starting connected point to the edge of the initial connected region, extract the centerline of the linear pixels in the initial connected region, and mark the continuous pixels traversed by the centerline as the direction screening region. Specifically,
[0111] Starting from the initial connected point, the system progressively visits the edge of the initial connected region along the extension direction of continuous pixels. During the visit, foreground pixels in the horizontal width direction within the initial connected region are centered and marked. The middle pixel between the edge pixels on both sides at the same horizontal width position is taken as the centerline pixel. When the centerline pixels are connected consecutively in the visit order, the centerline pixels form a centerline, and the continuous pixels passed through by the centerline are marked as the direction screening area. The horizontal width direction is the pixel arrangement direction perpendicular to the extension direction of the pixels in the initial connected region, used to determine the middle position of the linear pixels. The linear pixels are pixels in the initial connected region that are continuously arranged along the extension direction of the cable and distributed in a thin strip shape.
[0112] S2.10. Perform connectivity verification on linear pixels in the cable-dragging area that have not entered the directional screening area, and mark linear pixels that are not continuously connected to the directional screening area as linear interference areas. Specifically,
[0113] In the cable-dragging area, identify pixels that have not entered the direction screening area and are arranged in a continuous strip pattern. Perform an adjacency check on the continuous strip pattern pixels and the direction screening area. If at least one pixel in the continuous strip pattern is adjacent to a pixel in the direction screening area, retain the continuous strip pattern pixels and do not mark them as linear interference areas. If there are no adjacent pixels between the continuous strip pattern pixels and the direction screening area, mark the continuous strip pattern pixels as linear interference areas. Adjacent pixels are two pixels that touch each other within an eight-neighborhood. The eight-neighborhood is used to maintain consistency in connectivity judgments for horizontal, vertical, and diagonal extensions.
[0114] S2.11. Separate the linear interference region from the tow cable region, and mark the pixels in the direction screening region that are continuously connected to the starting connection point as continuous pixels of the tow cable. Specifically,
[0115] Remove the pixels corresponding to the linear interference area from the towline area, and retain the overlapping pixels between the removed towline area and the direction screening area. Starting from the initial connection point, perform an eight-neighbor connectivity check on the overlapping pixels in the direction screening area again. Overlapping pixels that can be continuously accessed from the initial connection point are marked as continuous towline pixels, while overlapping pixels that cannot be continuously accessed from the initial connection point are not marked as continuous towline pixels. The eight-neighbor connectivity check is used to confirm that there is a continuous pixel connection relationship between continuous towline pixels and the towline departure point.
[0116] S2.12. Connect the continuous pixels of the tow cable into a tow cable measurement pixel band extending along the direction of the tow cable departure point, specifically,
[0117] Starting from the initial connected point, the sequential connection order of continuous pixels in the tow cable is arranged according to the eight-neighborhood connection relationship between them. Continuous pixels in the tow cable with continuous connections are merged into a continuous pixel band. The starting position of the continuous pixel band is the initial connected point, and the extension direction of the continuous pixel band is from the initial connected point to the end of the continuous pixel band. The continuous pixel band serves as the tow cable measurement pixel band extending along the direction of the tow cable departure point. The end of the continuous pixel band is the pixel position that is farthest from the initial connected point in the continuous pixels of the tow cable along the connection order.
[0118] S3. Compare the coverage relationship between the tow cable measurement pixel band and multiple angle measurement zones, determine the initial angle, and correct the zone assignment of the tow cable measurement pixel band by the angle compensation value corresponding to the initial angle to obtain the compensated measurement pixel band.
[0119] S3.1, Compare the tow cable measurement pixel band with multiple angle measurement zones one by one, mark the covered pixels where the tow cable measurement pixel band falls into multiple angle measurement zones, and form a covered pixel record. Specifically,
[0120] Using the pixel coordinates in the towed cable measurement pixel band as the comparison object, it is determined one by one whether the pixel coordinates are located within the image boundary of the angle measurement partition. When the pixel coordinates are located within the image boundary of the angle measurement partition, the pixel coordinates are marked as the covered pixel of the towed cable measurement pixel band falling into the angle measurement partition. When the pixel coordinates are located outside the image boundary of the angle measurement partition, they are not marked as covered pixels. The location of the covered pixels and the angle measurement partition to which the covered pixels belong are recorded according to the angle measurement partition number to form a covered pixel record. The image boundary of the angle measurement partition comes from the angle measurement partition boundary position recorded in the optical angle measurement reference. The covered pixel is the towed cable measurement pixel that falls into the corresponding angle measurement partition when the towed cable measurement pixel band overlaps with multiple angle measurement partitions.
[0121] S3.2, Perform skeletonization processing on the tow cable measurement pixel band in the covered pixel record, and mark the continuous backbone of the tow cable measurement pixel band as the tow cable measurement skeleton, specifically,
[0122] In the coverage pixel record, the continuous coverage pixels of the tow cable measurement pixel band are retained, and the intermediate pixels between the two edge pixels are found along the width direction of the tow cable measurement pixel band. The intermediate pixels obtained at adjacent width positions are continuously connected in the extension order of the tow cable measurement pixel band to form a continuous backbone located in the middle of the tow cable measurement pixel band. When the continuous backbone extends from the starting connection point to the end of the tow cable measurement pixel band, the continuous backbone is marked as the tow cable measurement skeleton. Here, the width direction is the pixel arrangement direction perpendicular to the extension direction of the tow cable measurement pixel band.
[0123] S3.3. According to the pixel direction from the towline departure point to the end of the towline measurement skeleton, divide the towline measurement skeleton into continuous skeleton segments, and record the angle measurement zones into which the continuous skeleton segments enter, forming the skeleton passage record. Specifically,
[0124] The starting point of the towline measurement skeleton is taken as the starting position of the starting point of the towline departure point. The adjacent skeleton pixels in the towline measurement skeleton are arranged sequentially to the end of the towline measurement skeleton. When adjacent skeleton pixels fall into the same angle measurement zone, the adjacent skeleton pixels are merged into a continuous skeleton segment. When a skeleton pixel enters the next angle measurement zone from the current angle measurement zone, the current continuous skeleton segment ends and the next continuous skeleton segment begins. The starting and ending skeleton pixels, the angle measurement zones they fall into, and the order of passage of each continuous skeleton segment are recorded to form a skeleton passage record. The towline measurement skeleton is used to compress the towline measurement pixel band from a pixel area with width into a continuous trunk line, so that the subsequent direction of the pixels from the towline departure point to the end of the towline measurement skeleton can be used to determine which angle measurement zones the towline passes through, and to reduce the interference of towline width, edge burrs, and local pixel expansion on the initial angle determination.
[0125] S3.4. Based on the skeleton's traversal record, define the angle measurement zones traversed by the tow cable measurement skeleton, mark the intersection positions of the tow cable measurement skeleton and the radial boundaries of the angle measurement zones, and form boundary landing point records. Specifically,
[0126] The adjacent continuous skeleton segments are checked according to the passing order in the skeleton passing record. When the angle measurement zone into which the previous continuous skeleton segment enters is inconsistent with the angle measurement zone into which the next continuous skeleton segment enters, the position between the ending skeleton pixel of the previous continuous skeleton segment and the starting skeleton pixel of the next continuous skeleton segment is marked as the intersection position of the cable measurement skeleton and the radial boundary of the angle measurement zone. When the angle measurement zone into which the previous continuous skeleton segment enters is consistent with the angle measurement zone into which the next continuous skeleton segment enters, the intersection position is not marked. The image coordinates corresponding to the intersection position, the adjacent angle measurement zone number, and the skeleton passing order are written into the same record to form the boundary landing point record.
[0127] S3.5. Compare the coverage pixel records, skeleton passage records, and boundary landing point records accordingly, and retain the angle measurement partitions that simultaneously contain coverage pixels, skeleton passage records, and boundary landing point records to form angle measurement candidate partitions. Specifically,
[0128] Using the angle measurement partition number as the corresponding object, the covered pixel record, skeleton passage record, and boundary landing point record are checked. If there are covered pixels, continuous skeleton segments, and intersection positions under the same angle measurement partition number, the angle measurement partition is retained as an angle measurement candidate partition. If any of the covered pixels, continuous skeleton segments, and intersection positions are missing under the same angle measurement partition number, the angle measurement partition is excluded. After checking multiple angle measurement partitions, the retained angle measurement partitions form the angle measurement candidate partitions.
[0129] S3.6 Mark the angle position corresponding to the candidate angle measurement partition in the semi-circular angle measurement region as the initial angle, specifically,
[0130] Read the angular position of the candidate angle measurement zone in the optical angle measurement reference; when there is only one candidate angle measurement zone, mark the angular midline position of the candidate angle measurement zone as the initial angle; when there are multiple adjacent candidate angle measurement zones, mark the angular midline position of the last candidate angle measurement zone passed through as the initial angle according to the order in which the tow cable measurement frame passes through the candidate angle measurement zones; when the candidate angle measurement zones are not adjacent, retain the candidate angle measurement zone that is consistent with the candidate angle measurement zone where the end of the tow cable measurement frame is located, and mark the angular midline position of the retained candidate angle measurement zone as the initial angle.
[0131] S3.7 Match the initial angle with the camera parameters, ship attitude reference value, and towline launch point position in the optical angle measurement reference to obtain the angle compensation value corresponding to the initial angle. Specifically,
[0132] Using the initial angle as the angle index, the angle measurement zone corresponding to the initial angle is searched in the optical angle measurement reference, and the camera parameters, ship attitude reference value, and towline launch point position bound to the angle measurement zone are read. The read camera parameters, ship attitude reference value, and towline launch point position are matched with the angle compensation record established in the offline calibration stage. If they match, the angle compensation value in the angle compensation record is read. If they do not match, the angle compensation record with the smallest difference from the camera parameters, ship attitude reference value, and towline launch point position is selected, and the angle compensation value in the angle compensation record is read. The angle compensation record is formed in the offline calibration stage based on the correspondence between camera parameters, ship attitude reference value, towline launch point position, and angle deviation.
[0133] The formula for the angle compensation value is expressed as follows:
[0134] ;
[0135] In the formula, This is the angle compensation value. This refers to the true angles formed during the offline calibration phase under the corresponding conditions of camera parameters, ship attitude reference values, and towline launch point location. The projection angle is obtained from the deck calibration image under the same corresponding conditions; the angle compensation value is used to characterize the deviation between the real angle and the projection angle, and serves as the basis for subsequent adjustment of the radial boundary position of the angle measurement zone.
[0136] It should be noted that during the offline calibration phase, the calibration towline is placed sequentially along the angle centerline positions of multiple angle measurement zones, and the actual angle of the calibration towline relative to the towline launch point is recorded using an angle measuring instrument. At the same time, the projected angle of the calibration towline in the semi-circular angle measurement area is read from the deck calibration image. The actual angle, projected angle, camera parameters, ship attitude reference value, and towline launch point position at the same calibration position are written into the same compensation calibration record, and the angle difference between the actual angle and the projected angle is used as the angle compensation value. Multiple compensation calibration records are combined to form an angle compensation record.
[0137] S3.8. Convert the angle compensation value into the partition boundary offset in the semi-circular angle measurement region, and use the partition boundary offset to adjust the radial boundary position between multiple angle measurement partitions to obtain the compensation partition boundary. Specifically,
[0138] Using the center of the measurement origin mark as the offset base point, the angle compensation value is mapped to the angle direction of the semicircular angle measurement area to form the partition boundary offset. When the angle compensation value is positive, the radial boundary position is adjusted along the direction of angle increase of the semicircular angle measurement area. When the angle compensation value is negative, the radial boundary position is adjusted along the direction of angle decrease of the semicircular angle measurement area. When the angle compensation value is zero, the radial boundary position remains unchanged. The radial boundary positions between multiple angle measurement partitions are adjusted synchronously according to the partition boundary offset, and the adjusted radial boundary positions are marked as the compensation partition boundaries.
[0139] The partition boundary offset is the radial boundary rotation amount corresponding to the angle compensation value within the semicircular angle measurement area. Taking the center of the measurement origin mark as the rotation center, the original radial boundary is rotated according to the angle direction corresponding to the angle compensation value, so that the rotated radial boundary, together with the inner and outer boundaries of the semicircle, defines the position of the compensated angle measurement partition boundary. When the angle compensation value is positive, the original radial boundary rotates in the direction of increasing angle in the semicircular angle measurement area; when the angle compensation value is negative, the original radial boundary rotates in the direction of decreasing angle in the semicircular angle measurement area; when the angle compensation value is zero, the original radial boundary remains in its original position.
[0140] S3.9. Using the compensation partition boundaries, redefine the angle measurement partitions to which each pixel in the tow cable measurement pixel band belongs, thus obtaining the compensation partition assignment. Specifically,
[0141] After writing the compensation partition boundary into the semi-circular angle measurement area, check the image coordinates of each pixel in the tow cable measurement pixel band one by one; when the image coordinates are located within the angle measurement partition enclosed by the adjacent compensation partition boundaries, the pixel is assigned to the corresponding angle measurement partition; when the image coordinates fall on the compensation partition boundary, the pixel is assigned to the angle measurement partition that the extension direction points to according to the extension direction of the tow cable measurement skeleton; after completing the assignment of all pixels in the tow cable measurement pixel band, the compensation partition assignment is obtained.
[0142] S3.10. Pixels that deviate from the extension direction of the tow cable measurement skeleton in the compensation partition assignment are delineated, while pixels that conform to the extension direction of the tow cable measurement skeleton are retained, forming a compensation pixel set. Specifically,
[0143] Using the direction from the starting connection point to the end of the tow cable measurement skeleton as the extension direction, check the position of each pixel in the compensation partition assignment relative to the tow cable measurement skeleton; if the pixel is continuously distributed along the extension direction and the angle measurement partition corresponding to the pixel is consistent with the angle measurement partition through which the tow cable measurement skeleton passes, the pixel is retained as a pixel that fits the extension direction of the tow cable measurement skeleton; if the pixel is not continuously distributed along the extension direction, or the angle measurement partition corresponding to the pixel is inconsistent with the angle measurement partition through which the tow cable measurement skeleton passes, the pixel is removed from the compensation partition assignment; the retained pixels form the compensation pixel set.
[0144] S3.11. Connect the set of compensated pixels into a compensated measurement pixel band extending along the direction of the towline departure point, specifically,
[0145] Starting from the initial connected point, the connection order of the compensation pixel set is arranged according to the eight-neighbor connection relationship of adjacent pixels in the compensation pixel set; compensation pixels with continuous connection relationship are merged into a compensation continuous pixel band, the starting position of the compensation continuous pixel band is the initial connected point, and the extension direction of the compensation continuous pixel band is from the initial connected point to the end of the compensation continuous pixel band; the compensation continuous pixel band is marked as the compensation measurement pixel band extending along the direction of the tow cable departure point.
[0146] S4. Determine the compensated angle according to the location of the compensated measurement pixel band in multiple angle measurement zones, and perform spatial conversion between the compensated angle and camera parameters, ship attitude reference value and tow cable departure point position to generate tow cable three-dimensional angle. Determine the priority angle measurement zone of the next frame of real-time deck measurement image through the tow cable three-dimensional angle.
[0147] S4.1. Based on the assignment results of the compensation measurement pixel band in the compensation partition assignment, first determine the angle measurement partition where the end of the compensation measurement pixel band is located, and read the corresponding angle midline position of the angle measurement partition in the optical angle measurement reference; when the end of the compensation measurement pixel band falls into a single angle measurement partition, the angle midline position of the angle measurement partition is determined as the compensated angle; when the end of the compensation measurement pixel band falls on the compensation partition boundary of an adjacent angle measurement partition, the angle midline position of the angle measurement partition pointed to by the extension direction of the compensation measurement pixel band from the starting connection point to the end of the compensation measurement pixel band is determined as the compensated angle.
[0148] The compensated angle is mapped to the camera coordinate system to form a tow cable direction ray pointing from the camera imaging position to the tow cable direction. The imaging position deviation of the tow cable direction ray in the image plane is corrected using the focal length and principal point position in the camera parameters. The viewing angle deviation of the tow cable direction ray relative to the deck working plane is corrected using the installation height, pitch angle, and yaw angle in the camera parameters to obtain the corrected tow cable direction ray. According to the roll angle, pitch angle, and bow angle in the ship attitude reference values, the corrected tow cable direction ray is transferred from the camera coordinate system to the ship coordinate system. The tow cable departure point is taken as the starting point of the tow cable direction ray in the ship coordinate system to form the tow cable spatial direction. The projection angle of the tow cable spatial direction on the horizontal plane of the ship coordinate system is recorded as the horizontal azimuth angle, and the rise angle of the tow cable spatial direction relative to the horizontal plane of the ship coordinate system is recorded as the elevation angle. The horizontal azimuth angle and the elevation angle together form the three-dimensional angle of the tow cable.
[0149] The formula for the three-dimensional angle of the towing cable is expressed as follows:
[0150] ;
[0151] ;
[0152] In the formula, It is the horizontal azimuth. The elevation angle, This represents the directional component of the tow cable's spatial direction on the transverse coordinate axis of the ship's coordinate system. The spatial direction of the tow cable is the directional component on the longitudinal axis of the ship's coordinate system. This represents the directional component of the tow cable's spatial direction on the vertical coordinate axis of the ship's coordinate system. The arctangent function is used to determine the corresponding angle based on the ratio between the directional components. The horizontal azimuth angle is used to characterize the projection direction of the tow cable spatial direction onto the horizontal plane of the ship's coordinate system, and the elevation angle is used to characterize the lifting direction of the tow cable spatial direction relative to the horizontal plane of the ship's coordinate system. The horizontal azimuth angle and the elevation angle together constitute the three-dimensional angle of the tow cable.
[0153] The angle measurement zone where the towed cable's three-dimensional angle is located after the angle compensation is determined is used as the center priority angle measurement zone of the next frame of the deck real-time measurement image. The angle measurement zones adjacent to the center priority angle measurement zone are used together as the priority angle measurement zones of the next frame of the deck real-time measurement image. This is used to limit the key angle measurement positions for towed cable area identification and coverage comparison in the next frame.
[0154] The spatial conversion process is as follows: First, the pixel direction of the towline ray in the real-time deck measurement image is determined based on the compensated angle. Then, according to the focal length and principal point position in the camera parameters, the pixel direction is converted into a normalized direction vector in the camera coordinate system. Subsequently, according to the installation height, pitch angle, and yaw angle in the camera parameters, the normalized direction vector is converted from the camera coordinate system to the installation coordinate system corresponding to the deck working plane. Then, according to the roll angle, pitch angle, and bow angle in the ship attitude reference values, the direction vector in the installation coordinate system is converted to the hull coordinate system, and the converted direction vector is recorded as the towline spatial direction. The direction components of the towline spatial direction on the transverse, longitudinal, and vertical coordinate axes of the hull coordinate system are respectively recorded as... , and .
[0155] This embodiment also provides a computer device applicable to the intelligent towing cable three-dimensional error compensation angle measurement method, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the intelligent towing cable three-dimensional error compensation angle measurement method as proposed in the above embodiment.
[0156] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0157] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the three-dimensional error compensation angle measurement method for intelligent towing cables as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0158] In summary, this invention corrects the partitioning of the towline measurement pixel band by using angle compensation values. This improves the adaptability of the towline angle detection results to changes in camera installation angle, ship attitude reference value, and towline departure point position. It also makes the partitioning results of the towline measurement pixel band in the semi-circular angle measurement area more consistent with the actual spatial direction of the towline. After the compensation measurement pixel band is formed, the compensated angle is no longer easily affected by image projection deviation. The horizontal azimuth and elevation angles in the three-dimensional angles of the towline have more stable measurement basis, thereby improving the continuity, accuracy, and reliability of the determination of the priority angle measurement partitions for towline spatial attitude judgment.
[0159] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A three-dimensional error compensation angle measurement method for intelligent towing cable, characterized in that: include, The semi-circular angle measurement area is divided with the towline launch point as the measurement origin. The semi-circular angle measurement area is further divided into multiple angle measurement zones under the fixed camera angle. The correspondence between the multiple angle measurement zones and the camera parameters, the ship attitude reference value and the towline launch point position is recorded to obtain the optical angle measurement reference. The measurement range of the real-time deck measurement image is defined by using an optical angle measurement reference. Within the measurement range, the tow cable area in the real-time deck measurement image is identified. The tow cable area is screened for connectivity along the tow cable departure point. Linear interference areas that are not continuously connected to the tow cable departure point are eliminated, forming a tow cable measurement pixel band. The coverage relationship between the tow cable measurement pixel band and multiple angle measurement zones is compared to determine the initial angle. The zone assignment of the tow cable measurement pixel band is corrected by the angle compensation value corresponding to the initial angle to obtain the compensated measurement pixel band. The compensated angle is determined by the position of the compensated measurement pixel band in multiple angle measurement zones. The compensated angle is then spatially converted with camera parameters, ship attitude reference value and tow cable departure point to generate tow cable three-dimensional angle. The tow cable three-dimensional angle is then used to determine the priority angle measurement zone of the next frame of real-time deck measurement image.
2. The three-dimensional error compensation angle measurement method for intelligent towing cable as described in claim 1, characterized in that: The towline departure point is the spatial location where the towline is led out of the hull structure and enters the external waters. The camera parameters are the focal length, principal point position, installation height, pitch angle, and yaw angle, which characterize the camera's imaging relationship. The ship attitude reference values are the reference values of the ship's roll angle, pitch angle, and heading angle recorded during the offline calibration phase; The location of the towline launch point is the spatial coordinate of the towline launch point in the ship's coordinate system. The real-time deck measurement images are real-time images collected by the deck monitoring equipment during towing operations for measuring the towing angle.
3. The three-dimensional error compensation angle measurement method for intelligent towing cable as described in claim 1, characterized in that: The process of dividing the semicircular angle measurement area into multiple angle measurement zones under a fixed camera viewpoint is specifically as follows: Set up a measurement origin mark at the towline departure point, and use the measurement origin mark as the center to draw the inner and outer boundaries of a semicircle on the deck working plane. Multiple plane reference points are set up along the outer boundary of the semicircle, and each plane reference point is matched with the measurement origin point to form multiple radial boundaries. Acquire deck calibration images from a fixed camera viewpoint; Locate the image center of the semicircular angle measurement region according to the measurement origin mark in the deck calibration image, and divide the semicircular angle measurement region according to the inner boundary, outer boundary and multiple radial boundaries to obtain multiple angle measurement partitions.
4. The three-dimensional error compensation angle measurement method for intelligent towing cable as described in claim 1, characterized in that: The process of identifying the towline area in the real-time measurement image of the deck within the measurement range specifically involves... By mapping the semicircular angle measurement area in the optical angle measurement reference to the real-time measurement image of the deck and retaining the image content within the semicircular angle measurement area, the measurement range image is obtained. Retrieve the pre-registered tow cable appearance information and organize the tow cable color, tow cable material and tow cable category into tow cable text prompts. The tow cable positioning area is obtained by matching the text prompts of the tow cable with the measurement range image. The image content within the tow cable positioning area is segmented at the pixel level, and the pixel content outside the tow cable positioning area is removed to generate the tow cable segmentation area. The tow cable segmentation area is mapped onto the real-time measurement image of the deck, and the image content where the tow cable is located is delineated by the outer contour of the tow cable segmentation area, thus forming the tow cable area in the real-time measurement image of the deck.
5. The three-dimensional error compensation angle measurement method for intelligent towing cable as described in claim 1, characterized in that: The formation of the tow cable measurement pixel band specifically refers to... Within the towline area in the real-time measurement image of the deck, mark the image position corresponding to the towline departure point as the starting connected point; Starting from the initial connected point, the adjacent pixels in the cable region are extended pixel by pixel, and the pixels that are continuously connected to the initial connected point are organized into the initial connected region. Following the pixel extension order from the starting connected point to the edge of the initial connected region, the center line of the linear pixels in the initial connected region is extracted, and the continuous pixels passed through by the center line are marked as the direction screening region. Connectivity verification is performed on linear pixels in the cable-dragging area that have not entered the directional screening area, and linear pixels that are not continuously connected to the directional screening area are marked as linear interference areas; The linear interference region is separated from the tow cable region, and the pixels in the direction screening region that are continuously connected to the starting connection point are marked as tow cable continuous pixels. Connect the continuous pixels of the tow cable into a tow cable measurement pixel band extending along the direction of the tow cable departure point.
6. The three-dimensional error compensation angle measurement method for intelligent towing cable as described in claim 1, characterized in that: The determination of the initial angle specifically involves, The tow cable measurement pixel band is compared with multiple angle measurement zones one by one, and the covered pixels of the tow cable measurement pixel band falling into multiple angle measurement zones are marked to form a covered pixel record. Skeletonization processing is performed on the tow cable measurement pixel band in the covered pixel record, and the continuous backbone of the tow cable measurement pixel band is marked as the tow cable measurement skeleton. According to the pixel direction from the tow cable departure point to the end of the tow cable measurement skeleton, the tow cable measurement skeleton is divided into continuous skeleton segments, and the angle measurement partitions of the continuous skeleton segments are recorded to form the skeleton passage record. Based on the skeleton's record, the angle measurement zones traversed by the tow cable measurement skeleton are defined, and the intersection position between the tow cable measurement skeleton and the radial boundary of the angle measurement zone is marked to form a boundary landing point record; The corresponding comparison is performed on the covering pixel record, skeleton passage record and boundary landing point record, and the angle measurement partition that simultaneously contains covering pixels, skeleton passage and boundary landing point is retained to form angle measurement candidate partitions; Mark the angle position of the candidate angle measurement partition in the semi-circular angle measurement region as the initial angle.
7. The three-dimensional error compensation angle measurement method for intelligent towing cable as described in claim 1, characterized in that: The obtained compensated measurement pixel band is specifically as follows: The initial angle is matched with the camera parameters, ship attitude reference value and tow cable launch point position in the optical angle measurement reference to obtain the angle compensation value corresponding to the initial angle. The angle compensation value is converted into the partition boundary offset in the semi-circular angle measurement area, and the radial boundary position between multiple angle measurement partitions is adjusted using the partition boundary offset to obtain the compensation partition boundary. The angle measurement partitions to which each pixel in the tow cable measurement pixel band belongs are redefined using the compensation partition boundaries to obtain the compensation partition assignment. Pixels that deviate from the extension direction of the tow cable measurement skeleton in the compensation partition are delineated, while pixels that fit the extension direction of the tow cable measurement skeleton are retained to form a compensation pixel set. The set of compensated pixels is connected into a compensated measurement pixel band that extends along the direction of the tow cable departure point.
8. The three-dimensional error compensation angle measurement method for intelligent towing cable as described in claim 1, characterized in that: The spatial conversion maps the compensated angle to a tow cable direction ray in the camera coordinate system, corrects the imaging deviation of the tow cable direction ray using camera parameters, and transfers the corrected tow cable direction ray to the ship coordinate system using the ship attitude reference value. The spatial direction of the tow cable is calibrated with the tow cable departure point as the ray starting point, generating a three-dimensional angle of the tow cable including the horizontal azimuth angle and the elevation angle.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the intelligent towing cable three-dimensional error compensation angle measurement method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the intelligent towing cable three-dimensional error compensation angle measurement method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Submarine heavy placer rapid detection method based on shipborne pull-type combined measurement
CN120255013A
Tug fusion enhanced perception method based on target tracking and obstacle recognition
CN121978728A