A 4 × 4 digital image has pixel intensities (U) as shown in the figure. The number of pixels with \( U \leq 4 \) is:
We are asked to find how many pixels have intensities less than or equal to 4.
Let’s go through the matrix and count the number of pixels that satisfy \( U \leq 4 \).
The given matrix of pixel intensities is:
Total count: \( 4 + 3 + 2 + 2 = 11 \)
The error matrix resulting from randomly selected test pixels for a classified image is given below.
The Producer’s accuracy of class 1 is % (rounded off to 1 decimal place).
Reference Data | |||||
---|---|---|---|---|---|
Class 1 | Class 2 | Class 3 | Class 4 | ||
Classified Data | Class 1 | 320 | 8 | 7 | 3 |
Class 2 | 12 | 270 | 6 | 2 | |
Class 3 | 9 | 6 | 410 | 5 | |
Class 4 | 14 | 2 | 3 | 350 |
The brightness values of four pixels in the input image are shown in the table below. The image is rectified using nearest neighbor intensity interpolation, and the pixel at location (5, 4) in the output image is to be filled with the value from coordinate (5.3, 3.7) in the input image. The brightness value of the pixel at location (5, 4) in the rectified output image is 11. (Answer in integer)
Location of pixels in input image (Row, Column) | Brightness Value |
---|---|
(5, 3) | 9 |
(5, 4) | 11 |
(6, 3) | 14 |
(6, 4) | 12 |
Consider a directed graph \( G = (V,E) \), where \( V = \{0,1,2,\dots,100\} \) and
\[ E = \{(i,j) : 0 < j - i \leq 2, \text{ for all } i,j \in V \}. \] Suppose the adjacency list of each vertex is in decreasing order of vertex number, and depth-first search (DFS) is performed at vertex 0. The number of vertices that will be discovered after vertex 50 is:
Create empty stack S Set x = 0, flag = 0, sum = 0 Push x onto S while (S is not empty){ if (flag equals 0){ Set x = x + 1 Push x onto S } if (x equals 8): Set flag = 1 if (flag equals 1){ x = Pop(S) if (x is odd): Pop(S) Set sum = sum + x } } Output sumThe value of \( sum \) output by a program executing the above pseudocode is:
def f(a, b): if (a == 0): return b if (a % 2 == 1): return 2 * f((a - 1) / 2, b) return b + f(a - 1, b) print(f(15, 10))The value printed by the code snippet is 160 (Answer in integer).
Consider the following tables, Loan and Borrower, of a bank.
Query: \[ \pi_{\text{branch\_name}, \text{customer\_name}} (\text{Loan} \bowtie \text{Borrower}) \div \pi_{\text{branch\_name}}(\text{Loan}) \] where \( \bowtie \) denotes natural join. The number of tuples returned by the above relational algebra query is 1 (Answer in integer).