The probability of co-occurrences is obtained computing a 3D histogram where the two first dimensions correspond to the relative position of two edges and the final one to their relative orientation. Then, the histogram lies in the space
R 2 ×
S 1, the same space we will later use to model contours in
The mathematical model section. In contrast with previous papers on co-occurrence statistics, we focus only on the image contours and their orientations and use oriented derivative filter so that the polarity of the contrast of contours is considered.
Our method can be summarized in four steps:
-
Filter each image of the database with a set of oriented edge detection kernels.
-
For each image, perform non-maximal suppression with a threshold in order to obtain a list of points (x, y, θ) corresponding to edges with their respective orientations.
-
Count how many times two detected edges with relative position (Δx, Δy) have orientations (θ c, θ p) and store the data in a 4D histogram in R 2 × S2.
-
Project the data of the 4D histogram to a 3D histogram where the third coordinate is the relative orientation.
Step 1: We focus our study only on the image contours and their orientations; therefore, the edge detection filter will be an odd kernel acting as an oriented derivative filter. This choice allows us to consider the polarity of the contrast of contours, distinguishing if the image gradient goes from a darker zone to a lighter one or in the opposite sense. Therefore, the considered set of filters is indexed by their orientation
θ ∈ [0, 2
π). Among the options present in literature, one of the most common is the imaginary component of Gabor filters. Instead, we used directional derivatives of a Gaussian filter (DoG) with orientation
θ since using the steerable filter architecture we achieve very efficient computational implementation (Freeman & Adelson,
1991).
Step 2: For every image the filtering process produces a stack of filtered images, each one obtained by convolution with the kernel of orientation θ. We perform non-maximal suppression consisting in selecting for each pixel the maximum output of the filters as θ varies. Then we construct a list of triplets containing the pixels (x, y) where the maximum exceeded a fixed threshold, and the corresponding orientation θ where the maximum is achieved. A careful analysis ensures that the results are almost independent from the threshold. The same happens with the size and variance of the kernel used.
This edge detection mechanism is inspired from the architecture of the primary visual cortex since we try to reproduce the hyper-columnar architecture using the bank of DoG filters. Each filter imitates the impulse response of the simple cells of V1. Also the non-maximal suppression is present in the hyper-columns (Hubel,
1995) (
Figure 1).
Step 3: For each image, we have computed a list of points (x i , y i , θ i ) that represents the set of positions of contours and their orientations, and we can now estimate statistics of co-occurrences. Given any pair of points (x i , y i , θ i ) and (x j , y j , θ j ) in the list, we say that we have a co-occurrence of two points with relative positions Δx = x j − x i , Δy = y j − y i and with orientations θ i and θ j . Hence, every co-occurrence is represented by a quadruplet (Δx, Δy, θ i , θ j ), which we store in a 4D histogram. In other words, we count how many times the quadruplets occur. In this procedure, we only take into account couples of oriented points satisfying ∣Δx∣, ∣Δy∣ < d.
The same procedure is repeated for all considered images, accumulating in a 4D histogram.
Step 4: We consider relative orientations and not absolute ones, projecting the points (Δ
x, Δ
y,
θ i ,
θ j ) of the 4D histogram on the rotated point:
where is the matrix of rotation of the vector (Δ
x, Δ
y) of an angle Δ
θ.
The assumption that the position differences and the orientation differences suffice for compressing what is a 6D distribution (two (
x,
y) positions and two orientations) to a 3D histogram amounts to a spatial-orientation homogeneity assumption formulated and tested in August and Zucker (
2000).
This step has advantages for the computational complexity of the algorithm since it reduces the dimension of the data to be stored. As we will see in the next section, it also simplifies the geometrical tools to be used in the model.
Finally, we normalize the full histogram over the total number of occurrences to get the probability of observing an edge element at every possible relative position and orientation difference from a given (reference) edge element. This normalized histogram estimating the probability density function of co-occurrences of a particular geometrical configuration of contours will be called from now on H(η, ξ, Δθ).