Digital Image Processing Questions And Answers – Basic Relationships between Pixels

This set of Digital Image Processing Multiple Choice Questions & Answers (MCQs) focuses on “Basic Relationships between Pixels”.

1. A pixel p (x, y) has two vertical neighbors and two horizontal neighbors. The neighbors of (x, y) are _____________

a) (x+1, y+1), (x-1, y-1), (x+1, y-1), (x-1, y+1)
b) (x+1, y), (x-1, y+1), (x-1, y-1), (x, y-1)
c) (x, y), (x-1, y-1), (x+1, y+1), (x+1, y-1)
d) (x+1, y), (x-1, y), (x, y+1), (x, y-1)
View Answer

Answer: d
Explanation: Since p has 2 vertical and 2 horizontal neighbors and 2 vertical neighbors,(keeping the center as (x,y), each of the neighbors coordinates can be calculated by just changing the abscissa and ordinate by 1 accordingly) the vertical neighbors are (x, y+1) and (x, y-1) and the horizontal neighbors are (x+1, y) and (x-1, y).

2. The 4 neighbors of pixel p are denoted by N4(P). Each of them are at what distance?
a) 0.5 units from P
b) 0.707 from P
c) unit distance from P
d) 1.414 units from P
View Answer

Answer: c
Explanation: The four neighbors of P is denoted by N4(P) : {(x+1, y), (x-1, y), (x, y+1), (x, y-1)}, this shows each pixel is at unit distance from P. This can be calculated by using the distance formula for 2 points. Distance formula: d = √[(x2-x1)2+(y2-y1)2], where (x1,y1) and (x2,y2) are the 2 points and d is the distance between them.
advertisement
advertisement

3. A pixel p (x, y) has 4 diagonal neighbors. The diagonal neighbors of (x, y) are _____________
a) (x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1)
b) (x+1, y), (x-1, y+1), (x-1, y-1), (x, y-1)
c) (x, y), (x-1, y-1), (x+1, y+1), (x+1, y-1)
d) (x+1, y), (x-1, y), (x, y+1), (x, y-1)
View Answer

Answer: a
Explanation: Since p has 4 diagonal neighbors,(considering a diamond shape with (x,y) as center, there would be 4 diagonals neighbors on the 4 sides of the diamond) each of x and y co-ordinates will change by 1 thus ND(P) is given by: (x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1).

4. The 4 diagonal neighbors of pixel p are denoted by ND(P). Each of them are at what distance?
a) 0.5 units from P
b) 0.707 from P
c) unit distance from P
d) 1.414 units from P
View Answer

Answer: d
Explanation: The four neighbors of P is denoted by ND(P): {(x+1, y), (x-1, y), (x, y+1), (x, y-1)}, so each of them is at a distance √2 from P [√(12+12)= √2=1.414 units]. The above calculation is done by using the distance formula for 2 points. Distance formula: d = √[(x2-x1)2+(y2-y1)2], where (x1,y1) and (x2,y2) are the 2 points and d is the distance between them.

5. The union of 2 regions which form a connected set are called _____________
a) Connected
b) Joined
c) Disjoint
d) Adjacent
View Answer

Answer: d
Explanation: The regions are said to be Adjacent if their union forms a connected set. In other words, two pixels a and b are connected if there is a path from a and b on which every pixel is 4-connected to the next pixel. A set of pixels in an image where all are connected to each other is called a connected component.

6. In a binary image, two pixels are connected if they are 4-neighbors and have same value 0 or 1. State whether the statement is true or false.
a) True
b) False
View Answer

Answer: a
Explanation: Condition for 2 pixels of a binary image to be connected: They should be 4-neighbors and have same value either 0 or 1 and there should be a connected path between them.
advertisement

7. For the diagram below, select the best option.

digital-image-processing-questions-answers-basic-relationships-pixels-q7

advertisement

a) Region R1 and R2 are adjacent
b) Region R1 and R2 are connected
c) Region R1 and R2 are disjoint
d) Region R1 and R2 are joined
View Answer

Answer: a
Explanation: Two image subsets S1 and S2 are adjacent if few pixels in the region S1 is adjacent to few pixels in region S2. In the diagram, the region close to R1 and R2 form a boundary and the set of pixels there show that R1 is adjacent to R2.

8. The subset of pixels is given by s. For the pixels p and q to be connected, which of the following must be satisfied?
a) There exists a path between p and q, which lies outside of the subset s
b) The pixels are 4-adjacent
c) There exists a path between p and q, which lies inside of the subset s
d) The pixels are 8-adjacent
View Answer

Answer: c
Explanation: Pixels p and q are said to be connected if there exists a path between p and q, which lies inside of the subset s. Two pixels p and q are connected if there is a path from p and q on which every pixel is 4-connected to the next pixel.

9. Which of the following is not done using neighborhood processing?
a) Smoothing and averaging
b) Noise removal and filtering
c) Image encryption and decryption
d) Edge detection and contrast enhancement
View Answer

Answer: c
Explanation: An image can be modified by applying a particular function to each pixel value. Neighbourhood processing is an extension of this, where a function is applied to a neighbourhood of each pixel. Smoothing and averaging, Noise removal and filtering, Edge detection and contrast enhancement are techniques done using neighborhood processing.

10. Which of the following is the correct distance measure?
a) D8(p, q) = max [(x-s)2 + (y-t)2]
b) D4(p, q) = [(x-s)2 + (y-t)2]
c) De (p, q) = |x-s| + |y-t|
d) D8(p, q) = max (|x-s|, |y-t|)
View Answer

Answer: d
Explanation: The distance measures are given below:
Euclidean Distance:
De (p, q) = [(x-s)2 + (y-t)2]
City Block Distance:
D4 (p, q) = |x-s| + |y-t|
Chess Board Distance:
D8 (p, q) = max (|x-s|, |y-t|)

Sanfoundry Global Education & Learning Series – Digital Image Processing.

To practice all areas of Digital Image Processing, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.