ArticleslgStudy

mathematics

Pixel connectivity

Pixel connectivity is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Pixel connectivity rather than just read about it. In short: In image processing, pixel connectivity is the way in which pixels in 2-dimensional (or hypervoxels in n-dimensional) images relate to their neighbors. Formulation In order to specify a set of connectivities, the dimension N and the width of the neighborhood n, must be specified.

Pixel connectivity — main illustration
Pixel connectivity — illustration

Key takeaways

  • Pixel connectivity belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Pixel connectivity to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Pixel connectivity from memory before moving on to harder problems.

Reference excerpt

In image processing, pixel connectivity is the way in which pixels in 2-dimensional (or hypervoxels in n-dimensional) images relate to their neighbors.

Formulation

In order to specify a set of connectivities, the dimension N and the width of the neighborhood n, must be specified. The dimension of a neighborhood is valid for any dimension n≥1. A common width is 3, which means along each dimension, the central cell will be adjacent to 1 cell on either side for all dimensions. Let MNn represent a N-dimensional hypercubic neighborhood with size on each dimension of n=2k+1,k∈ℤ Let q→ represent a discrete vector in the first orthant from the center structuring element to a point on the boundary of MNn. This implies that each element qi∈{0,1,...,k},∀i∈{1,2,...,N} and that at least one component qi=k Let SNd represent a N-dimensional hypersphere with radius of d=‖q→‖. Define the amount of elements on the hypersphere SNd within the neighborhood MNn as E. For a given q→, E will be equal to the amount of permutations of q→ multiplied by the number of orthants. Let nj represent the amount of elements in vector q→ which take the value j. nj=∑i=1N(qi=j) The total number of permutation of q→ can be represented by a multinomial as N!∏j=0knj! If any qi=0, then the vector q→ is shared in common between orthants. Because of this, the multiplying factor on the permutation must be adjusted from 2N to be 2N−n0 Multiplying the number of amount of permutations by the adjusted amount of orthants yields,

E=N!∏j=0knj!2N−n0 Let V represent the number of elements inside of the hypersphere SNd within the neighborhood MNn. V will be equal to the number of elements on the hypersphere plus all of the elements on the inner shells. The shells must be ordered by increasing order of ‖q→‖=r. Assume the ordered vectors q→ are assigned a coefficient p representing its place in order. Then an ordered vector q→p,p∈{1,2,...,∑x=1k(x+1)} if all r are unique. Therefore V can be defined iteratively as

Vq→p=Vq→p−1+Eq→p,Vq→0=0, or

Vq→p=∑x=1pEq→x If some ‖q→x‖=‖q→y‖, then both vectors should be considered as the same p such that Vq→p=Vq→p−1+Eq→p,1+Eq→p,2,Vq→0=0 Note that each neighborhood will need to have the values from the next smallest neighborhood added. Ex. Vq→=(0,2)=Vq→=(1,1)+Eq→=(0,2) V includes the center hypervoxel, which is not included in the connectivity. Subtracting 1 yields the neighborhood connectivity, G

G=V−1

Table of Selected Connectivities

Example Consider solving for G|q→=(0,1,1) In this scenario, N=3 since the vector is 3-dimensional. n0=1 since there is one qi=0. Likewise, n1=2. k=1,n=3 since max⁡qi=1. d=02+12+12=2. The neighborhood is M33 and the hypersphere is S32

E=3!1!∗2!∗0!23−1=624=12 The basic q→ in the neighborhood N33, q→1=(0,0,0). The Manhattan Distance between our vector and the basic vector is ‖q→−q→0‖1=2, so q→=q→3. Therefore,

Gq→3=Vq→3−1=Eq→1+Eq→2+Eq→3−1=Eq→=(0,0,0)+Eq→=(0,0,1)+Eq→=(0,1,1) Eq→=(0,0,0)=3!3!∗0!∗0!23−3=661=1 Eq→=(0,0,1)=3!2!∗1!23−2=622=6 G=1+6+12−1=18 Which matches the supplied table

