Abstract
In this article, we propose a fast method for detecting the horizon line in maritime scenarios by combining a multi-scale approach and region-of-interest detection. Recently, several methods that adopt a multi-scale approach have been proposed, because edge detection at a single is insufficient to detect all edges of various sizes. However, these methods suffer from high processing times, requiring tens of seconds to complete horizon detection. Moreover, the resolution of images captured from cameras mounted on vessels is increasing, which reduces processing speed. Using the region-of-interest is an efficient way of reducing the amount of processing information required. Thus, we explore a way to efficiently use the region-of-interest for horizon detection. The proposed method first detects the region-of-interest using a property of maritime scenes and then multi-scale edge detection is performed for edge extraction at each scale. The results are then combined to produce a single edge map. Then, Hough transform and a least-square method are sequentially used to estimate the horizon line accurately. We compared the performance of the proposed method with state-of-the-art methods using two publicly available databases, namely, Singapore Marine Dataset and buoy dataset. Experimental results show that the proposed method for region-of-interest detection reduces the processing time of horizon detection, and the accuracy with which the proposed method can identify the horizon is superior to that of state-of-the-art methods.
Introduction
The interest in remote-controlled and autonomous ships has been increasing in the fields of marine industry and information technology. A key technology in autonomous ships is the situational awareness equipment required to safely operate and navigate. The radar equipment comprises a primary sensor system, but it is insensitive to small, non-metallic objects. Therefore, complementary sensor systems are necessary.
Electro-optical (EO) sensors can capture images of greater resolution than any sensor system. In addition, the images acquired by EO sensors can be recognized intuitively by crews or remote operators. Many video analytic methods that automatically analyze image frames to detect and identify the events have been developed in the field of computer vision. Generally, video analytics assume the existence of a fixed camera. However, video analytics in maritime scenes need to process a moving camera, because the camera is mounted on a moving vessel. Therefore, the first step of video analytics in maritime scenes is detecting the horizon, because the horizon is the important clue for registering the consecutive frames and for compensating the motion of the moving platform. 1 In addition, the result of horizon detection can be used for estimating the distance between another ship and the EO sensor2,3 and for increasing the processing speed by reducing the search area in the maritime detection system.2,4 Furthermore, a recent study 5 pointed out that horizon information can reduce the false positive rate by 50% for a given detection rate of the maritime surveillance system. Likewise, horizon detection is the first step of video analytics, and the result of horizon detection greatly affects the performance of overall maritime surveillance. Therefore, there is a need for a method to accurately detect the horizon without burdening the processing time of the entire system.
Typical approaches for horizon detection in maritime scenes assume that the horizon is a straight line and include projection-based methods,5–9 intensity analysis (including the vertical direction),10,11 and statistical analysis of the sea and sky regions.10,12 These methods have relatively low complexity, but they have a limitation on the accuracy of horizon detection. Recently, hybrid methods,13,14 combining different approaches, have been proposed to increase the accuracy of horizon detection. However, these methods mainly extract edge information from a single-scale image. Relatedly, the non-stability of edge detection is a challenging issue. To solve the non-stability issue, several methods,15–17 adopting a multi-scale approach, have been proposed to mitigate sensitivity to parameters of edge detection and to reduce the effect of noisy edges. Most previous works, using multi-scale approach, performed the edge detection and horizon estimation on each scale image, later finding the optimal solution. Thus, these methods have a disadvantage of being computationally costly. Extant methods require processing time on the order of tens of seconds; they are unsuitable for real-time processing during maritime scene analysis. However, horizon detection should be performed quickly and accurately because it is the first step in maritime scene analysis. Thus, we devise a method that reduces the computational time, while taking advantage of multi-scale edge detection.
As the resolution of the images captured from contemporary cameras increases, the amount of information to be processed to detect the horizon also increases. Recent datasets 1 for maritime scene analysis consist of full high-definition resolution images. Unfortunately, high resolution is a factor that decreases the processing speed of horizon detection. Using the region-of-interest (ROI) is an efficient way of reducing the amount of information necessary for processing. Thus, we explore a way to efficiently use ROI detection for maritime scene analysis.
Therefore, in this article, we propose a fast method for detecting the horizon line in maritime scenarios. Our approach is based on three steps. First, ROI detection is performed to reduce the processing region, using the characteristic that the color change is large around the horizontal line in maritime images. Then, multi-scale edge detection performs edge extraction at each scale, combining the results to produce a single edge map, which suppresses small noisy edges and retains the prominent edges. The initial candidate line is estimated by applying the Hough transform to combined edge images, and median filtering is applied to remove outliers. Finally, the least-square method is used to find the optimal line, using the inliers.
In summary, this article contributes the following. First, in a maritime scenario, we explore the effectiveness of ROI recognition in a horizon detection task, and we demonstrate that our proposed method of ROI recognition can improve the processing speed without sacrificing the accuracy of the horizon detection. Second, we propose a fusion method to improve the processing speed by effectively combining the edge information of various scales and we develop a high-accuracy, high-speed method for detecting the horizon. Third, unlike previous works using their own dataset for performance comparison, we use two publicly available databases for maritime scenarios, namely, Singapore Marine Dataset (SMD) 1 and buoy dataset, 13 and compare the performance of the proposed method and that of state-of-the-art methods.
The remainder of this article is organized as follows. The “Related works” section briefly reviews related works on horizon detection in maritime scenarios. The “Proposed method” section outlines the proposed horizon detection method. The “Experimental results” section discusses the various experiments conducted and the results obtained. Finally, the “Conclusion” section concludes this article.
Related works
Several approaches have been developed and reported for detecting the horizon using EO sensors mounted on vessels. A horizontal line is generally represented as a straight line in a maritime scenario. Typical approaches for horizon detection include projection-based methods,5–9 intensity analysis (including the vertical direction),10,11 and statistical analysis of the sea and sky regions.10,12
In the projection-based methods, an edge detector is first applied to generate an edge map. Then, the horizon line is determined by projecting the edges to another parametric space where the dominant line can easily be detected. Hough transform and Radon transform are the representative projection methods. These methods are most popular, because they are simple and mathematically well-defined. However, they are sensitive to prepossessing and frequently fail to detect the horizon when the horizon is not the most dominant line.
Intensity variation analysis methods first calculate the gradient map (including the vertical direction), after which they identify the maximal edges in each column of the image. Various optimization techniques, such as the least-squares method and dynamic programming, are used to calculate the optimal horizon line, using maximal edges. These methods have relatively low complexity, but their performance, in terms of accuracy, decreases when there exists a boundary having larger intensity change than the horizon, or the horizon lines are occluded by vessels.
Statistical analysis methods identify the horizon line by segmenting an image into regions containing the sea and sky. These methods are more robust to preprocessing than the methods using the gradient information at a pixel level, because they use the local statistics information. In addition, they can detect the blurred horizon. However, these methods must calculate the statistical distribution of the regions. Thus, they require more computation time.
The methods above are complementary to each other. Thus, several methods combining different approaches have been proposed to increase the accuracy of horizon detection. Fefilatyev et al. 13 proposed a hybrid approach, combining a Hough transform and statistical analysis. They first selected a limited number of candidate lines, using the Hough transform, and calculated the separation criteria to find the optimal line, maximizing the difference between the regions containing the water and sky. The Gaussian model in RGB color space was used to represent the color distribution of each region, and the Bhattacharyya distance 18 was used to measure the similarity of color distributions. Lipschutz et al. 14 also proposed a method like that of Fefilatyev et al. They used a morphological filter as the pre-processing stage and calculated the histograms of both the sky and sea regions to represent the color distribution of each. These methods require statistical analysis because of the possibly large number of candidate lines. Thus, the computation time increases drastically. In addition, hybrid methods mainly extract edge information from a single-scale image, in relation to which, there is a challenging issue about the non-stability of edge detection.
Recently, horizon detection methods,15,16 using multi-scale edge detection, have been proposed to solve the non-stability of edge detection issue. A new method, multi-scale cross-modal linear feature (MSCM-LiFe) was proposed by Prasad et al. 15 MSCM-LiFe adopts the multi-scale approach for detecting edges, and two modalities (i.e. Hough transforms and intensity variation analysis) are used to estimate the candidate horizon line for each scale image. The final solution is estimated by analyzing the goodness score and geometric proximity for each candidate pair of two different methods. A novel method, multi-scale consistence of weighted edge Radon transform (MuSCoWERT), was proposed by Prasad et al. 16 MuSCoWERT first generates multi-scale images by applying the median filter with different sizes. Then, for each scale image, weighted edge map is computed by analyzing the length of the edges. Radon transform is applied to estimate the parameter of the candidate line for each weighted edge map. Then, the final solution is selected by voting on the estimated line parameter from all scales. Whereas previous works showed that using the multi-scale approach can improve the accuracy of horizon detection, they require processing times on the order of tens of seconds. Therefore, we should to devise a way to reduce the processing time while maintaining the accuracy of horizon detection, because horizon detection is the first step and an essential element in maritime scene analysis.
Proposed method
In this section, we present a fast method for detecting the horizon line in maritime scenarios. A flowchart of the proposed method is shown in Figure 1. First, ROI detection, using the property of maritime scenes, is performed on an input image. The proposed method effectively reduces the processing time by restricting the search region, because the processing time of horizon detection method is proportional to the region to be processed. Then, multi-scale edge detection is applied to the ROI image, and the combined edge map is generated using edge images from various scales. Finally, the Hough transform and a least-squares method are sequentially used to find the optimal parameter of the horizon line. Although the proposed method detects the edges on each scale independently, as in previous works, it can reduce the computation time by applying the horizon parameter estimation to the combined edge map at once.

