CN117906633A - Non-contact ship motion and displacement monitoring device suitable for ship lift test - Google Patents

Non-contact ship motion and displacement monitoring device suitable for ship lift test Download PDF

Info

Publication number
CN117906633A
CN117906633A CN202410313742.3A CN202410313742A CN117906633A CN 117906633 A CN117906633 A CN 117906633A CN 202410313742 A CN202410313742 A CN 202410313742A CN 117906633 A CN117906633 A CN 117906633A
Authority
CN
China
Prior art keywords
laser
curve
ship
motion
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410313742.3A
Other languages
Chinese (zh)
Other versions
CN117906633B (en
Inventor
殷成团
刘悦
徐昕
王金华
章卫胜
张金善
高正荣
张宏瑞
张帆
盛晓强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Hydraulic Research Institute of National Energy Administration Ministry of Transport Ministry of Water Resources
Original Assignee
Nanjing Hydraulic Research Institute of National Energy Administration Ministry of Transport Ministry of Water Resources
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Hydraulic Research Institute of National Energy Administration Ministry of Transport Ministry of Water Resources filed Critical Nanjing Hydraulic Research Institute of National Energy Administration Ministry of Transport Ministry of Water Resources
Priority to CN202410313742.3A priority Critical patent/CN117906633B/en
Publication of CN117906633A publication Critical patent/CN117906633A/en
Application granted granted Critical
Publication of CN117906633B publication Critical patent/CN117906633B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention discloses a non-contact ship movement and displacement monitoring device suitable for ship lift tests, which comprises a laser transmitter, a cover surface, a camera and a data processing unit, wherein the laser transmitter is used for transmitting laser to a specified direction; the cover surface is positioned on the light path of the laser emitter, and when the laser device works, laser forms a laser image on the cover surface; the camera shoots a laser image on the cover surface according to a preset period; the data processing unit receives the laser image of the camera, extracts laser curve data, reconstructs a three-dimensional laser space curve, performs motion decomposition, and obtains and outputs ship motion data. The computational complexity is reduced. Continuous tracking and parameter estimation of ship motion are realized through time sequence analysis and motion decomposition. The method has the advantages of wide application range, high precision, good real-time performance and high reliability.

Description

Non-contact ship motion and displacement monitoring device suitable for ship lift test
Technical Field
The invention relates to a non-contact monitoring technology for hydraulic engineering, in particular to a non-contact ship movement and displacement monitoring device suitable for ship lift tests.
Background
A ship lift is a large lifting device for transporting ships between waters of different heights. During use and testing of the ship lift, it is important to monitor the motions and displacements of the ship accurately in real time. Conventional monitoring methods typically rely on contact sensors such as potentiometers, strain gauges, and the like, such as the patents CN109443695A, CN106184614A and CN106568572a. These methods have a number of limitations: the installation is complicated, the environment is easy to interfere, the measuring range is limited, and the ship model to be measured can be damaged. Therefore, the development of the non-contact high-precision large-range ship motion and displacement monitoring device has important research significance and practical application value.
At present, the scholars at home and abroad have developed a certain research on non-contact ship motion and displacement monitoring technology, and have made a certain progress, but the scholars still face a plurality of challenges in practical application: the accuracy requirement of the test on the monitoring device is very high, and the prior art is difficult to meet the requirement of high accuracy. The non-contact monitoring technology has limited measurement range and is difficult to cover the whole operation area. The test requires real-time monitoring of the motions and displacements of the ship, and the data processing and transmission speeds of the prior art are to be improved. The existing monitoring technology cannot be directly used on prototypes, and most of the existing monitoring technology is used for model experiments. It remains a challenge to integrate non-contact monitoring technology with a prototype of a marine riser and to ensure long-term stable, reliable operation.
Therefore, there is a need to develop a non-contact ship motion and displacement monitoring device with high precision, large range, strong environmental adaptability, good real-time performance and high reliability, so as to meet the requirements of ship elevator testing and improve the testing efficiency and safety.
Disclosure of Invention
The invention aims to provide a non-contact ship motion and displacement monitoring device suitable for ship lift test
According to an aspect of the present application, there is provided a non-contact ship motion and displacement monitoring device suitable for ship lift test, comprising:
a laser emitter for emitting laser light in a specified direction;
the cover surface is positioned on the light path of the laser transmitter, and when the laser device works, a laser image is formed on the cover surface by the laser;
A camera for shooting laser images on the cover surface according to a preset period;
And the data processing unit is used for receiving the laser image of the camera, extracting laser curve data, reconstructing a three-dimensional laser space curve, performing motion decomposition, obtaining ship motion data and outputting the ship motion data.
According to one aspect of the application, the data processing unit comprises:
the preprocessing module is used for sequentially receiving each frame of laser image and a shooting time stamp of each frame of laser image; then, performing enhancement processing on the laser image to obtain a laser image with definition larger than a threshold value;
the laser curve extraction module is used for extracting pixel coordinates of a laser curve from each frame of laser image by adopting an edge detection algorithm, performing polynomial fitting or spline fitting, and removing abnormal laser curves according to a preset curvature and symmetry threshold value to obtain smooth continuous laser curves meeting preset standards;
The laser curve three-dimensional reconstruction module converts each pixel coordinate of each laser curve into a space coordinate through a coordinate conversion matrix to obtain a three-dimensional space coordinate of each laser point, and the three-dimensional space coordinate is connected with each laser point to form a three-dimensional laser curve; performing precision optimization on the three-dimensional laser curve through prestored overlay geometrical parameters;
And the motion decomposition module acquires three-dimensional laser curves at two adjacent moments one by one, invokes a preconfigured algorithm, calculates a rigid body transformation matrix, and the rigid body transformation matrix comprises a rotation matrix and a translation vector, decomposes the rigid body transformation matrix into rotation angles around an X axis, a Y axis and a Z axis and translation quantities along the X axis, the Y axis and the Z axis, performs time sequence filtering on the rotation and the translation quantities obtained by decomposition between any two adjacent moments, and obtains and outputs motion parameters.
According to one aspect of the application, the data processing unit further comprises:
The motion integration module is used for selecting a preset time period, accumulating the rotation quantity and the movement quantity in the time interval formed by each adjacent moment according to the time sequence, and obtaining the accumulated rotation angle and the accumulated movement distance of the ship relative to the initial position and the gesture in the time period; and constructing a ship coordinate system, and converting the accumulated rotation and movement amount of the ship to a fixed coordinate system to obtain the position and the posture of the ship at each moment.
According to one aspect of the application, the data processing unit further comprises:
The precision evaluation module is used for acquiring an inertial navigation device pre-configured on the ship, acquiring the ship motion parameters, comparing the ship motion parameters with the motion parameters output by the data processing unit at corresponding moments, and giving out precision comparison results under each motion state, wherein the motion states comprise motion states of different speed intervals and different amplitude intervals.
According to one aspect of the application, the preprocessing module comprises:
The dimension reduction sub-module is used for successively receiving each frame of laser image, converting the RGB color image into a gray level image or decomposing the channels to obtain a laser image data frame of each channel;
the filtering sub-module is used for filtering the gray level image or the laser image data frame of each channel, so that the signal to noise ratio is improved;
and the enhancer module is used for carrying out histogram equalization on the filtered gray level image or the laser image data frame of each channel and enhancing the image contrast.
According to one aspect of the application, the laser curve extraction module comprises:
The self-adaptive threshold segmentation submodule adopts a maximum entropy method and determines an optimal threshold according to the gray level distribution of the laser image; binarizing the laser image data based on an optimal threshold value to obtain two areas of a foreground and a background; sequentially carrying out open operation and close operation on the binarization result, removing isolated noise points and filling curve break points to obtain a binarized laser image;
The contour extraction submodule carries out contour extraction operation on the binarized laser image by using a Moore-Neighbor contour tracking algorithm to obtain contour pixel coordinates of a laser curve; screening the profile coordinates, removing the profile with the length smaller than the threshold value, and reserving the longest profile as the initial approximation of the laser curve; sequencing the contour coordinates clockwise or anticlockwise to obtain a continuous and ordered contour point sequence;
the sub-pixel edge detection sub-module is used for carrying out local Gaussian fitting on each contour point in the contour point sequence, carrying out edge positioning of sub-pixel level in the normal direction of the curve, adopting a least square method to fit the sub-pixel edge points to obtain a fitting laser curve with smoothness meeting expectations, and calculating first-order and second-order derivatives of the fitting laser curve to obtain the tangential direction and curvature of the laser curve at each point;
The self-adaptive node selection sub-module is used for self-adaptively selecting key points as nodes according to the geometric characteristics of the laser curve,
Screening the key points, removing redundant nodes and singular points to obtain a minimum node set, and re-performing segment fitting on the curve by using the node set, wherein the segment polynomial fitting and segment spline fitting are included;
and the iterative optimization sub-module is used for calculating the distance error between the fitting laser curve and the original contour point, constructing an error function, minimizing the error function by using a gradient descent method, updating parameters of the fitting laser curve until the best fitting laser curve is obtained, and outputting a smooth continuous laser curve meeting a preset standard.
According to one aspect of the application, the laser curve three-dimensional reconstruction module comprises:
The coordinate conversion sub-module is used for converting the pixel coordinates into normalized camera coordinates according to the pixel coordinates of the laser curve obtained by fitting and the parameters in the camera; projecting the normalized camera coordinates onto a laser plane by utilizing a laser plane equation to obtain three-dimensional coordinates of a laser curve under a camera coordinate system; converting the laser curve from a camera coordinate system to a world coordinate system by using external parameters of the camera to obtain global three-dimensional representation of the curve, and obtaining a three-dimensional laser curve; optimizing the precision of a laser curve through engineering parameters including geometrical parameters of the cover surface;
The time sequence registration sub-module is used for carrying out time sequence alignment on the optimized laser curve at each moment according to the time stamp to obtain a time-synchronous three-dimensional curve sequence; carrying out spatial registration on the curves at different moments by utilizing the characteristic points on the curves; and interpolating or resampling the three-dimensional curve to obtain a laser curve sequence with equal intervals and equal lengths.
According to one aspect of the application, the data processing unit further comprises:
The motion estimation module is used for acquiring the position and the gesture of the ship at each moment, representing the motion track of the ship as a gesture graph, each node represents the gesture of the ship body in one time segment, and each side represents the relative motion constraint between adjacent time segments; according to the initial motion estimation obtained by the visual odometer, giving initial values to nodes and edges of the gesture graph, constructing an objective function comprising a relative motion error and a global consistency error, and calling a graph optimization library to solve the objective function to obtain the optimal estimation of the gesture graph; and carrying out smoothing treatment on the optimized attitude diagram to obtain a motion trail in a future period of the ship.
According to one aspect of the application, the data processing unit further comprises:
And the gesture early warning module is used for acquiring current ship motion data or motion tracks in a future period of the ship, analyzing the motion gesture, judging whether the motion gesture exceeds a threshold value, and outputting control and alarm information if the motion gesture exceeds the threshold value.
According to one aspect of the application, the cover is a reducing arcuate cover.
The method has the beneficial effects that the three-dimensional measurement problem is converted into the two-dimensional laser curve analysis problem by using the cover surface, so that the calculation complexity is reduced. Continuous tracking and parameter estimation of ship motion are realized through time sequence analysis and motion decomposition. By adopting a modularized data processing flow, each step can be independently optimized and improved, and the flexibility and expandability of the system are improved. The method has the advantages of wide application range, high precision, good real-time performance and high reliability.
Drawings
Fig. 1 is a top view of a ship lift model.
Fig. 2 is a side view of a ship lift model.
Fig. 3 is a system configuration diagram of the monitoring device of the present invention.
Fig. 4 is a topology of a data processing unit of the present invention.
In the drawings, reference numerals are: vessel 1, ship lift 2, frame 3, top facing 4, laser emitter 5.
Detailed Description
As shown in fig. 1, according to an aspect of the present application, there is provided a non-contact ship motion and displacement monitoring device suitable for a ship lift test, comprising:
a laser emitter for emitting laser light in a specified direction;
the cover surface is positioned on the light path of the laser transmitter, and when the laser device works, a laser image is formed on the cover surface by the laser;
A camera for shooting laser images on the cover surface according to a preset period;
And the data processing unit is used for receiving the laser image of the camera, extracting laser curve data, reconstructing a three-dimensional laser space curve, performing motion decomposition, obtaining ship motion data and outputting the ship motion data.
It should be noted that fig. 1 and fig. 2 are only schematic views, and in practice, the model and prototype of the ship lift are relatively large and complex, and the schematic views are used to highlight the innovation points of the present application. Aiming at the problems existing in the prior art, the application provides a novel non-contact ship movement and displacement monitoring device, realizes high-precision, real-time and on-line monitoring of six-degree-of-freedom movement of a ship by utilizing a laser vision technology, has the advantages of non-contact, large range, high precision, all weather and the like, and provides a novel, reliable and efficient movement monitoring means for ship lift tests. The method is characterized in that an active structured light measuring principle is utilized, laser is projected in a specified direction through a laser emitter, a laser stripe pattern is formed on a cover surface, then a camera collects the stripe pattern, and further three-dimensional morphology and motion gesture information of the ship surface are recovered through image processing and three-dimensional reconstruction technology.
In the system architecture, the system mainly comprises four layers of a perception layer, a data layer, a decision layer and an application layer. The sensing layer comprises hardware equipment such as a laser emitter, an arc cover surface, a high-speed camera and the like, is responsible for projection, modulation and acquisition of laser stripes and is the basis of information sensing. The data layer comprises a data processing module such as image preprocessing, laser curve extraction, three-dimensional reconstruction, space-time registration and the like, and is responsible for converting original laser image data into time sequence three-dimensional point cloud data, which is the core of information processing. The decision layer comprises intelligent algorithm modules such as motion decomposition, attitude estimation, track prediction, precision estimation and the like, is responsible for extracting motion attitude parameters of the ship from three-dimensional point cloud data and generating a future motion track of a ship model, and is a key of information analysis. The application layer comprises application service modules such as man-machine interaction, data visualization, alarm decision and the like, is responsible for displaying, inquiring, early warning and outputting monitoring results, and is a terminal of information application.
According to one aspect of the application, the data processing unit comprises:
the preprocessing module is used for sequentially receiving each frame of laser image and a shooting time stamp of each frame of laser image; then, performing enhancement processing on the laser image to obtain a laser image with definition larger than a threshold value;
By carrying out enhancement processing on the laser image, the definition of the image is improved, and the subsequent laser curve extraction and three-dimensional reconstruction are facilitated. The definition threshold is introduced, so that high-quality laser images can be automatically screened out, and the influence of noise and interference is reduced. And the time stamp is adopted to synchronize the laser images, so that the time sequence and consistency of the data are ensured.
The laser curve extraction module is used for extracting pixel coordinates of a laser curve from each frame of laser image by adopting an edge detection algorithm, performing polynomial fitting or spline fitting, and removing abnormal laser curves according to a preset curvature and symmetry threshold value to obtain smooth continuous laser curves meeting preset standards;
By adopting an edge detection algorithm, the pixel coordinates of the laser curve can be accurately extracted from the laser image. And smoothing the extracted pixel coordinates by polynomial fitting or spline fitting to obtain a smooth continuous laser curve. The curvature and symmetry threshold values are introduced, so that abnormal laser curves can be automatically removed, and the reliability of data is improved.
The laser curve three-dimensional reconstruction module converts each pixel coordinate of each laser curve into a space coordinate through a coordinate conversion matrix to obtain a three-dimensional space coordinate of each laser point, and the three-dimensional space coordinate is connected with each laser point to form a three-dimensional laser curve; performing precision optimization on the three-dimensional laser curve through prestored overlay geometrical parameters;
The pixel coordinates are converted into space coordinates through the coordinate conversion matrix, so that mapping from the two-dimensional image to the three-dimensional space is realized. And 3, the precision of the three-dimensional laser curve is optimized by utilizing the prestored geometrical parameters of the cover surface, so that the precision of three-dimensional reconstruction is improved. A three-dimensional laser curve is formed by connecting laser points, so that a foundation is provided for subsequent motion decomposition.
And the motion decomposition module acquires three-dimensional laser curves at two adjacent moments one by one, invokes a preconfigured algorithm, calculates a rigid body transformation matrix, and the rigid body transformation matrix comprises a rotation matrix and a translation vector, decomposes the rigid body transformation matrix into rotation angles around an X axis, a Y axis and a Z axis and translation quantities along the X axis, the Y axis and the Z axis, performs time sequence filtering on the rotation and the translation quantities obtained by decomposition between any two adjacent moments, and obtains and outputs motion parameters.
By calculating the rigid body transformation matrix between the three-dimensional laser curves at adjacent moments, the motion state of the object can be accurately described. The rigid body transformation matrix is decomposed into rotation angle and translation quantity, and rotation and movement of the object on three coordinate axes are intuitively represented. The time series filtering is carried out on the rotation and the movement quantity, so that noise and jitter in the motion parameters are eliminated, and the stability of motion decomposition is improved.
In this embodiment, appropriate image processing algorithms, such as image enhancement and edge detection, are used to improve the data quality and accuracy of feature extraction. Reasonable threshold values and constraint conditions, such as a definition threshold value, a curvature threshold value and a symmetry threshold value, are introduced, high-quality data are automatically screened out, and manual intervention is reduced.
In summary, accurate mapping and reconstruction from two-dimensional images into three-dimensional space is achieved using coordinate transformation and geometric optimization techniques. The motion state of the object is accurately described by adopting a rigid body transformation and matrix decomposition method, and the stability of motion parameters is improved by time sequence filtering. The whole data processing unit adopts a modularized design, the modules are tightly connected, the data flow is smooth, and the overall processing efficiency and reliability are improved.
According to one aspect of the application, the data processing unit further comprises:
The motion integration module is used for selecting a preset time period, accumulating the rotation quantity and the movement quantity in the time interval formed by each adjacent moment according to the time sequence, and obtaining the accumulated rotation angle and the accumulated movement distance of the ship relative to the initial position and the gesture in the time period; and constructing a ship coordinate system, and converting the accumulated rotation and movement amount of the ship to a fixed coordinate system to obtain the position and the posture of the ship at each moment.
In the embodiment, the motion integration module adds up the rotation quantity and the movement quantity in the time period and converts the coordinate system, so that the motion track and the gesture change of the ship can be accurately described. The cumulative rotation angle and the cumulative movement distance of the ship relative to the initial position and the posture in the time period can be obtained through integration, and the motion track and the posture change of the ship in a period of time can be accurately described. The absolute position and the gesture of the ship at each moment can be obtained through coordinate conversion, and the relative motion quantity of the ship can be converted into the absolute position and the gesture, so that the subsequent analysis and visualization are convenient. While ensuring the calculation efficiency, a sufficiently fine motion trajectory and attitude change are obtained. By adopting a high-precision integration algorithm, such as a Dragon-Kutta method or a trapezoidal method, the accumulation of integration errors can be reduced, and the accuracy of motion parameters can be improved.
According to one aspect of the application, the data processing unit further comprises:
The precision evaluation module is used for acquiring an inertial navigation device pre-configured on the ship, acquiring the ship motion parameters, comparing the ship motion parameters with the motion parameters output by the data processing unit at corresponding moments, and giving out precision comparison results under each motion state, wherein the motion states comprise motion states of different speed intervals and different amplitude intervals.
In the present embodiment, by comparing the real motion parameter with the motion parameter output from the data processing unit, the accuracy and reliability of the data processing unit can be evaluated. The performance of the data processing unit under various motion conditions can be comprehensively examined, and the method is helpful for finding and improving the defects of the algorithm under specific working conditions. The algorithm and the parameters of the data processing unit can be optimized and adjusted through the feedback of the precision evaluation module, and the overall precision and the robustness of the system are improved. The accuracy evaluation result can also be used as an objective index of system performance, and a trusted reference is provided for a user. In a word, the accuracy evaluation module gives accuracy comparison results under each motion state through data comparison with the inertial navigation device, and provides objective basis for system performance evaluation and optimization.
According to one aspect of the application, the preprocessing module comprises:
The dimension reduction sub-module is used for successively receiving each frame of laser image, converting the RGB color image into a gray level image or decomposing the channels to obtain a laser image data frame of each channel;
by converting the RGB color image into a gray scale image or performing channel decomposition, the dimension reduction sub-module can significantly reduce the dimension of the data, thereby reducing the computational complexity and the storage overhead of subsequent processing. The RGB image is decomposed into three independent single-channel images of red, green and blue, so that the complete information of each channel can be reserved, and the subsequent targeted processing of different channels is facilitated. The data dimension is reduced, the calculated amount and the storage space are reduced, and meanwhile, the key information of the image is reserved, so that a foundation is laid for subsequent filtering and enhancement processing.
The filtering sub-module is used for filtering the gray level image or the laser image data frame of each channel, so that the signal to noise ratio is improved;
Noise in the image can be effectively removed, the signal to noise ratio is improved, and the image is smoother and clearer. The filtering algorithm comprises mean filtering, median filtering, gaussian filtering and the like. The mean value filtering removes Gaussian noise by arithmetic average of pixel values in the local area; median filtering removes impulse noise and pretzel noise by the median of pixel values in the local area; the gaussian filtering smoothes the image by weighted averaging, the weights being determined by a gaussian function, the weights of the center pixels being the largest. Appropriate filtering algorithms and parameters, such as the size, shape, weight distribution, etc., of the filter kernel can be selected according to the noise type and the image characteristics, so as to achieve the optimal filtering effect. In a word, various noises in the image are removed, the signal to noise ratio is improved, and the image is smoother and clearer.
And the enhancer module is used for carrying out histogram equalization on the filtered gray level image or the laser image data frame of each channel and enhancing the image contrast. The contrast of the image can be obviously enhanced, and the details of the image are clearer and more prominent. The gray value is mapped according to a Cumulative Distribution Function (CDF) by calculating the gray histogram of the image, so that the mapped gray value distribution is more uniform. An appropriate histogram equalization algorithm, such as global histogram equalization, local histogram equalization, adaptive histogram equalization, etc., is selected to obtain the best enhancement effect. In a word, the contrast and dynamic range of the image are improved, so that the details of the image are clearer and more prominent, and the subsequent feature extraction and analysis are facilitated. Especially for images with serious problems such as low contrast, dark areas, bright areas and the like, the enhancer module can effectively improve the image quality and the information utilization rate.
In the embodiment, the quality and usability of the laser image can be comprehensively improved through the cooperative work of the three sub-modules including dimension reduction, filtering and enhancement. The dimension reduction submodule reduces the data dimension and the calculation load; the filtering submodule removes image noise and improves the signal to noise ratio; the enhancement submodule improves the image contrast and highlights key details.
According to one aspect of the application, the laser curve extraction module comprises:
The self-adaptive threshold segmentation submodule adopts a maximum entropy method and determines an optimal threshold according to the gray level distribution of the laser image; binarizing the laser image data based on an optimal threshold value to obtain two areas of a foreground and a background; sequentially carrying out open operation and close operation on the binarization result, removing isolated noise points and filling curve break points to obtain a binarized laser image;
The optimal threshold value is determined in a self-adaptive mode by the maximum entropy method, the optimal segmentation threshold value can be automatically selected according to the gray level distribution characteristics of the laser image, manual intervention is not needed, and objectivity and adaptability of threshold value selection are improved. The laser image is binarized based on the optimal threshold value, so that a foreground (laser curve) area and a background area can be effectively distinguished, and a foundation is laid for subsequent contour extraction. And (3) performing open operation and close operation on the binarization result, removing isolated noise points, and filling small break points on the curve so that the binarized laser image is cleaner and more complete. In a word, the submodule automatically obtains an optimal segmentation threshold value, effectively distinguishes the foreground and the background, eliminates noise points and break points through morphological operation, and provides a high-quality binarized image for contour extraction.
The contour extraction submodule carries out contour extraction operation on the binarized laser image by using a Moore-Neighbor contour tracking algorithm to obtain contour pixel coordinates of a laser curve; screening the profile coordinates, removing the profile with the length smaller than the threshold value, and reserving the longest profile as the initial approximation of the laser curve; sequencing the contour coordinates clockwise or anticlockwise to obtain a continuous and ordered contour point sequence;
The contour extraction is carried out on the binary image by using a Moore-Neighbor contour tracking algorithm, so that the contour pixel coordinates of the laser curve can be rapidly and accurately obtained, and the algorithm has good noise resistance and robustness. The extracted contour coordinates are subjected to length screening, short and nonsensical contours are removed, the longest contour is reserved as the initial approximation of a laser curve, and interference and error contours can be effectively removed. And the contour coordinates are ordered clockwise or anticlockwise to obtain a continuous and ordered contour point sequence, so that convenience is provided for subsequent sub-pixel edge detection and node selection. In a word, the submodule can rapidly and accurately obtain the contour coordinates of the laser curve, and a clean, continuous and ordered contour point sequence is obtained through length screening and sequencing treatment, so that a foundation is laid for subsequent treatment.
The sub-pixel edge detection sub-module is used for carrying out local Gaussian fitting on each contour point in the contour point sequence, carrying out edge positioning of sub-pixel level in the normal direction of the curve, adopting a least square method to fit the sub-pixel edge points to obtain a fitting laser curve with smoothness meeting expectations, and calculating first-order and second-order derivatives of the fitting laser curve to obtain the tangential direction and curvature of the laser curve at each point;
And carrying out local Gaussian fitting on each point in the contour point sequence, and carrying out sub-pixel level edge positioning in the curve normal direction, so that the resolution of the traditional pixel level can be exceeded, and a more accurate edge position can be obtained. And fitting the edge points of the sub-pixels by adopting a least square method to obtain a fit laser curve with good smoothness, so that the influence of noise points and outliers can be effectively reduced, and the smoothness and continuity of the curve are improved. And calculating first and second derivatives of the fitted curve to obtain tangential directions and curvatures of the curve at each point, and providing important geometric information for subsequent node selection and feature analysis. The sub-module obtains a fitting laser curve with higher precision and better smoothness through edge positioning and fitting at a sub-pixel level, extracts geometric features such as tangential direction and curvature of the curve, and provides powerful support for subsequent processing.
The self-adaptive node selection sub-module is used for self-adaptively selecting key points as nodes according to the geometric characteristics of the laser curve,
Screening the key points, removing redundant nodes and singular points to obtain a minimum node set, and re-performing segment fitting on the curve by using the node set, wherein the segment polynomial fitting and segment spline fitting are included;
According to the geometric characteristics of the laser curve, such as curvature, tangential direction and the like, key points are selected in a self-adaptive mode to serve as nodes, and the shape characteristics of the curve can be reserved to the greatest extent while the minimum number of the nodes is ensured. And screening the selected nodes, removing redundant nodes and singular points to obtain a minimum number of node sets, further compressing the data volume and improving the storage and transmission efficiency. And (3) performing piecewise polynomial fitting and piecewise spline fitting on the curve by using the optimized node set, and adopting different fitting modes on different curve segments to improve fitting precision and flexibilities. The submodule selects and optimizes nodes driven by geometric features, minimizes the number of the nodes, simultaneously maximally reserves the shape features of the curve, and improves fitting precision and flexibly adapts to different curve segments through piecewise fitting.
And the iterative optimization sub-module is used for calculating the distance error between the fitting laser curve and the original contour point, constructing an error function, minimizing the error function by using a gradient descent method, updating parameters of the fitting laser curve until the best fitting laser curve is obtained, and outputting a smooth continuous laser curve meeting a preset standard.
By calculating the distance error between the fitted laser curve and the original contour point, an error function is constructed, the difference between the fitted curve and the real curve is quantized, and a clear optimization target is provided for iterative optimization. The gradient descent method is utilized to minimize an error function, and parameters of the fitting curve are continuously updated in an iterative mode, so that the fitting curve gradually approaches to a real curve, and the fitting precision and stability are improved. By setting iteration stop conditions such as an error threshold value, iteration times and the like, the calculation time and the resource consumption can be controlled while the fitting precision is ensured, and the practicability and the efficiency of the algorithm are improved. The sub-module continuously updates and improves the fitting curve through error-driven iterative optimization, and finally obtains the best fitting result of the highly approximated real curve, thereby meeting the predetermined requirements of smoothness and continuity.
In a word, the laser curve extraction module realizes accurate, stable and efficient extraction of smooth and continuous laser curves from laser images through a series of technical means such as self-adaptive threshold segmentation, contour extraction, sub-pixel edge detection, self-adaptive node selection, iterative optimization and the like. The technical advantages and effects ensure that the extracted laser curve has high geometric accuracy, topological accuracy and data simplicity, and a solid data foundation is laid for subsequent three-dimensional reconstruction, motion decomposition and posture estimation.
According to one aspect of the application, the laser curve three-dimensional reconstruction module comprises:
The coordinate conversion sub-module is used for converting the pixel coordinates into normalized camera coordinates according to the pixel coordinates of the laser curve obtained by fitting and the parameters in the camera; the scale and offset difference between the image coordinate system and the camera coordinate system is eliminated, and a coordinate basis is laid for the subsequent three-dimensional reconstruction.
Projecting the normalized camera coordinates onto a laser plane by utilizing a laser plane equation to obtain three-dimensional coordinates of a laser curve under a camera coordinate system; the geometric transformation from the two-dimensional image to the three-dimensional space is realized, and the accuracy and consistency of the three-dimensional coordinates are ensured.
Converting the laser curve from a camera coordinate system to a world coordinate system by using external parameters of the camera to obtain global three-dimensional representation of the curve, and obtaining a three-dimensional laser curve; the laser curves at different moments and different visual angles can be unified into the same global coordinate frame, so that subsequent spatial registration and fusion are facilitated.
Optimizing the precision of a laser curve through engineering parameters including geometrical parameters of the cover surface; the accuracy and reliability of three-dimensional reconstruction are further improved, and the influence of system errors and measurement noise is reduced.
Through a series of coordinate transformation and optimization operations, the two-dimensional laser curve is accurately and efficiently reconstructed into a three-dimensional space curve and unified under a global coordinate system, and high-quality three-dimensional data is provided for subsequent time sequence registration and motion analysis.
The time sequence registration sub-module is used for carrying out time sequence alignment on the optimized laser curve at each moment according to the time stamp to obtain a time-synchronous three-dimensional curve sequence; the time synchronism and consistency of curves at different moments are ensured, and the influence of time offset and jitter is eliminated.
Carrying out spatial registration on the curves at different moments by utilizing the characteristic points on the curves; and interpolating or resampling the three-dimensional curve to obtain a laser curve sequence with equal intervals and equal lengths. The characteristic points on the curves, such as inflection points, sharp points, intersection points and the like, are utilized to carry out spatial registration on the curves at different moments, and the curves at different moments are aligned to the same spatial coordinate system through characteristic point matching and coordinate transformation, so that spatial consistency on a time sequence is realized.
And the three-dimensional laser curves are reconstructed at equal intervals and equal length through interpolation or resampling operation, so that the curves at different moments have the same sampling rate and data length, and subsequent motion analysis and feature extraction are facilitated. The technical effect of the time sequence registration sub-module is that three-dimensional laser curves at different moments are aligned to a unified space-time coordinate system through time synchronization and space registration, the influence of time offset and space deviation is eliminated, a curve sequence with continuous time and consistent space is obtained, and high-quality data support is provided for motion analysis and feature extraction.
The high-precision and high-efficiency reconstruction from the two-dimensional laser image to the three-dimensional space-time curve sequence is realized through the cooperative work of the two sub-modules of coordinate conversion and time sequence registration. The coordinate conversion sub-module accurately maps the two-dimensional curve to a three-dimensional space through a series of coordinate transformation and optimization operations, and unifies the two-dimensional curve to a global coordinate system; the time sequence registration sub-module aligns three-dimensional curves at different moments to a unified space-time coordinate system through time synchronization and space registration, and a curve sequence with continuous time and consistent space is obtained. The reconstructed three-dimensional laser curve is guaranteed to have high geometric precision, space-time consistency and data integrity, and a solid data foundation is laid for subsequent motion analysis, feature extraction and model reconstruction.
According to one aspect of the application, the data processing unit further comprises:
The motion estimation module is used for acquiring the position and the gesture of the ship at each moment, representing the motion track of the ship as a gesture graph, each node represents the gesture of the ship body in one time segment, and each side represents the relative motion constraint between adjacent time segments; according to the initial motion estimation obtained by a Visual Odometer (VO), giving initial values to nodes and edges of the gesture graph, constructing an objective function comprising a relative motion error and a global consistency error, and calling a graph optimization library to solve the objective function to obtain the optimal estimation of the gesture graph; and carrying out smoothing treatment on the optimized attitude diagram to obtain a motion trail in a future period of the ship.
By representing the motion trail of the ship as a gesture graph, each node represents the gesture of the ship body in one time segment, and each side represents the relative motion constraint between adjacent time segments, so that the compact and efficient representation of the ship motion is realized, and the subsequent optimization and processing are facilitated. The initial motion estimation obtained by the visual odometer is utilized to endow initial values to nodes and edges of the gesture graph, a good optimization starting point is provided, the optimization convergence speed is accelerated, and the estimation precision is improved. By constructing an objective function comprising a relative motion error and a global consistency error, the constraint of local relative motion and global absolute position is comprehensively considered, and the accuracy and the robustness of motion estimation are improved. The call diagram optimization library solves the objective function, utilizes the existing optimization algorithm and tools such as g2o and Ceres, avoids complex mathematical deduction and programming realization, and improves the development efficiency and reliability. And carrying out smoothing treatment on the optimized attitude diagram to obtain a motion track in a future period of the ship, and realizing prediction and planning of the ship motion.
Through gesture graph representation and graph optimization solution, multi-time and multi-constraint information is comprehensively utilized, uncertainty and error accumulation of single-time estimation are effectively reduced, and high-precision motion estimation is realized. By introducing global consistency errors, the integrity and continuity of the motion trail are considered, drift and inconsistency of local estimation are effectively eliminated, and global consistency of estimation results is ensured. By constructing an objective function comprising a relative motion error and a global consistency error, the robustness of motion estimation to noise, outliers and external disturbance is improved, and the fault tolerance and adaptability of the system are enhanced. By adopting the incremental graph optimization strategy, when new observation data arrives, only the local posture graph is updated and optimized, global repeated calculation is avoided, and the real-time performance and the calculation efficiency of motion estimation are improved. By carrying out smooth processing on the optimized attitude diagram, the motion trail of the ship in the future period is obtained, the prediction and planning of the ship motion are realized, an important basis is provided for subsequent control and decision, and the autonomy and the intelligence of the system are improved.
In a certain embodiment, the specific data processing flow is:
Data preparation: visual odometer data of the vessel is obtained over a period of time, including position and attitude estimates for each moment. IMU data, including angular velocity and acceleration measurements, over the same time period is acquired. And acquiring the initial position and the attitude of the ship as the prior information of the optimization.
Building a posture graph: and creating a posture graph node for each moment according to the visual odometer data, wherein the posture graph node represents the posture of the ship body at the moment. And creating a gesture graph edge between adjacent nodes according to the visual odometer estimation between adjacent moments, and representing relative motion constraint. And adding IMU edges between adjacent nodes according to the IMU data to represent the relative motion information observed by the IMU.
And (3) optimizing and solving the diagram: and constructing an error function, wherein the error function comprises an error term of a visual odometer side, an error term of an IMU side and a global consistency error term. And solving an error function by using a graph optimization library such as g2o or Ceres and the like to obtain an optimal estimated value of the gesture graph node. And updating the position and attitude estimation of the ship body at each moment according to the optimization result.
Track smoothing: the optimized pose graph is smoothed, for example, a B-spline curve is used for fitting a position track, and a spherical linear interpolation (Slerp) is used for interpolating the pose. And predicting the motion track of the ship in a future period according to the smoothed track.
Evaluation of results: and comparing the motion estimation result with other sensor data (such as GPS, distance meter and the like) to evaluate the estimation accuracy. And carrying out statistical analysis on estimation results under different scenes and different working conditions, and evaluating the robustness and adaptability of the algorithm. And evaluating the real-time performance, recording the calculation time of single estimation, and evaluating the real-time performance and the calculation efficiency of the algorithm.
According to one aspect of the application, the data processing unit further comprises:
And the gesture early warning module is used for acquiring current ship motion data or motion tracks in a future period of the ship, analyzing the motion gesture, judging whether the motion gesture exceeds a threshold value, and outputting control and alarm information if the motion gesture exceeds the threshold value.
The ship motion data can be obtained in real time, including position, speed, acceleration, angular velocity and the like, and the real-time monitoring and analysis of the ship attitude are realized through high-frequency data acquisition and processing, so that the timeliness of early warning is ensured. The motion trail of the ship in a future period can be predicted, the early warning of the potential dangerous gesture is realized through the early analysis and evaluation of the future gesture, and more reaction time is provided for ship control and emergency decision. The method comprehensively considers various motion parameters such as pitch angle, roll angle, course angle, speed, acceleration and the like, comprehensively evaluates the attitude state of the ship through joint analysis and judgment of different parameters, and improves the accuracy and reliability of early warning.
According to one aspect of the application, the cover is a reducing arcuate cover.
Regarding the cover surface, through simulation analysis and experimental test, the optimal curvature radius range is determined, and the laser imaging quality and the ship movement range are considered. And the sectional reducing design is adopted, and gradual transition areas are arranged at the two ends of the cover surface, so that the influence of end effect on imaging quality is reduced. The axial length of the cover surface is optimized, and the laser stripe is ensured to completely cover the ship body when the ship moves longitudinally.
And the flexible supporting structure is designed, and an elastic vibration damper is adopted, so that the influence of ship vibration on the cover surface is reduced. The positions and the number of the supporting points are optimized, the uniform stress of the cover surface is ensured, and the deformation meets the requirements. And a quick assembly and disassembly structure is adopted, so that the cover surface is convenient to install, debug and maintain.
Regarding laser curve extraction, further comprising:
S1, self-adaptive threshold segmentation optimization
S1.1, an iteration threshold method is adopted, and the threshold is automatically adjusted according to the mean value and the variance of the gray distribution of the image, so that the segmentation accuracy is improved. An initial mean and variance of the image gray values are calculated. The image pixels are divided into two parts according to the mean value: a set of pixels G1 that is equal to or greater than the mean and a set of pixels G2 that is less than the mean. The mean1 and mean2 of G1 and G2 are calculated, respectively. Update threshold value threshold= (mean 1 + mean 2)/2. The image is binarized using the updated threshold value threshold. If the difference value between the threshold value and the threshold value of the last iteration is smaller than a preset tolerance, stopping the iteration; otherwise, returning to continue iteration and outputting a final binarization result.
S1.2, introducing a region growing algorithm, and automatically merging the over-segmented regions according to the similarity and connectivity among pixels. And carrying out connected domain marking on the binarized image to obtain an initial segmentation region. For each divided region, the features such as the area, the number of boundary pixels, and the average gray value are calculated. And judging whether the adjacent areas need to be combined or not according to a preset similarity threshold, such as gray level difference, boundary connectivity and the like. And updating the marks of the adjacent areas needing to be merged, and recalculating the characteristics of the merged areas. Repeating the steps until no region needs to be combined, and obtaining a final segmentation result. And carrying out post-processing on the segmentation result, such as removing the area with too small area, smoothing the area boundary and the like.
S1.3 adopts a morphological filtering algorithm, such as self-adaptive median filtering, so that noise and interference are suppressed, and the robustness of a segmentation result is improved. For each pixel P (x, y) in the binarized image, its local window W (x, y) is defined. The gray values of the pixels within the window W (x, y) are counted and the median med is calculated. If the difference between the gray value of P (x, y) and med is greater than the preset threshold, the gray value of P (x, y) is replaced by med. The window W (x, y) is sized, e.g., adaptively adjusted according to the local noise level, and steps 2-3 are repeated. And executing the steps on all pixels to obtain a filtered binarized image.
In another embodiment of the present application, the sub-pixel edge detection may further be:
s2.1, adopting a Gaussian-Newton iteration method, and combining the local direction of the curve and the gray gradient to realize sub-pixel level edge positioning.
For each pixel P (x, y) on the edge, its local gray gradient direction and magnitude are extracted. A local edge model, such as a gaussian curve or sigmoid function, is constructed to represent the gray distribution of the edge. Based on the local gray scale distribution, initial values of model parameters, such as the mean and standard deviation of the gaussian curve, are calculated. The error between the actual gray distribution and the model predictive distribution is minimized using the gaussian-newton iterative method. The first and second derivatives of the error function (Hessian matrix) are calculated. And updating the model parameters according to the derivative values, and performing iterative optimization. And stopping iteration if the parameter updating quantity is smaller than a preset threshold value or the maximum iteration number is reached. And calculating the edge position of the sub-pixel level, such as the mean value of a Gaussian curve, according to the optimized model parameters. And executing the steps on all the edge pixels to obtain sub-pixel level edge coordinates.
S2.2, introducing edge position constraint, and improving accuracy and continuity of edge fitting by utilizing geometric relations among edge points.
And constructing an edge map for the detected sub-pixel edge points. And calculating connectivity between the edge points according to the local directions and the distances of the edge points. For connected edge points, constraint equations are constructed, such as requiring that the edge points are on the same straight line or curve. Constraint equations are added to the optimization problem of edge fitting, such as least squares fitting or robust fitting. Solving the optimization problem to obtain the edge point coordinates meeting the constraint conditions. And updating the edge map according to the optimized edge point coordinates, and repeating the steps until convergence.
S2.3, adopting a multi-scale edge detection strategy, synthesizing edge information under different scales, and improving the detection robustness.
And constructing a Gaussian pyramid of the image, and generating images with different scales. For each scale image, an edge detection algorithm, such as a Canny operator or a Sobel operator, is performed. And performing non-maximum suppression and threshold processing on the detected edge map to obtain a binarized edge map. Edge merging and refinement operations, such as edge tracking and edge joining, are performed on edge maps of different scales. And extracting sub-pixel level edge coordinates according to the combined edge map, for example, adopting a Gaussian-Newton iteration method. Edge fusion and optimization, such as weighted averaging or curve fitting, are performed on the sub-pixel edges extracted at different scales. And outputting a final sub-pixel edge detection result.
In another embodiment of the present application, the adaptive node selection optimization is further:
S3.1, comprehensively considering factors such as curvature, chord height error, local direction change and the like, and adaptively selecting key nodes.
And calculating the local curvature, chord height error, direction change and other characteristics of each sampling point on the curve. And sorting and screening the sampling points according to the characteristic values, and selecting the point with the maximum or minimum characteristic value as a candidate node. And (3) carrying out spatial distribution and local shape analysis on the candidate nodes, and eliminating redundant or unreasonable nodes. And according to the number of the nodes and distribution requirements, parameters selected by the nodes, such as a characteristic value threshold value, node spacing and the like, are adaptively adjusted. And outputting the finally selected key nodes.
S3.2, balancing the number of nodes and curve fitting precision by adopting a curvature constraint node screening method.
For the selected key nodes, the local curvature is calculated. According to a preset curvature threshold value, the nodes are divided into high curvature nodes and low curvature nodes. For the high curvature nodes, the contribution degree of the high curvature nodes to the curve shape, such as the reduction amount of local fitting errors, is calculated. And sorting the high-curvature nodes according to the contribution degree, and selecting the node with the largest contribution degree as a key node. And for the low-curvature nodes, the number of the nodes is adaptively adjusted according to the node spacing and the curve smoothness requirements. And combining the high-curvature key nodes and the low-curvature nodes to obtain a final node selection result.
And S3.3, introducing a self-adaptive node interpolation algorithm, and dynamically adjusting an interpolation mode according to node distribution and local characteristics.
For the selected nodes, the local distribution characteristics of the nodes, such as node spacing, density change and the like, are analyzed. According to the distribution characteristics, an interpolation method is selected in a self-adaptive mode, such as linear interpolation, polynomial interpolation, spline interpolation and the like. For the region with larger node spacing, a high-order interpolation method, such as cubic spline interpolation, is adopted to ensure the smoothness of an interpolation curve. And for the region with larger node density change, adopting a self-adaptive node encryption strategy, such as adding interpolation nodes in the node sparse region. And (3) performing shape optimization and fairing treatment on the interpolated curve, such as adjusting the node position, so that the curve is smoother and more natural. And outputting the final interpolated curve.
In another embodiment of the present application, the curve fitting optimization is further:
And S4.1, adopting a B spline curve fitting algorithm to realize local shape control and smooth transition.
For a given set of data points, determining the order of the B-spline curve and the number of control points according to the distribution and the number of points. The node vector (knee vector) of the B-spline is initialized, such as uniformly distributed or adjusted according to the data point distribution. And calculating the B spline basis function value at each data point according to the B spline basis function, and constructing a coefficient matrix. And constructing a least square fitting equation according to the data point coordinates and the coefficient matrix, and solving the control point coordinates. And according to the fitting error and the curve shape, adjusting the node vector and the number of control points, repeating the steps, and performing iterative optimization. And outputting the control points and node vectors of the B spline curve obtained by final fitting.
S4.2, introducing regularization term, balancing fitting precision and curve smoothness, and avoiding over fitting.
In the least squares fit equation, regularization terms, such as the sum of squares of the second derivatives of the curves, are introduced. And adjusting a fitting equation according to the weight coefficient of the regularization term, and balancing the fitting error and the curve smoothness. And solving a regularized fitting equation to obtain the coordinates of the control points. Based on the fitting results, the effect of regularization terms, such as suppression effects on over-fitting and under-fitting, is evaluated. And (5) adaptively adjusting the weight coefficient of the regularization item, and repeating the steps to obtain the optimal regularization parameter. And outputting the regularized B spline curve fitting result.
And S4.3, adopting an adaptive knot vector selection strategy, and automatically adjusting the number and the position of the knots according to the data point distribution.
The knot vector is initialized according to the distribution characteristics of the data points, such as point density, interval change and the like. The error distribution of the B-spline curve fit, such as the fit residual at each data point, is calculated. The knot vectors are adaptively adjusted according to the error distribution, such as increasing the number of knots in the region where the error is large. And recalculating the B spline basis function and the coefficient matrix, and updating the fitting equation and the control point coordinates. The influence of the adjusted knot vector on the fitting accuracy, such as the variance of the sum of squares of the residuals, is evaluated. Repeating the steps, and iteratively optimizing the knot vector until the fitting precision meets the requirement. Outputting the adaptively selected knot vector and the corresponding B-spline curve fitting result.
In another embodiment of the present application, the process of precision evaluation and testing is further:
s1.1, a high-precision dot matrix calibration plate is adopted, so that the calibration precision of a camera and a laser is improved.
And designing and manufacturing a high-precision dot matrix calibration plate, such as a checkered black-white alternate dot matrix. The accuracy of the lattice position and spacing is ensured by high-precision manufacturing equipment, such as a laser engraving machine or a high-precision CNC. And precisely measuring the calibration plate to obtain the actual physical coordinates of the dot matrix. The calibration plate is placed in the common field of view of the camera and the laser, and a plurality of images are acquired. And distortion correction and gray scale calibration are carried out on the acquired image, so that the image quality is improved. And extracting pixel coordinates of the dot matrix in the image, and establishing a corresponding relation with the actual physical coordinates. And calculating the internal and external parameters of the camera and the laser by using the corresponding point pairs to obtain a calibration result. And evaluating the precision of the calibration result, such as a reprojection error, so as to ensure that the system requirement is met.
S1.2, introducing an online calibration technology, and realizing dynamic compensation of system parameters through feature point tracking.
During shooting, feature points in an image are tracked in real time by utilizing feature point tracking algorithms such as KLT, SIFT and the like. And calculating the external parameter changes of the camera and the laser in real time according to the position changes of the feature points. And superposing the external parameter variation and the initial calibration result to obtain the calibration parameters updated in real time. And dynamically compensating the three-dimensional reconstruction result according to the updated calibration parameters, and reducing the influence of calibration errors. And evaluating the effect of online calibration, such as stability of feature point tracking, accuracy of external parameter estimation and the like. And according to the evaluation result, the algorithm parameters of the feature point tracking and the external parameter estimation are adaptively adjusted, so that the robustness of online calibration is improved.
S1.3 adopts a multi-plane and multi-distance calibration strategy, so that the influence of distortion and defocusing on imaging quality is reduced.
And selecting calibration planes with different distances and different angles, such as a near distance, a middle distance and a far distance, and two angles of a front surface and an inclined surface. And placing a high-precision dot matrix calibration plate on each calibration plane, and collecting a plurality of images. And respectively executing calibration algorithms on calibration images of different planes and different distances, and calculating parameters of the camera and the laser. And evaluating consistency among different calibration results, such as comparing internal parameters and external parameters obtained by different planes and different distances. And carrying out joint optimization by utilizing a plurality of calibration results to obtain globally optimal calibration parameters. And (3) evaluating the effect of the combined calibration, such as three-dimensional reconstruction of test objects with different distances and angles, and analyzing the reconstruction precision. And according to the evaluation result, the optimal combination of the calibration plane and the distance is selected in a self-adaptive manner, so that the reliability and the applicability of calibration are improved.
In a specific embodiment, as follows, it is specifically noted that this is merely a case, and the relevant parameters and modules may be designed according to the actual situation of the model or prototype without strictly following this embodiment. Modifications and adaptations of the relevant processes and details of the following cases may occur to those skilled in the art based on actual circumstances.
Taking a 1:25 ratio ship lift model test as an example, the workflow and implementation details are described. Assuming that the ship lift model has dimensions of 10 meters long, 2.5 meters wide and 2 meters high, the test aims to measure the motion attitude and displacement of the ship model as it passes through the ship lift. The monitoring system adopts a line laser with 50 milliwatts of power and an industrial camera with 300 to 2000 ten thousand pixels, the projection angle of the laser is 45 degrees, and the sampling frequency of the camera is 30 frames/second. The radius of the arc cover surface is 3 meters, the spreading angle is 150 degrees, and the material is matte ABS plastic. The ship model has the dimensions of 2 m long, 0.5m wide and 0.3 m high, and the surface is sprayed with grey white matt paint to improve the reflectivity and contrast of laser stripes.
And a pretreatment module: the industrial camera acquires an original color image with a frame resolution of 2048 x 1536 every 1/30 second, and the pixel depth is 8 bits and the format is BayerBGR.
The dimension reduction submodule receives an original image, converts the original image into a three-channel RGB color image through a Bayer interpolation algorithm, and the resolution is unchanged.
And respectively extracting three channels of the RGB color image, and converting the three channels into three gray images, wherein the gray range is 0-255.
The filtering sub-module respectively carries out median filtering with the size of 3*3 on the three gray images to remove salt and pepper noise.
And the enhancer module respectively carries out linear stretching on the filtered gray images, expands the gray dynamic range to 0-255, and improves the overall brightness of the images.
And fusing the three enhanced gray level images to obtain a gray level enhancement image with the resolution of 2048 x 1536 and the pixel depth of 8 bits.
And calculating definition evaluation indexes such as gradient energy, variance and the like of the gray enhancement map, if the index value is larger than a threshold value (such as 0.7), judging that the image quality is qualified, and otherwise, triggering an alarm.
And the laser curve extraction module is used for:
The self-adaptive threshold segmentation submodule scans the gray enhancement graph line by line, and counts the average gray value of each line.
And solving the maximum inter-class variance for each line to obtain an optimal segmentation threshold, wherein pixels larger than the threshold are foreground and pixels smaller than the threshold are background.
And binarizing the image according to the optimal threshold value, assigning 255 to foreground pixels and 0 to background pixels to obtain a binary segmentation image.
Performing morphological opening operation on the binary image, firstly corroding with 33 structural elements to remove isolated noise points, and then expanding with 55 structural elements to fill break points of the curve.
The contour extraction submodule adopts Moore-Neighbor contour tracking algorithm to search the contour in the binary image in a clockwise direction from the upper left corner of the image.
And recording the coordinates (x, y) of each pixel point on the contour until the contour returns to the starting point, and completing the extraction of a closed contour and storing the closed contour as a contour point coordinate sequence.
And continuing to search other contours in the image until the whole image is traversed, and generally extracting 1-4 contours.
And calculating the perimeter of each contour, reserving the contour with the longest perimeter as a candidate laser curve, and eliminating the rest shorter contours.
And sequencing the candidate contour point coordinate sequences according to the x coordinates to obtain an ordered laser curve point set.
The sub-pixel edge detection sub-module uniformly samples N seed points from the curve point set, wherein N is generally 1/10 of the total point number.
And (3) for each seed point, collecting M neighborhood pixels along the normal direction of the seed point, and fitting a local Gaussian function.
And solving the maximum position of the Gaussian function as a sub-pixel edge point, wherein the accuracy can reach 0.05 pixel.
B spline curve fitting is carried out on the N sub-pixel edge points, and a smooth continuous fitting curve is obtained.
And calculating first and second derivatives of the fitted curve to obtain tangential direction and curvature radius of each point on the curve.
The self-adaptive node selection submodule takes points at the positions with the maximum curvature and the minimum curvature as key nodes to construct a convex hull of the curve.
And deleting nodes in the convex hull according to the minimum curvature radius and the maximum curvature radius to obtain a self-adaptive node set.
And (3) taking the self-adaptive node as a control point, and performing three times of uniform B spline curve fitting to obtain a smoother and stable laser curve.
And the iterative optimization submodule calculates the average distance from each point on the laser fitting curve to the original contour point set to be used as an error evaluation function.
And optimizing the node coordinates of the B spline by adopting a steepest descent method, and updating the node coordinates each time of iteration to descend the error function.
The iteration termination condition is that the error function drop is less than a threshold (e.g., 0.01 pixels), or that the number of iterations reaches an upper limit (e.g., 20).
And outputting the optimized B spline curve control point coordinates as final laser curve pixel coordinates.
And a laser curve three-dimensional reconstruction module:
The coordinate conversion sub-module reads the parameter file in the camera to obtain parameters such as the focal length, the principal point coordinates and the like of the camera.
According to the imaging principle, each pixel coordinate (u, v) on the laser curve is converted into a normalized image plane coordinate (x, y).
And converting the normalized plane coordinates into three-dimensional points (X, Y, Z) in the camera coordinate system by combining an external parameter equation of the laser plane in the camera coordinate system.
And transforming the laser curve from a camera coordinate system to a ship lift base coordinate system by using the hand eye calibration matrix to obtain a space three-dimensional curve.
Reconstructing the surface of the ship model by a laser triangulation method to obtain a set of discrete three-dimensional point clouds { (X, Y, Z) }.
And fitting a space arc according to geometric parameters such as radius, center coordinates and the like of the arc-shaped cover surface, and optimizing the three-dimensional point cloud coordinates to enable the three-dimensional point cloud coordinates to fall on the cover surface better.
The time sequence registration submodule receives a continuously acquired 30-frame/second laser curve sequence, and each curve comprises three-dimensional coordinates and a time stamp.
Assuming that the i-th frame curve time is t i, the i+1th frame curve time is t i+1/30, and the two-frame time interval is 1/30 second.
And taking 0.01 second as a time step, and linearly interpolating the three-dimensional curve between two frames to obtain a three-dimensional point set with more closely spaced three-dimensional points.
All interpolated three-dimensional point sets are resampled with time stamps aligned with an integer multiple of 0.01 second time.
ICP registration is carried out on all three-dimensional curves after registration, the space point cloud is unified to the same coordinate system, and the precision is better than 1 millimeter.
Outputting a laser curve three-dimensional point cloud sequence with 0.1 second interval, wherein each moment point cloud comprises 5000-10000 three-dimensional point coordinates.
Motion decomposition module:
And receiving the registered three-dimensional laser point clouds with the point number of N at intervals of 0.1 second at every two moments.
And constructing N x 3 matrixes P1 and P2, and respectively storing N three-dimensional point XYZ coordinates at the time t and the time t+0.1s.
A rigid transformation matrix t= [ r|t ] is constructed, where R is a 33 rotation matrix and T is a 31 translation vector for a total of 12 degrees of freedom.
And solving an optimal transformation matrix T between two groups of point clouds by adopting an SVD decomposition method of the corresponding points, so that the square sum of the distances between P2 and TP1 is minimized.
And extracting a rolling angle alpha around the X axis, a pitch angle beta around the Y axis and a yaw angle gamma around the Z axis according to the element values in the optimal transformation matrix T.
And decomposing the rotation angles alpha, beta and gamma into a range of 0-360 degrees, and decomposing the translation vector t into translation amounts along X, Y, Z directions.
And respectively carrying out weighted recursive average filtering on the rotation angle and the translation quantity of 30 continuous 0.1 second intervals, wherein the weights select a Gaussian kernel function, and the high-frequency jitter is removed.
The filtered instantaneous rotational angular velocity (α ', β ', γ ') and instantaneous translational velocity (v x,vy,vz) in three directions are output at 0.1 second intervals.
Motion integration module:
The initial spatial position (X 0,Y0,Z0) and the euler angles (α0, β0, γ0) of the ship lift base are input and set at time t 0.
Numerical integration can be performed by using a Dragon's base tower method according to the angular velocity (alpha', beta ', gamma') and translational velocity (v x,vy,vz) output by the motion decomposition module.
The integration time step is 0.1 seconds, and each step updates the pose (X, Y, Z, alpha, beta, gamma) at the previous moment to the pose at the current moment to serve as the initial value of the next step.
The integral calculation is performed for 1 second, namely 10 steps, so that the spatial position and Euler angle of the ship lift base at each 0.1 second moment are obtained.
And because the integral has accumulated errors, the position coordinates of the laser global positioning are received every 1 second, and the error compensation is carried out on the accumulated positions by a least square method.
And calculating the space pose of the center of gravity of the ship model by combining the bottom pose of the ship lift and the physical size parameters of the ship lift.
And converting the pose of the ship model from the ship lift base coordinate system to the global coordinate system of the test site through homogeneous coordinate transformation.
The positions (X, Y, Z) and attitude angles (alpha, beta, gamma) of the centers of gravity of 10 groups of ship models are continuously output as real-time motion tracks of the ship lift by taking 1 second as a time unit.
And the precision evaluation module is used for:
Starting from the initial position of the ship model, the accuracy evaluation is triggered every 10 seconds.
And acquiring a ship pose measured value (X 1,Y1,Z1111) of the optical tracking system as a true value.
The ship pose output value (X 2,Y2,Z2222) of the system is obtained, and the position error and the pose error are calculated respectively.
Position error =sqrt((X1-X2)2+(Y1-Y2)2+(Z1-Z2)2), attitude error= (|α 12|+|β12|+|γ12 |) 3.
And counting and accumulating the results of N times of precision evaluation, and calculating the maximum value, the minimum value, the average value and the root mean square value of the position error and the attitude error.
Judging whether the precision is qualified or not according to the preset index requirement, wherein the position error requirement is less than 2mm, the attitude error requirement is less than 0.1 degrees, and considering that the precision meets the requirement.
And respectively carrying out multiple groups of precision evaluations aiming at the ship lift motions with different speeds and amplitudes, giving out statistical results under various working conditions, and drawing a precision curve.
Generating an accuracy evaluation report, and recording evaluation time, evaluation working conditions, pose error statistics values, accuracy curves and the like as important basis of system test.
A motion estimation module:
and constructing a continuous 30-second ship model pose sequence into a motion pose graph by taking 1 second as a time slice.
Each node in the graph is a ship pose (X, Y, Z, alpha, beta, gamma) at one moment, and the total number of the nodes is 30.
Each side is the motion constraint between the ship pose at two adjacent moments, and 29 sides are all used.
The initial value of the pose node is from the accumulated calculation result of the laser visual odometer, and has a certain deviation from the true value.
And taking pose transformation at two adjacent moments as an observation value of the edge, and obtaining the pose transformation by laser curve registration.
And constructing a map-based SLAM problem by taking each pose node as a variable to be optimized, wherein an objective function is a weighted square sum of a pose error and a velocity error.
And solving the pose graph by adopting a g2o graph optimization library, and iteratively optimizing the pose nodes to minimize the objective function and obtain the globally consistent pose estimation value.
The optimization process considers the kinematic constraint of the ship and the mechanical structure constraint of the ship lift, and improves the estimation precision.
In order to realize real-time performance, a sliding window strategy is adopted, the pose nodes of the first 20 seconds are fixed, and the pose after the optimization is rolled for 10 seconds.
And during motion trend prediction, extrapolating for 1 second by using the pose sequence of the first 30 seconds to obtain the movement condition of the ship in the future 1 second.
The preferred embodiments of the present invention have been described in detail above, but the present invention is not limited to the specific details of the above embodiments, and various equivalent changes can be made to the technical solution of the present invention within the scope of the technical concept of the present invention, and all the equivalent changes belong to the protection scope of the present invention.

Claims (10)

1. A non-contact ship motion and displacement monitoring device suitable for ship lift test, characterized by comprising:
a laser emitter for emitting laser light in a specified direction;
the cover surface is positioned on the light path of the laser transmitter, and when the laser device works, a laser image is formed on the cover surface by the laser;
A camera for shooting laser images on the cover surface according to a preset period;
And the data processing unit is used for receiving the laser image of the camera, extracting laser curve data, reconstructing a three-dimensional laser space curve, performing motion decomposition, obtaining ship motion data and outputting the ship motion data.
2. The non-contact ship motion and displacement monitoring device for ship lift test according to claim 1, wherein said data processing unit comprises:
the preprocessing module is used for sequentially receiving each frame of laser image and a shooting time stamp of each frame of laser image; then, performing enhancement processing on the laser image to obtain a laser image with definition larger than a threshold value;
the laser curve extraction module is used for extracting pixel coordinates of a laser curve from each frame of laser image by adopting an edge detection algorithm, performing polynomial fitting or spline fitting, and removing abnormal laser curves according to a preset curvature and symmetry threshold value to obtain smooth continuous laser curves meeting preset standards;
The laser curve three-dimensional reconstruction module converts each pixel coordinate of each laser curve into a space coordinate through a coordinate conversion matrix to obtain a three-dimensional space coordinate of each laser point, and the three-dimensional space coordinate is connected with each laser point to form a three-dimensional laser curve; performing precision optimization on the three-dimensional laser curve through prestored overlay geometrical parameters;
And the motion decomposition module acquires three-dimensional laser curves at two adjacent moments one by one, invokes a preconfigured algorithm, calculates a rigid body transformation matrix, and the rigid body transformation matrix comprises a rotation matrix and a translation vector, decomposes the rigid body transformation matrix into rotation angles around an X axis, a Y axis and a Z axis and translation quantities along the X axis, the Y axis and the Z axis, performs time sequence filtering on the rotation and the translation quantities obtained by decomposition between any two adjacent moments, and obtains and outputs motion parameters.
3. The non-contact ship motion and displacement monitoring device for ship lift test of claim 2, wherein said data processing unit further comprises:
The motion integration module is used for selecting a preset time period, accumulating the rotation quantity and the movement quantity in the time interval formed by each adjacent moment according to the time sequence, and obtaining the accumulated rotation angle and the accumulated movement distance of the ship relative to the initial position and the gesture in the time period; and constructing a ship coordinate system, and converting the accumulated rotation and movement amount of the ship to a fixed coordinate system to obtain the position and the posture of the ship at each moment.
4. A non-contact ship movement and displacement monitoring device suitable for use in a ship lift test as claimed in claim 3, wherein said data processing unit further comprises:
The precision evaluation module is used for acquiring an inertial navigation device pre-configured on the ship, acquiring the ship motion parameters, comparing the ship motion parameters with the motion parameters output by the data processing unit at corresponding moments, and giving out precision comparison results under each motion state, wherein the motion states comprise motion states of different speed intervals and different amplitude intervals.
5. The non-contact ship motion and displacement monitoring device for ship lift test of claim 4, wherein said preprocessing module comprises:
The dimension reduction sub-module is used for successively receiving each frame of laser image, converting the RGB color image into a gray level image or decomposing the channels to obtain a laser image data frame of each channel;
the filtering sub-module is used for filtering the gray level image or the laser image data frame of each channel, so that the signal to noise ratio is improved;
and the enhancer module is used for carrying out histogram equalization on the filtered gray level image or the laser image data frame of each channel and enhancing the image contrast.
6. The non-contact ship motion and displacement monitoring device for ship lift test of claim 5, wherein said laser profile extraction module comprises:
The self-adaptive threshold segmentation submodule adopts a maximum entropy method and determines an optimal threshold according to the gray level distribution of the laser image; binarizing the laser image data based on an optimal threshold value to obtain two areas of a foreground and a background; sequentially carrying out open operation and close operation on the binarization result, removing isolated noise points and filling curve break points to obtain a binarized laser image;
The contour extraction submodule carries out contour extraction operation on the binarized laser image by using a Moore-Neighbor contour tracking algorithm to obtain contour pixel coordinates of a laser curve; screening the profile coordinates, removing the profile with the length smaller than the threshold value, and reserving the longest profile as the initial approximation of the laser curve; sequencing the contour coordinates clockwise or anticlockwise to obtain a continuous and ordered contour point sequence;
the sub-pixel edge detection sub-module is used for carrying out local Gaussian fitting on each contour point in the contour point sequence, carrying out edge positioning of sub-pixel level in the normal direction of the curve, adopting a least square method to fit the sub-pixel edge points to obtain a fitting laser curve with smoothness meeting expectations, and calculating first-order and second-order derivatives of the fitting laser curve to obtain the tangential direction and curvature of the laser curve at each point;
The self-adaptive node selection sub-module is used for self-adaptively selecting key points as nodes according to the geometric characteristics of the laser curve,
Screening the key points, removing redundant nodes and singular points to obtain a minimum node set, and re-performing segment fitting on the curve by using the node set, wherein the segment polynomial fitting and segment spline fitting are included;
and the iterative optimization sub-module is used for calculating the distance error between the fitting laser curve and the original contour point, constructing an error function, minimizing the error function by using a gradient descent method, updating parameters of the fitting laser curve until the best fitting laser curve is obtained, and outputting a smooth continuous laser curve meeting a preset standard.
7. The non-contact ship motion and displacement monitoring device for ship lift test of claim 6, wherein said laser curve three-dimensional reconstruction module comprises:
The coordinate conversion sub-module is used for converting the pixel coordinates into normalized camera coordinates according to the pixel coordinates of the laser curve obtained by fitting and the parameters in the camera; projecting the normalized camera coordinates onto a laser plane by utilizing a laser plane equation to obtain three-dimensional coordinates of a laser curve under a camera coordinate system; converting the laser curve from a camera coordinate system to a world coordinate system by using external parameters of the camera to obtain global three-dimensional representation of the curve, and obtaining a three-dimensional laser curve; optimizing the precision of a laser curve through engineering parameters including geometrical parameters of the cover surface;
The time sequence registration sub-module is used for carrying out time sequence alignment on the optimized laser curve at each moment according to the time stamp to obtain a time-synchronous three-dimensional curve sequence; carrying out spatial registration on the curves at different moments by utilizing the characteristic points on the curves; and interpolating or resampling the three-dimensional curve to obtain a laser curve sequence with equal intervals and equal lengths.
8. The non-contact ship motion and displacement monitoring device for ship lift test of claim 7, wherein said data processing unit further comprises:
The motion estimation module is used for acquiring the position and the gesture of the ship at each moment, representing the motion track of the ship as a gesture graph, each node represents the gesture of the ship body in one time segment, and each side represents the relative motion constraint between adjacent time segments; according to the initial motion estimation obtained by the visual odometer, giving initial values to nodes and edges of the gesture graph, constructing an objective function comprising a relative motion error and a global consistency error, and calling a graph optimization library to solve the objective function to obtain the optimal estimation of the gesture graph; and carrying out smoothing treatment on the optimized attitude diagram to obtain a motion trail in a future period of the ship.
9. The non-contact ship motion and displacement monitoring device for ship lift test of claim 8, wherein said data processing unit further comprises:
And the gesture early warning module is used for acquiring current ship motion data or motion tracks in a future period of the ship, analyzing the motion gesture, judging whether the motion gesture exceeds a threshold value, and outputting control and alarm information if the motion gesture exceeds the threshold value.
10. A non-contact ship motion and displacement monitoring device suitable for ship lift testing as claimed in claim 3, wherein said cover is a reducing arc cover.
CN202410313742.3A 2024-03-19 2024-03-19 Non-contact ship motion and displacement monitoring device suitable for ship lift test Active CN117906633B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410313742.3A CN117906633B (en) 2024-03-19 2024-03-19 Non-contact ship motion and displacement monitoring device suitable for ship lift test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410313742.3A CN117906633B (en) 2024-03-19 2024-03-19 Non-contact ship motion and displacement monitoring device suitable for ship lift test

Publications (2)

Publication Number Publication Date
CN117906633A true CN117906633A (en) 2024-04-19
CN117906633B CN117906633B (en) 2024-05-28

Family

ID=90689329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410313742.3A Active CN117906633B (en) 2024-03-19 2024-03-19 Non-contact ship motion and displacement monitoring device suitable for ship lift test

Country Status (1)

Country Link
CN (1) CN117906633B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180232052A1 (en) * 2014-09-12 2018-08-16 University Of Washington Integration of Auxiliary Sensors with Point Cloud-Based Haptic Rendering and Virtual Fixtures
CN108921864A (en) * 2018-06-22 2018-11-30 广东工业大学 A kind of Light stripes center extraction method and device
CN110089260A (en) * 2019-04-15 2019-08-06 江苏大学 A kind of the cereal flow monitoring method and monitoring system of the defeated grain of scraper-type
CN112906095A (en) * 2020-12-20 2021-06-04 重庆交通大学 Bridge modal identification method and system based on laser stripe center tracking
CN114212452A (en) * 2021-11-05 2022-03-22 中国矿业大学 Coal flow detection method based on laser assistance and image processing and energy-saving control system
CN115861597A (en) * 2022-12-06 2023-03-28 东南大学 Bridge modal real-time identification method and system based on laser and computer vision
CN117095065A (en) * 2023-09-18 2023-11-21 合肥埃科光电科技股份有限公司 Calibration method, system and equipment for linear spectrum copolymerization Jiao Weiyi sensor

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180232052A1 (en) * 2014-09-12 2018-08-16 University Of Washington Integration of Auxiliary Sensors with Point Cloud-Based Haptic Rendering and Virtual Fixtures
CN108921864A (en) * 2018-06-22 2018-11-30 广东工业大学 A kind of Light stripes center extraction method and device
CN110089260A (en) * 2019-04-15 2019-08-06 江苏大学 A kind of the cereal flow monitoring method and monitoring system of the defeated grain of scraper-type
CN112906095A (en) * 2020-12-20 2021-06-04 重庆交通大学 Bridge modal identification method and system based on laser stripe center tracking
CN114212452A (en) * 2021-11-05 2022-03-22 中国矿业大学 Coal flow detection method based on laser assistance and image processing and energy-saving control system
CN115861597A (en) * 2022-12-06 2023-03-28 东南大学 Bridge modal real-time identification method and system based on laser and computer vision
CN117095065A (en) * 2023-09-18 2023-11-21 合肥埃科光电科技股份有限公司 Calibration method, system and equipment for linear spectrum copolymerization Jiao Weiyi sensor

Also Published As

Publication number Publication date
CN117906633B (en) 2024-05-28

Similar Documents

Publication Publication Date Title
CN110675418B (en) Target track optimization method based on DS evidence theory
CN109949375B (en) Mobile robot target tracking method based on depth map region of interest
CN107292911A (en) A kind of multi-object tracking method merged based on multi-model with data correlation
EP2418622B1 (en) Image processing method and image processing apparatus
EP0737938B1 (en) Method and apparatus for processing visual information
CN109784333A (en) Based on an objective detection method and system for cloud bar power channel characteristics
CN107818571A (en) Ship automatic tracking method and system based on deep learning network and average drifting
CN107253192A (en) It is a kind of based on Kinect without demarcation human-computer interactive control system and method
CN114011608B (en) Spraying process optimization system based on digital twinning and spraying optimization method thereof
CA3020069A1 (en) Spatial data analysis
CN111221003A (en) Method for acquiring incident wind field and modeling incident wind field by using laser radar sensor
CN115564926A (en) Three-dimensional patch model construction method based on image building structure learning
CN117011477B (en) BIM-based steel structure deformation monitoring and processing method and system
CN113688797A (en) Abnormal behavior identification method and system based on skeleton extraction
CN114548253A (en) Digital twin model construction system based on image recognition and dynamic matching
CN116958420A (en) High-precision modeling method for three-dimensional face of digital human teacher
Stork et al. Ensemble of sparse Gaussian process experts for implicit surface mapping with streaming data
CN115222884A (en) Space object analysis and modeling optimization method based on artificial intelligence
CN109544584B (en) Method and system for realizing inspection image stabilization precision measurement
CN117372489B (en) Point cloud registration method and system for double-line structured light three-dimensional measurement
CN117906633B (en) Non-contact ship motion and displacement monitoring device suitable for ship lift test
CN113947623A (en) Roughness detection method, SLAM positioning method and construction method
Xu et al. A new welding path planning method based on point cloud and deep learning
Sheng et al. Mobile robot localization and map building based on laser ranging and PTAM
CN112231848A (en) Method and system for constructing vehicle spraying model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant