Census Transform
   HOME

TheInfoList



OR:

The census transform (CT) is an image operator that associates to each
pixel In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a raster image, or the smallest point in an all points addressable display device. In most digital display devices, pixels are the smal ...
of a
grayscale In digital photography, computer-generated imagery, and colorimetry, a grayscale image is one in which the value of each pixel is a single sample representing only an ''amount'' of light; that is, it carries only intensity information. Graysca ...
image a binary string, encoding whether the pixel has smaller intensity than each of its neighbours, one for each bit. It is a non-parametric transform that depends only on relative ordering of intensities, and not on the actual values of intensity, making it invariant with respect to
monotonic In mathematics, a monotonic function (or monotone function) is a function between ordered sets that preserves or reverses the given order. This concept first arose in calculus, and was later generalized to the more abstract setting of order ...
variations of illumination, and it behaves well in presence of multimodal distributions of intensity, e.g. along object boundaries. It has applications in
computer vision Computer vision is an interdisciplinary scientific field that deals with how computers can gain high-level understanding from digital images or videos. From the perspective of engineering, it seeks to understand and automate tasks that the hum ...
, and it is commonly used in visual
correspondence problem The correspondence problem refers to the problem of ascertaining which parts of one image correspond to which parts of another image, where differences are due to movement of the camera, the elapse of time, and/or movement of objects in the photo ...
s such as
optical flow Optical flow or optic flow is the pattern of apparent motion of objects, surfaces, and edges in a visual scene caused by the relative motion between an observer and a scene. Optical flow can also be defined as the distribution of apparent veloci ...
calculation and
disparity Disparity and disparities may refer to: in healthcare: * Health disparities in finance: * Income disparity between females and males. **Male–female income disparity in the United States **Income gender gap * Economic inequality * Income inequ ...
estimation. The census transform is related to the rank transform, that associates to each pixel the number of neighbouring pixels with higher intensity than the pixel itself, and was introduced in the same paper.Zabih and Woodfill (1994), p. 153.


Algorithm

The most common version of the census transform uses a 3x3 window, comparing each pixel p with all its 8-connected neighbours with a function \xi defined as : \xi(p,p')=\begin 0 & \textp > p' \\ 1 & \textp \le p' \\ \end. The results of these comparisons are concatenated and the value of the transform is an 8-bit value, that can be easily encoded in a
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable unit ...
. : \begin \hline 124 & 74 & 32\\ \hline 124 & 64 & 18\\ \hline 157 & 116 & 84\\ \hline \end \longrightarrow \begin \hline 1 & 1 & 0\\ \hline 1 & x & 0\\ \hline 1 & 1 & 1\\ \hline \end \longrightarrow 11010111 Similarity between images is determined by comparing the values of the census transform for corresponding pixels, using the
Hamming distance In information theory, the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. In other words, it measures the minimum number of ''substitutions'' required to chan ...
. Several variations of the algorithm exist, using different size of the window, order of the neighbours in the pattern (row-wise, clockwise, counterclockwise), comparison operator (greater, greater or equal, lesser, lesser or equal). An extension of the algorithm uses a three-way comparison that allows to represent similar pixels, whose intensity difference is smaller than a tolerance parameter \epsilon, defined asStein (2004). : \xi(p,p')=\begin 0 & \textp - p' > \epsilon\\ 1 & \text, p - p', \le \epsilon\\ 2 & \textp' - p > \epsilon \end whose result can be encoded with two bits for each neighbour, thus doubling the size of the pattern for each pixel. : \begin \hline 124 & 74 & 32\\ \hline 124 & 64 & 18\\ \hline 157 & 116 & 84\\ \hline \end \longrightarrow \begin \hline 2 & 1 & 0\\ \hline 2 & x & 0\\ \hline 2 & 2 & 2\\ \hline \end \longrightarrow 21020222


See also

*
Local binary patterns Local binary patterns (LBP) is a type of visual descriptor used for classification in computer vision. LBP is the particular case of the Texture Spectrum model proposed in 1990. LBP was first described in 1994. It has since been found to be a power ...


References

* * * {{cite conference, title=Non-parametric local transforms for computing visual correspondence, book-title=European conference on computer vision, year=1994, last1=Zabih, first1=Ramin, last2=Woodfill, first2=John, pages=151–158, url=http://www.cs.duke.edu/courses/spring06/cps296.1/handouts/Zabih%20Woodfill%201994.pdf Feature detection (computer vision)