Flowchart of proposed method.
ROI detection
As cameras capable of capturing high-resolution images become popular, the amount of information to be processed to detect the horizon rapidly increases. Furthermore, the horizon detection methods that adopt multi-scale edge detection require repetitive processing for a high-resolution image, and therefore, the amount of computation is increased. Thus, the ROI can help to reduce the amount of information to be processed. Many methods19–21 for detecting ROI, based on visual saliency, have been proposed to identify the salient regions. However, applying it to detect the horizon is inadequate because the horizon is not an attended area in maritime scenes.
In maritime scenes, the sky and sea have homogeneous color regions, and the horizon is the apparent line that divides the sky and sea. Thus, the region containing the horizon has a different mean color vector than the mean color vector of sea and sky region, because it includes both the color of sky and sea regions. Using this property of maritime scenes, we propose a method for ROI detection to effectively detect the horizon. As a first step, an input image is resized smaller to reduce the processing time and smooth the regions. Then, the proposed method divides the resized image into
where
The proposed method chooses a region having the largest distance as the ROI for horizon detection. If the horizon line exists at the boundary of the horizontally divided region, it is difficult to determine to which of the two consecutive regions the horizontal line belongs. To mitigate the boundary effect, our proposed method divides the region into overlapping segments. We define ROI as a rectangle to improve the speed in subsequent tasks. Whereas the ROI image is defined as a rectangle, it does not contain the entire horizon, because of its large gradient. The proposed method can accurately identify the horizon using the partial line segments of horizon in ROI images, because the horizon is represented as a straight line.
The resized image and the divided horizontal regions are shown in Figure 2. In Figure 2(b), the red rectangle indicates the ROI, confirming that the average color of the region abruptly changes near the horizon.

