component was taken as the threshold, so as to 
accurately segment the images. The theoretical basis 
is that the gray values of the pixels adjacent inside 
the  targets  or  the  background  area  similar,  while 
those  of  the  pixels  between  the  target  and  the 
background are different (Peng, Zhou and Lei, 2017). 
Therefore, the target and the background correspond 
to  different  peaks  in  the  histogram.  For  the  pixel 
point 
R (x, y) of R component, the valley  T between 
two  peaks  in  the  histogram  is  selected  as  the 
threshold. Then the segmented binary image 
R
BW
 (x, 
y) can be expressed as: 
TyxRb
TyxRa
yxR
,,
,,
,
BW
 
(6) 
where 
a=1  denotes  the  target,  b=0  denotes  the 
background,  that  is,  the  hull  and  the  water  surface 
are segmented in the image. 
As  shown  in  Fig.7  (a),  in  the  segmented  result 
obtained  from  R 
component,  the  hull  and  the  water 
surface  show  an  obvious  margin,  while  the  fake 
waterline  formed  by  wave  infiltration  on  the  hull 
does not leave evident traces. Such effect  is mainly 
due  to  the  little impact generated  by  the  infiltration 
itself in the image of R 
component.  Meanwhile,  the 
valley  between  the  two  peaks  on  the  histogram  is 
taken as  the threshold for segmentation, which  also 
helps  eliminate  the  influences  caused  by  the  small 
difference  in  the  gray  values  of  the  adjacent  pixels 
inside  the  target  or  background.  In  addition,  to 
improve  the  adaptability  of  the  image  segmentation 
algorithm,  the  histograms  of  different  color 
components  can  be  compared  other  than  the 
histograms of RGB 
components.  
 
Figure 7: Identified results of the draft line based on color 
image segmentation, (a) binary image obtained from R 
component, (b) pixels on the edges, (c) the detected draft 
line, and (d) mapping of the draft line in the original 
image. 
The edge pixels in the image are extracted as 
shown  in  Fig.7  (b).  The  details  show  that  although 
the  edge  features  between  the  hull  and  the  water 
surface  can  be  obtained  by  the  above  method,  the 
pixels at the edges usually do not fully characterize 
the  edge,  especially  if  the  draft  line  stretches  over 
the  draft  character.  For  the edge fractures due to 
noises  and  uneven  lighting,  as  well  as  the  other 
effects  of  introducing  grayscale  discontinuities, 
Hough  transform  is  usually  used  to  assemble  the 
edge  pixels  into  meaningful  continuous  segments. 
The  basic  strategy  is  as  follows:  A  set  of  straight 
lines that pass a specific point in the image are 
converted  to  a  curve  under  polar  coordinates,  the 
peaks  of  the  curve  intersections  under  polar 
coordinates are counted in an accumulator, and then 
the  peak  corresponds  to  a  straight  line  with  many 
collinear points in the image (Yan and Yang, 2015). 
For  the  identification  of  the  draft  line,  given  that 
adjusting the climbing robot’s location and arm can 
provide  a better  shooting  angle  for  the HD  camera, 
the  location  of  the  draft  line  is  limited  within  the 
lower  half  of  the  image,  and  the  angle  of  the  draft 
line  is  limited  to  ±15°.  This  not  only  facilitates 
reducing  the  interference  in  the  image,  but  also 
accelerates the processing speed of Hough transform, 
as shown in Fig.7 (c). Finally, the resulting line can 
be  remapped  to  the  corresponding  location  in  the 
original image as the draft line, as shown in Fig.7 (d). 
3.2  Calculation of Draft Value 
After  numerical  representation  of  the  draft  and 
locating  of  the  draft  line,  the  draft  value  can  be 
obtained  immediately  by  comparing  the  relative 
location of the two, but one of the details will make 
a  difference  in  the  identification  accuracy.  Since 
there is an  angle  between the camera and the  draft, 
the  distances  may  differ  between  the  numerically 
represented draft characters. Hence, it is necessary to 
determine  the  variation  pattern  through  the  fitting 
approach,  and  thus  the  depth  value  represented  by 
the  distance  between  the  draft  line  and  the  last 
character. Considering that Hough transform is used 
in identifying the draft line, and that the draft line is 
located by many edge pixels, a locating accuracy at 
sub-pixel  level  could  be  achieved  theoretically. 
Accordingly,  the  calculation  accuracy  of  the  draft 
value  reaches  1mm,  significantly  higher  than  the 
5mm achieved by manual reading. 
4  CONCLUSIONS 
Draft survey based on digital image acquisition and 
processing  is  an  innovative  approach  that  uses 
pioneering  technologies  to  overcome  the  inherent 
(a)  (b)  (c)  (d)