ABCs…..of a Digital Image

Describes some important basic definitions in digital image processing.

Raji Lini
Analytics Vidhya
3 min readNov 7, 2021

--

Digital Image

A digital image is an image composed of pixels, each pixel is represented by a finite, discrete numeric value corresponding to its intensity. Digital images are generally known as raster or bitmap images.

Pixel

A pixel is the smallest individual picture element of a digital image. Every pixel element is positioned at any co-ordinates(x, y) of an image.

Several relationships between pixels in a digital image is explained below.

Neighbors of a pixel

A pixel p at co-ordinates (x,y) has 4 neighbors denoted by N4(p) is a set of pixels at unit distance from p. These pixels are denoted by (x+1,y),(x-1,y),(x,y+1) and (x,y-1). These are called horizontal and vertical neighbors.

The diagonal neighbors of p denoted by Nd(p) is a set of pixels having co-ordinates (x+1,y+1), (x+1,y-1),(x-1,y+1) and (x-1,y-1).

Adjacency

Two pixels p and q are said to be adjacent if they are in neighborhood and possessing grayscale value similar.

Let V be a set of grey-level values used to define adjacency. In an image two pixels p and q with values from V are 4-adjacent if q is in the set N4(p). The pixels p and q with values from V are 8-adjacent if q is in the set N8(p).

Mixed-Adjacency is a modification to 8-adjacency. Two pixels p and q with values from V are m-adjacent if

a)q is in N4(p) or

b)q is in Nd(p) and

c)the set N4(p)^N4(q) has no pixels whose values are from V.

Consider the set V={1}. The figure 1 represents the 8-adjacency and m-adjacency of a set of pixels.

Figure 1

Digital Path

A digital path or curve from pixel p with co-ordinates (x,y) to pixel q with co-ordinates (s,t) is a sequence of distinct pixels with co-ordinates (x0,y0),(x1,y1)…xn,yn) where (x0,y0)=(x,y) and (xn,yn)=(s,t) and pixels (xi,yi) and (xi-1,yi-1) are adjacent for 1≤i≤n.

Here n is called the length of the path.

Connectivity

Let S represents a subset of pixels in an image. Two pixels p and q are said to be connected in S if there exists a path between them consisting entirely of pixels in S. For any pixel p in S, the set of pixels that are connected to it is called connected components of S. If it has only one connected component, then set S is called a connected set.

Region

Let R be a subset of pixels in an image. R is said to be a region of the image if R is a connected set.

Boundary

The boundary (border or contour) of a region R is the set of pixels in the region that have one or more neighbors that are not in R. When the region includes entire image, then its boundary is defined as the set of pixels in the first and last rows and columns of the image.

Edge

Edges are formed from pixels with derivative values that exceed a preset threshold. The edge is identified based on a measure of gray-level discontinuity at a point. Edge points are linked together and forms edge segment. Sometimes, these edge segments are linked together and forms boundaries, not always.

In the coming article, we will be discussing about different distance measures.

REFERENCE

Digital Image Processing (Pearson Education) by Rafael C.Gonzalez,Ricahard E.Woods.

--

--

Raji Lini
Analytics Vidhya

By profession an Instructor and now a Research scholar at IIITM-K