While earlier contour detection approachesquantify the presence of a boundary at a given image location through localmeasurements alone, more recent approaches take into account colour, brightnessand texture information (Arbeláez et al., 2011).

Thesemultiple cues were been taken into consideration by (Maire et al., 2008) at alocal and global image scales through spectral partitioning. Contours whichwere unrecognizable using image information at a local scale can be detected ona global scale. Globalized probability ofa boundary (gPb) involves detectingcontours and assigning probabilities (Maire et al., 2008 ; Arbelaez et al.

, 2009 ; Arbeláez et al., 2011). Globalized probabilityof a boundary(gPb) is developed from probability of a boundary (Pb) by Maire etal. (2004), which uses an oriented gradient signal to evaluate the strength ofa contour through a set of pixels. Each pixel is examined locally.

A region ofpixels in a radius around the target pixel is located in the image, thendivided into two with a straight line. The orientation of this line is set atangle . The two halves of the circular region arethen examined independently. Pixel intensity histograms are generated from eachhalf and the distance between the two histogramscalculated, whereby the result is called the gradient magnitude.

The probability of a boundary (Pb) is thenextended to multiscale probability of aboundary (mPb) which uses 4 differentchannels (intensity, colour a, colour b andtextons) and 8 different orientations toperform boundary probabilities. The texture channel (texton) is produced byconvolving the input image with 17 Gaussian derivative filters. K-meansclustering is used to gather the pixels. The resultant cluster assignmentsreplace pixel intensity information to form a new image, called a texton image,which shows the strongest edges. mPb is performed by linearly combining the 4cues: Equation4.

5 where shows the scales, indexes the 4 feature channels, is aconstant and isthe gradient magnitude. This algorithm can be compressed to take the maximum atany particular pixel. The mPb is therefore defined as: Equation 4.6 Spectral probabilityof a boundary (sPb) is coined from Pb (Arbeláezet al., 2011). It incorporates global image information to determine thestrength of each contour.

A radius of local pixels around a target pixel are examined. Pixels which have a strongcontour as determined by Pb are considered: ) Equation 4.7Where, is asparse symmetry affinity matrix, is aconstant, isthe line segment connecting pixels and Tofactor global image information, is defined and eigenvectors of equation solved.The solution is factored in the final formulationof sPb detector; Equation4.

8Where, is aneigenvector and is the weighting based on theentire image.Combining mPband sPb results to the globalized contourdetector(gPb), taking advantage of the strengths of these two detectors. mPb iscapable of extracting many contours while sPbpicks the most salient ones.

gPb is a linear combination of mPb and sPband is defined as; Equation 4.9 Where and are constants. After detection using the resulting gPb detector,the image is segmented using 1) an Oriented Watershed Transform (OWT), avariant of the watershed transform algorithm which generates regions from theoriented contours, and 2) Ultrametric Contour Map(UCM) which defines ahierarchical segmentation.

OWT and UCM segmentation can be applied to theoutput of any contour detector. gPb-owt-ucmproduces better results compared to other approaches like image segmentation(Mean Shift, Normalised Cuts) and edge detection (Prewitt, Sobel, Canny andRoberts) (Arbeláez et al., 2011).

It is therefore referred to as astate-of-the-art contour detection method in computer vision (Zhang et al.,2013; Jevnisek & Avidan, 2016). In this studywe refer gPb-owt-ucm as gPb contourdetection.