The invention discloses a 
machine vision-based ship 
hull six-degree-of-freedom measurement method. The method includes the following steps that: a RGB three-
color marker is posted on a target ship, when the 
hull of the ship moves, the marker moves with the 
hull of the ship, two cameras are mounted at different positions, and the angles of the cameras are adjusted, so that the 
shooting range of the cameras can cover the movement range of the marker, and the cameras carry out 
image acquisition; images acquired by the cameras are preprocessed, and a RGB color occupancy volume-based segmentation 
algorithm is adopted to perform 
image segmentation operation, so that boundary parameters can be obtained, qualified feature points are made to be contained in a boundary range; and a binocular three-dimensional 
reconstruction method is adopted to obtain the three-dimensional coordinate values of the feature points; and the 
six degrees of freedom of the hull of the ship are decomposed, and the three-dimensional coordinates of P (x, y, z) at any one time point and the coordinates P'(x', y',z') of a next time point are known, so that a translation vector T(
delta x, 
delta y, 
delta z) and a rotation vector R (alpha, beta, gamma) which are corresponding to the movement of the hull of the ship are obtained. With the 
machine vision-based ship hull six-degree-of-freedom measurement method of the invention adopted, real-time and non-contact measurement of six-degree-of-freedom movement of the hull of the ship in regular 
waves and 
irregular waves can be realized, and accuracy satisfies 
engineering requirements.