Morphological Thick Line Center Detection
Miguel Alemán-Flores, Luis Alvarez, Pedro Henriquez, Luis Mazorra
CTIM. Centro de I+D de Tecnologías de la Imagen
Universidad de Las Palmas de G.C.




Thick line center and width estimation are important problems in computer vision. In this paper, we analyze this issue in real situations where we have to deal with some additional difficulties, such as the thick line distortion produced by interlaced broadcast video cameras or large shaded areas in the scene. We propose a technique to properly extract the thick lines and their centers using mathematical morphological operators. In order to illustrate the performance of the method, we present some numerical experiments in real images.

Simple deinterlacing using morphological line filters

We propose the following simple deinterlacing procedure: we replace even lines by odd lines in the image and then we apply a line morphological operator to clean thick lines. This operation is performed independently in each one of the image RGB color channels.

Thick line detection without shaded regions

We use the morphological disk opening I◦Ds to find out the lines. A first approximation of the thick line region A, can be expressed as:

where tR, tG, tB are the thresholds for each image channel. However, the HSV color space provides us with more reliable information. Hue (H) is the main component concerning color information. Let us denote by (Hs(x); Ss(x); Vs(x)) the HSV channels of the image (R◦Ds , G◦Ds , B◦Ds):Then, the line background area C can be expressed as:

The set A∩C represents the final set B of line points which correspond to image thick lines located in the background region of interest. In the numerical experiments we present, the parameters are chosen in the following way: s, t he maximum radius of line width, is set to 5 in order to be sure that all lines of interest in the image are included. tH1 and tH2 are chosen analyzing the peak of the histogram of Hs channel using standard histogram segmentation. The parameters tR, tG and tB are chosen in terms of a percentage 0 < p < 1 with respect to the histogram of the corresponding image channel. For instance, tR is chosen to satisfy:

where |.| represents the cardinal (size) of the set. In the experiment we chose p = 0.02.


Thick line detection without shaded regions

Although the previous technique works properly in lighted regions, the value channel Vs(x) in the HSV space varies significantly from lighted to shaded areas. In order to automatically identify whether we deal with large shaded area we analyze the histogram of the value channel Vs(x) but in the region of interest defined by the hue channel. If we deal with two regions, h(w) has a profile with two peaks. Using a standard histogram segmentation technique we can automatically identify the number of significant peaks in h(w) profile. Once we have separated the shaded and lighted regions, we apply the same procedure proposed in the previous section to each region and we obtain the line region B for the whole image.


Thick line center detection using morphological skeleton

In the case of discrete lattices, the morphological skeleton can be stated in the following way: If we denote by Dn the disk of radius n centered in 0, then, the center points of the line of width n can be obtained as the set :



We have presented a new technique for image thick lines and thick line centers extraction based on morphological operators in real situations. The proposed method works properly even in complex scenarios where we have to deal with interlaced broadcast images of large shaded areas. The numerical experiments are very promising. Most of the significant thick line centers are extracted. The amount of spurious false thick lines detected is small and isolated. Moreover, these false detections could be easily removed in a postprocessing stage where we search for straight lines and ellipses in the image based on the extracted thick line centers.


We acknowledge Mediapro for providing us with the test images used in this paper. This work was partially funded by Mediapro through the Spanish project CENIT-2007-1012 i3media.


  1. L. Alvarez and J. Esclarin : Image quantization using reaction-diffusion equations. SIAM JOURNAL ON APPLIED MATHEMATICS, VOL. 57 (1) pp 153–175 (1997)
  2. A. Ekin, A. M. Tekalp, R. Mehrotra: Automatic Soccer Video Analysis and Summarization.In: IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 12, NO. 7, JULY 2003.
  3. S.H. Khatoonabadi, M. Rahmati: Automatic soccer players tracking in goal scenes by camera motion elimination. In: Image and Vision Computing 27 (2009) 469–479.
  4. J. Liu, X. Tong, W. Li, T. Wang, Y. Zhang, H. Wang: Automatic Player Detection, Labeling and Tracking in Broadcast Soccer Video. In: Pattern Recognition Letters 30 (2009) 103–113.
  5. Y. Liu, Q. Huang, Q. Ye, W. Gao: A new method to calculate the camera focusing area and player position on playfield in soccer video. In: Visual Communications and Image Processing 2005.
  6. J. Serra: Image Analysis and Mathematical Morphology. Academic Press, 1982.
  7. K. Wan, X. Yan, X. Yu, C. Xu: Real-Time Goal-Mouth Detection In MPEG Soccer Video. In: MM ’03, November 2-8, 2003.
  8. L. Wang, B. Zeng, S. Lin, G. Xu, H. Shum: Automatic Extraction of Semantic Colors In Sports Video. In: ICASSP 2004.
  9. A. Watve, S. Sural :Soccer video processing for the detection of advertisement billboards. In: Pattern Recognition Letters 29 (2008) 994–1006.
  10. H. Yoon, Y. J. Bae, Y. Yang: A Soccer Image Sequence Mosaicking and Analysis Method Using Line and Advertisement Board Detection. In: ETRI Journal, Volume 24, Number 6, December 2002.
  11. Q. Zhang and I. Couloigner : Accurate Centerline Detection and Line Width Estimation of Thick Lines Using the Radon Transform. IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 16 (2), pp 310–316 (2007)