(a) Resized image and (b) horizontally divided regions and the mean color vector of each region.
Multi-scale edge detection
The scale in edge detection is related to the size of the area where brightness changes are analyzed or to the size of the smoothing filter applied before edge detection. Maritime scenes contain many edges generated by wakes from ships, sunglint, and waves. Thus, small-scale edge detection suffers from false positives. Large-scale edge detection can identify reliable edges related to the horizon, but it loses detailed structures. In addition, recent research 22 pointed out that detecting edges at multiple scales can reduce the inherent ambiguity of edge detection at a single scale. Therefore, several methods,15,16 adopting a multi-scale approach, have been proposed to mitigate sensitivity to parameters of edge detection and to reduce the effect of noisy edges.
Multi-scale edge detection is distinguishable by the method of analyzing the information detected at different scales. 23 Previous works have independently processed edge information detected on different scales, so that horizon line estimation is applied to the number of scales. This was one reason for increasing the processing time of the horizon detection method, when adopting multi-scale edge detection. In addition, MusCoWERT 16 detected edges on different scales and analyzed their length, because it suffers from processing times requiring an order of tens of seconds. Therefore, the proposed method adopts the different multi-scale edge detection method, which is different from previous methods.
The resized image is used in the ROI detection step to reduce the processing time, but the ROI region of an original input image is used in the multi-scale edge detection step. The proposed method detects edges from the images by applying a smoothing filter of various sizes. Then, it synthesizes the edge images at different scales to a single edge map. Detecting a horizon by analyzing a combined edge map can reduce the inherent ambiguity of edge detection using a single scale, while increasing the processing speed of horizon detection. The proposed method uses the median filter as a smoothing filter because the median filter can effectively reduce noise, while preserving the prominent edges. The median filters are applied to an input images to generate the multi-scale images, as follows
where
The Canny edge detector 24 is applied to the multi-scale images independently. Then, the weighted edge map is synthesized using the edge maps to which the Canny edge detector is applied, as follows
where
The edges related to the horizon were consistently detected on edge maps at various scales because of the strong brightness changes near the horizon. Thus, the proposed method applies thresholding to the weighted edge map to suppress noisy edges, while keeping the edges associated with the horizon. The thresholding to the weight edge maps is applied as follows
where
The example images of the edge maps generated from the multi-scale images and the weighted edge map applying the thresholding are shown in Figure 3. To improve the readability of the edge maps in Figure 3, a dilation filter with a 5 × 5 rectangular structuring element is first applied to the edge maps; then, image inversion is applied. The dilation filter is used to increase the visibility of the reader and does not affect the edge detection results.