Higher values of k & N The assumption that all ‖q→p‖=r are unique does not hold for higher values of k & N. Consider N=2,k=5, and the vectors q→A=(0,5),q→B=(3,4). Although q→A is located in M25, the value for r=25, whereas q→B is in the smaller space M24 but has an equivalent value r=25. q→C=(4,4)∈M24 but has a higher value of r=32 than the minimum vector in M25. For this assumption to hold, {N=2,k≤4N=3,k≤2N=4,k≤1 At higher values of k & N, Values of d will become ambiguous. This means that specification of a given d could refer to multiple q→p∈MnN.

Types of connectivity

2-dimensional

4-connected 4-connected pixels are neighbors to every pixel that touches one of their edges. These pixels are connected horizontally and vertically. In terms of pixel coordinates, every pixel that has the coordinates

(x±1,y) or (x,y±1) is connected to the pixel at (x,y).

6-connected 6-connected pixels are neighbors to every pixel that touches one of their corners (which includes pixels that touch one of their edges) in a hexagonal grid or stretcher bond rectangular grid. There are several ways to map hexagonal tiles to integer pixel coordinates. With one method, in addition to the 4-connected pixels, the two pixels at coordinates (x+1,y+1) and (x−1,y−1) are connected to the pixel at (x,y).

8-connected 8-connected pixels are neighbors to every pixel that touches one of their edges or corners. These pixels are connected horizontally, vertically, and diagonally. In addition to 4-connected pixels, each pixel with coordinates (x±1,y±1) is connected to the pixel at (x,y).

3-dimensional

6-connected 6-connected pixels are neighbors to every pixel that touches one of their faces. These pixels are connected along one of the primary axes. Each pixel with coordinates (x±1,y,z), (x,y±1,z), or (x,y,z±1) is connected to the pixel at (x,y,z).

18-connected 18-connected pixels are neighbors to every pixel that touches one of their faces or edges. These pixels are connected along either one or two of the primary axes. In addition to 6-connected pixels, each pixel with coordinates (x±1,y±1,z), (x±1,y∓1,z), (x±1,y,z±1), (x±1,y,z∓1), (x,y±1,z±1), or (x,y±1,z∓1) is connected to the pixel at (x,y,z).

26-connected 26-connected pixels are neighbors to every pixel that touches one of their faces, edges, or corners. These pixels are connected along either one, two, or all three of the primary axes. In addition to 18-connected pixels, each pixel with coordinates (x±1,y±1,z±1), (x±1,y±1,z∓1), (x±1,y∓1,z±1), or (x∓1,y±1,z±1) is connected to the pixel at (x,y,z).

See also Grid cell topology Moore neighborhood

References

A. Rosenfeld, A. C. Kak (1982), Digital Picture Processing, Academic Press, Inc., ISBN 0-12-597302-0 Cheng, CC; Peng, GJ; Hwang, WL (2009), "Subband Weighting With Pixel Connectivity for 3-D Wavelet Coding", IEEE Transactions on Image Processing, 18 (1): 52–62, Bibcode:2009ITIP...18...52C, doi:10.1109/TIP.2008.2007067, PMID 19095518, retrieved 2009-02-16 Cheng, CC; Peng, GJ; Hwang, WL (2009), "Subband Weighting With Pixel Connectivity for 3-D Wavelet Coding", IEEE Transactions on Image Processing, 18 (1): 52–62, Bibcode:2009ITIP...18...52C, doi:10.1109/TIP.2008.2007067, PMID 19095518, retrieved 2009-02-16

Illustrations

Pixel connectivity: Example of neighborhood of pixels - association of eight and four pixels
Example of neighborhood of pixels - association of eight and four pixels

Worked examples

Example 1 — a first encounter with Pixel connectivity

Start with the simplest possible case. Write down what Pixel connectivity claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Pixel connectivity before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Pixel connectivity ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Pixel connectivity

In research
Pixel connectivity appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Pixel connectivity in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Pixel connectivity is common in secondary-school and first-year university syllabi. It links to neighbouring topics Digital topology, Graph connectivity, so understanding it makes those chapters shorter.
In everyday life
Look for Pixel connectivity outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Pixel connectivity” →

How to study Pixel connectivity in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Pixel connectivity means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Pixel connectivity out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Pixel connectivity in simple terms?

In image processing, pixel connectivity is the way in which pixels in 2-dimensional (or hypervoxels in n-dimensional) images relate to their neighbors. Formulation In order to specify a set of connectivities, the dimension N and the width of the neighborhood n, must be specified.

Why does Pixel connectivity matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Pixel connectivity?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Pixel connectivity.

Tags

  • Digital topology
  • Graph connectivity

Keep exploring