Multi-scale edge detection: (a) ROI image; (b) edges images with different-sized median filters (
Figure 3 shows that the proposed multi-scale edge detection can preserve the edges associated with the horizon while suppressing the noisy edges. In Figure 3, the proposed method reduces edges unrelated to the horizon, but there still exist outlier edges. Therefore, a method is necessary to reduce the effect of outlier edges when estimating the horizon line.
Horizon line estimation
The representative methods for estimating the horizon from the edge image are the Hough transform 25 and the least-squares method. The method using Hough transform can robustly estimate the parameter of horizon, even when there are small numbers of edges related to the horizon or there are many noisy edges. Whereas the least-square method is highly affected by outlier edges, it can more accurately estimate the horizon when there are few outlier edges. A recent study showed that the least-squares method better accurately estimates the parameter of the horizon than the method using the Hough transform. 26 Therefore, the proposed method applies the Hough transform and a least-squares method, sequentially, to calculate the best parameter for the horizon line.
The proposed method first applies the Hough transform to the weighted edge map, applying thresholding to find an initial candidate for the horizon. Then, it calculates the residual between the candidate horizon line and the edges for applying the median filtering. Finally, the parameters of horizon line are calculated using the least-squares method and the inlier edges. The proposed method can accurately estimate the horizon because the outlier edges are removed via median filtering.
The inlier edges and outlier edges classified by the Hough Transform and median filtering are shown in Figure 4(a). In addition, the result of horizon detection, using the least-square method, is shown in Figure 4(b). Figure 4 shows that Hough transform and median filtering can effectively remove outlier edges, which helps the least-squares method accurately estimate the horizon.

(a) Edges classified by the result of Hough transform and median filtering. Red dots show the outlier edges, and green dots show the inlier edges; (b) horizon detection result (yellow line) from applying the least-square method to inlier edges.
Experimental results
Dataset
We conducted experiments on the SMD 1 and buoy dataset. 13 SMD is the most recent database in maritime scenarios, including 39 videos with 15,376 frames. SMD consists of the onboard videos acquired by a camera mounted on moving vessels and the onshore videos acquired by a static camera installed onshore. All frames in the SMD have a resolution of 1920 × 1080 pixels and contain various conditions of ships, wakes from ships, sunglint, and waves. The buoy dataset consists of the videos acquired by a camera mounted on a floating buoy, and all frames in the buoy dataset have a resolution of 800 × 600 pixels. The buoy dataset includes a large motion change between adjacent frames.
The ground truth annotation for the horizon line and example images are shown in Figure 5. The ground truth of horizon line is represented by the vertical position,

(a) Ground truth annotation; (b) sample frame of onboard videos; (c) sample frame of onshore videos; and (d) sample frame of buoy videos.
Details of datasets. 27
SMD: Singapore Marine Dataset.
Performance of ROI detection
In this section, we demonstrate the extent to which the proposed ROI detection method reduces the processing time without loss of horizon detection accuracy. In the experiment, the input image was resized to a quarter of the original image. To find the optimal parameter for ROI detection, the proposed method measured the processing time and accuracy of horizon detection for various
Experimental results on SMD are shown in Figure 6. The ROI detection clearly reduced the processing time without loss of horizon detection accuracy. When comparing results using the entire frame and those using less than a quarter of the images area, the processing speed was four times faster, but the accuracy remained the same. Therefore, the proposed method divided the image into nine horizontal regions with

Processing time and accuracy of horizon detection according to the ROI area on SMD.
Figure 7 shows the ROI detection results using the proposed method. Thus, it is possible to improve the processing speed by reducing the area to be processed and to improve the accuracy of horizon detection by reducing the influence on the edges generated by wakes from ships, sunglint, and waves.

Sample frames of ROI detection (red rectangle) using the proposed method: (a) ROI detection from onboard frames; (b) ROI detection from onshore frames; and (c) ROI detection from buoy frames.
Horizon detection performance
In this section, we compare the performance of the proposed method and that of state-of-the-art methods, including MusCoWERT, 16 MSCM-Life, 15 the method of Fefilatyev et al. (FGSL), 13 and the method of Lipschutz et al., (LHSL). 14 The method using Hough transform (Hough) 10 and the method based on intensity variation analysis (IntV) 10 were considered for performance comparison.
Hough
This method applied the median filter to smooth the input image. 10 Then, it extracted the edge image using the Canny edge detector. Then, the Hough transform was used to find the optimal parameter of horizon line from the edge map.
IntV
This method first performed the median filtering. 10 Then, it searched the points having the maximum edge magnitude in each column of the smoothed image. Then, the least-square method was applied to maximal edges to find the optimal line.
FGSL
This method selected
LHSL
This method also selected
MSCM-LiFe
10 vertical median filters having different sizes were used to generate the multi-scale image. 15 For each scale image, Canny edge detection and the Hough transform were used to find the 10 candidate horizon lines. For each scale, the mean multi-scale images were generated by accumulating the scale image. Then, the method found the points having the maximum intensity variation in each column of the mean multi-scale images. The optimal horizon line was then selected by analyzing the goodness score and geometric proximity of pairs consisting of the candidate line of the Hough transform and the candidate line of the intensity variation approach.
MuSCoWERT
The multi-scale image was generated by applying median filters of various sizes.
16
For each scale image, edge detection was performed to generate the edge map. Then, lengths were calculated for all edges to consider their weight. Then, the Radon transform was applied to each weighted edge map to select
We measured the difference between the estimated and ground-truth parameter of horizon to compare the performance of horizon detection. The positional error of the horizon has defined as the difference between the vertical position of estimated line,
We implemented the comparison methods, except for MuSCoWERT, and calculated the horizon parameters,
Horizon detection, using different methods, on onboard videos from the SMD.
MuSCoWERT: multi-scale consistence of weighted edge Radon transform; MSCM-LiFe: multi-scale cross-modal linear feature.
Horizon detection, using different methods, with onshore videos from the SMD.
SMD: Singapore Marine Dataset; MuSCoWERT: multi-scale consistence of weighted edge Radon transform; MSCM-LiFe: multi-scale cross-modal linear feature.
The statistical results from errors in parameters
Horizon detection, using different methods, with buoy videos.
MSCM-LiFe: multi-scale cross-modal linear feature.
When comparing methods using multi-scale edge detection (e.g. MuSCoWERT, MSCM-LiFe, and the proposed method), to those using single scale edge detection, experimental results on SMD show that multi-scale edge detection helps increase the accuracy of the horizon detection by mitigating the instability of edge detection.
Sample horizon detection frames from the SMD and buoy dataset are displayed in Figure 8, showing that the proposed method accurately detects the horizon in maritime scenes containing great diversity. The proposed method is more robust to noisy edges, owing to wakes from ships, sunglint, and waves, because the ROI region can effectively reduce the noisy edges occurring away from the horizon. Although the proposed method has shown the reliable performance for horizon detection, the performance of the proposed method was degraded when the boundary of the horizon changed gradually. Thus, the edge could not be detected. In addition, the proposed method could not correctly identify the horizon when the number of edges constituting the horizontal line was relatively small, because the proposed method basically uses edge information.

Sample frames of horizon line detection (red line) using the proposed method: (a) horizon detection from onboard frames; (b) horizon detection from onshore frames; and (c) horizon detection from buoy frames.
The average processing time-per-frame for each method is provided in Table 5. To fairly measure the time of the horizon detection methods, all methods except MuSCoWERT were implemented using Python. All methods were executed on an Intel E5-1680 CPU, and the average processing time-per-frame used the mean values from a run time of 10 measured times. The results of MuSCoWERT were taken from Prasad et al., 16 which was implemented using MATLAB 2015b and was executed on an Intel i7-3770 CPU. Conventional methods, such as IntV and Hough, had relatively fast processing times, but they had a low accuracy of horizon detection. The methods using the multi-scale approach had high computational cost, in the tens of seconds, but they showed reliable accuracy of horizon detection. In Table 5, experimental results showed that the proposed method is the only way to accurately detect the horizon at high speed.
Average processing time-per-frame in seconds.
MuSCoWERT: multi-scale consistence of weighted edge Radon transform; MSCM-LiFe: multi-scale cross-modal linear feature.
Conclusion
In this article, we proposed a novel approach that enables a seafaring vessel to quickly detect the horizon using a multi-scale approach with ROI detection. The ROI detection method was used to restrict the search region and to reduce the computational time using the characteristics of maritime images. In addition, unlike previous works about processing multi-scale images independently, an approach, using edge information from different scales, was combined to improve the processing speed, while taking advantage of the multi-scale approach. We conducted experiments on the SMD and buoy dataset, which are publicly available databases of maritime scenarios. The results from our experiments showed that the proposed method for ROI detection can reduce the processing time by restricting the search region without degrading the accuracy of horizon detection. In addition, we compared the performance of the proposed method with that of state-of-the-art methods, and the experimental results showed that the proposed method outperforms the other tested methods in terms of accuracy of horizon detection and processing speed. The proposed method can process a high-definition image at about 15 fps, has a median positional error of less than 2 pixels from the center of the horizon, and has a median angular error of approximately 0.15°. These results demonstrate that the proposed method is the only way to accurately detect the horizon at high speed.
Whereas the proposed method showed reliable performance for horizon detection, its performance degraded when the edges related to the horizon could not be detected. The two reasons why the edges associated with the horizon could not be detected are as follows: (1) the maritime images acquired by a camera mounted on moving vessels were blurred by the motion of the vessels. To compensate for the motion of vessels, more sophisticated filtering methods, such as mean curvature motion filtering, are necessary; and (2) the boundary between the sky and sea region changed smoothly. This is because the proposed method depended on the edge information. Thus, in the future, we plan to develop a way to detect horizons without edge information using a scene segmentation method.
Footnotes
Handling Editor: Luca Reggiani
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: Chi Yoon Jeong and KyeongDeok Moon were supported by the Industrial Strategic Technology Development Program (10077551, Development of Original Technology for Artificial Intelligence Systems for Autonomous Navigating Ships) funded by the Ministry of Trade, Industry & Energy (MOTIE), Korea. Hyun S Yang was supported by the ICT R&D program of MSIP/IITP. [2017-0-00162, Development of Human-care Robot Technology for Aging Society] and National Research Foundation of Korea (NRF) grant funded by the Korean government (MSIP) (NRF-2018R1A2B6002565).
