Tag Archives: quiz

Image Processing Quiz-6

Q1. What is a and b in Lab color space?

  1. a: Red/Green Value, b: Blue/Yellow Value
  2. a: Red/Blue Value, b: Green/Yellow Value
  3. a: Blue/Yellow Value, b: Red/Green Value
  4. None of the above

Answer: 1
Explanation: In Lab, L* stands for perceptual lightness, and a* and b* for the four unique colors of human vision: red, green, blue, and yellow. Refer to this link to know more.

Q2. In Nearest Neighbor, how many neighboring pixels are considered for calculating the intensity value for a new location?

  1. 3
  2. 1
  3. 2
  4. 0

Answer: 2
Explanation: As clear from the name, this method considers the nearest neighbor i.e. 1 pixel for calculating the intensity value for a new location. To know more about Nearest Neighbor, refer to this link.

Q3. _______ is used to keep the output image size similar to the input image during convolution operation?

  1. Padding
  2. Interpolation
  3. Dilation
  4. Erosion

Answer: 1
Explanation: Padding refers to the process of adding borders in an image with generally 0 valued pixels. Because during convolution the size of the image decreases so to prevent this we pad the original image.

Q4. What do you mean by Affine Transformation?

  1. a geometric transformation that preserves collinearity and parallelism
  2. a geometric transformation that preserves distances and angles but not collinearity
  3. transformation that is associated with the change in viewpoint
  4. a geometric transformation that preserves collinearity and distance but not parallelism

Answer: 1
Explanation: An affine transformation is any transformation that preserves collinearity, parallelism as well as the ratio of distances between the points (e.g. midpoint of a line remains the midpoint after transformation). It doesn’t necessarily preserve distances and angles. Refer to this link to know more.

Q5. Can we sharpen an image using a smoothing filter?

  1. Yes
  2. No

Answer: 1
Explanation: Yes, we can sharpen an image using a smoothing filter. For instance, both Unsharp Masking and Difference of Gaussian techniques both sharpen an image using a smoothing filter.

Q6. What do you mean by Domain filters?

  1. in which the filter weights are assigned according to the spatial closeness
  2. in which the filter weights are assigned according to the intensity difference
  3. in which the filter weights are assigned both according to the spatial closeness and intensity difference

Answer: 1
Explanation: As clear from the name, Domain filters are the one in which the filter weights are assigned according to the spatial closeness (i.e. Domain)

Q7. Which of the following histogram techniques can be used for image segmentation?

  1. Histogram Equalization
  2. CLAHE
  3. Histogram Backprojection
  4. Histogram Specification

Answer: 3
Explanation: Histogram Backprojection can be used for image segmentation. To know more about Histogram Backprojection, refer to this link.

Q8. In general, the gradient in x-direction will find ________?

  1. Horizontal edges
  2. Vertical edges
  3. Any type of edges
  4. Gradient has no relation with edges

Answer: 2
Explanation: Because gradient refers to the directional change in intensity so the gradient in x-direction will find Vertical edges. Refer to this link to know more.

Image Processing Quiz-5

Q1. Which of the following denotes 255 in the binary form?

  1. 11111111
  2. 00000000
  3. 01111111
  4. 11111110

Answer: 1
Explanation: In binary form, 255 is represented as 11111111. To know more about how to convert decimal to binary, refer to this link.

Q2. Which of the following OpenCV functions can be used to perform CLAHE?

  1. First we create a CLAHE object using “cv2.createCLAHE()” and then we apply this on the image using .apply() method
  2. cv2.applyCLAHE()
  3. cv2.clahe()
  4. None of the above

Answer: 1
Explanation: In OpenCV, first we create a CLAHE object using “cv2.createCLAHE()” and then we apply this on the image using .apply() method. Refer to this link to know more about this function.

Q3. What is the smallest element of an image?

  1. pixel
  2. dpi
  3. meter
  4. centimeter

Answer: 1
Explanation: In digital image processing, a pixel(or picture element) is the smallest item of information in an image.

Q4. Which of the following OpenCV functions can be used to apply an affine transformation to an image?

  1. cv2.warpAffine()
  2. cv2.affineTransform()
  3. cv2.applyAffine()
  4. cv2.WarpAffine()

Answer: 1
Explanation: In OpenCV, cv2.warpAffine() can be used to apply an affine transformation to an image. Refer to this link to know more.

Q5. Which of the following is an subtractive color model?

  1. RGB
  2. CMYK
  3. Both of the above
  4. None of the above

Answer: 2
Explanation: In subtractive model colors are perceived as a result of reflected light. For instance, Cyan is the complement of red, meaning that the cyan serves as a filter that absorbs red. The amount of cyan applied to a white sheet of paper controls how much of the red in white light will be reflected back from the paper. To know more about subtractive models, refer to this link.

Q6. What type of filters results in image sharpening?

  1. Low Pass filters
  2. High Pass filters

Answer: 2
Explanation: Because high pass filters enhances the high-frequency parts of an image, these results in image sharpening.

Q7. For a skewed image histogram, which technique will can be used for improving the global contrast?

  1. Histogram Equalization
  2. Histogram Matching
  3. Histogram Balancing
  4. None of the above

Answer: 2
Explanation: For skewed image histogram, one reasonable approach can be to manually specify the transformation function that preserves the general shape of the original histogram but has a smoother transition of intensity levels in the skewed areas. This is what we do in Histogram Matching.

Q8. What does the term “Shadows” refers to in a 1D image histogram?

  1. Leftmost part (the black and dark areas)
  2. Rightmost part (light and pure white areas)
  3. Center part (medium grey areas)
  4. There is no such term!!!

Answer: 1
Explanation: Shadows as clear from the name refers to the Leftmost part of the histogram that contains mostly the black and dark areas. To know more about Image Histograms, refer to this link.

Image Processing Quiz-4

Q1. Which of the following are the main steps used in Canny Edge Detector?

  1. Noise Reduction, Finding Intensity Gradient, Non-max Suppression, Hysteresis Thresholding
  2. Noise Reduction, Detecting contours, Hysteresis Thresholding
  3. Noise Reduction, Detecting contours, Non-max Suppression
  4. Noise Reduction, Non-max Suppression, Hysteresis Thresholding

Answer: 1
Explanation: The main steps used in Canny Edge Detector are Noise Reduction, Finding Intensity Gradient, Non-max Suppression, Hysteresis Thresholding. Refer to this link to know more.

Q2. Which of the following filter assigns more weights to the nearest pixels as compared to the distant pixels?

  1. Gaussian Filter
  2. Box Filter
  3. Median Filter
  4. All of the above

Answer: 1
Explanation: A Gaussian filter assigns more weights to the nearest pixels as compared to the distant pixels. To know more about Gaussian filter, refer to this link.

Q3. How many thresholds are used in hysteresis thresholding in Canny Edge Detector?

  1. 2
  2. 1
  3. 3
  4. 4

Answer: 1
Explanation: To solve the problem of “which edges are really edges and which are not” Canny uses the Hysteresis thresholding. In this, we set two thresholds ‘High’ and ‘Low’. Refer to this link to know more.

Q4. In Bilinear Interpolation, how many neighboring pixels are considered for calculating the intensity value for a new location?

  1. 3
  2. 1
  3. 2
  4. 4

Answer: 4
Explanation: Bi-linear interpolation means applying a linear interpolation in two directions. Thus, it uses 4 nearest neighbors for calculating the intensity value for a new location. To know more about Bilinear Interpolation, refer to this link.

Q5. Which of the following image sharpening techniques to use if the image contains a high degree of noise?

  1. Sobel
  2. Laplacian
  3. Difference of Gaussian
  4. Scharr

Answer: 3
Explanation: Because in Difference of Gaussian we are actually doing blurring which reduces the effect of noise to a great extent.

Q6. What response does a second order derivative filter will give along the ramps?

  1. Zero
  2. positive
  3. negative

Answer: 1
Explanation: Because ramps has constant slope so for ramp edge the first order derivates gives constant response along the ramp while second order gives 0 response along the ramp.

Q7. Which of the following OpenCV functions can be used to perform Hit-or-Miss Transform?

  1. cv2.morphologyEx(img, cv2.MORPH_HITMISS, kernel)
  2. cv2.morphologyEx(img, cv2.MORPH_HITORMISS, kernel)
  3. cv2.morphHitMiss()
  4. cv2.hitMiss()

Answer: 1
Explanation: In OpenCV, cv2.morphologyEx(img, cv2.MORPH_HITMISS, kernel) can be used to perform Hit-or-Miss Transform. Refer to this link to know more.

Q8. Which of the following Morphological operations closes the holes/gaps present in the object while keeping the initial object size same?

  1. Dilation
  2. Erosion
  3. Closing
  4. Opening

Answer: 3
Explanation: As clear from the name, Dilation dilates or expands the object region so for bridging/closing the holes Dilation can be used but to keep the initial object size same we need Erosion. Since Closing is Dilation followed by Erosion so this can also be used.

Image Processing Quiz-3

Q1. In an 8-bit color image, the intensity value (255,255,255) corresponds to which color? (Consider the RGB color model here)

  1. Black
  2. White
  3. Red
  4. Cyan

Answer: 2
Explanation: Because RGB is an additive color model i.e. the colors present in the light add to form new colors. So, Zero intensity for each component(RGB) gives the darkest color (no light, considered the black), and full intensity of each gives a white. Since for an 8-bit image the full intensity value is 255 so the answer is White. Refer to this link to know more.

Q2. Which of the following techniques can be used for blur detection or detecting blurred images?

  1. Variance of Laplacian
  2. Unsharp Masking
  3. High Boost filtering
  4. All of the above

Answer: 1
Explanation: As we all know that the blurry image doesn’t have well-defined edges. So, if you calculate the Laplacian of this image, you will get more or less the same response everywhere. In other words, the variance of this Laplacian image will be less. So, this can be used for blur detection.

Q3. Which of the following can be a reason for a low contrast image?

  1. Poor illumination of the scene
  2. wrong setting of lens aperture during image acquisition
  3. lack of dynamic range in the imaging sensor
  4. All of the above

Answer: 4
Explanation: All of the above can be possible reasons for getting a low contrast image.

Q4. For which type of images, the Histogram Equalization technique can be used?

  1. thermal images
  2. Satellite images
  3. X-ray images
  4. All of the above

Answer: 4
Explanation: Because Histogram Equalization is a contrast enhancement method so this can be used in all of the above images.

Q5. Which of the following OpenCV functions can be used to perform the Dilation operation?

  1. cv2.dilate()
  2. cv2.Dilate()
  3. cv2.dilate2D()
  4. cv2.morphDilate()

Answer: 1
Explanation: In OpenCV, cv2.dilate() can be used to perform Dilation operation. Refer to this link to know more.

Q6. Generally in a 1D image histogram, what do the x and y-axis represents?

  1. x-axis: Intensity values, Y-axis: no. of pixels corresponding to intensity values
  2. x-axis: no. of pixels corresponding to intensity values, Y-axis: Intensity values
  3. x-axis: pixel location, y-axis: Intensity values
  4. x-axis: Intensity values, y-axis: pixel location

Answer: 1
Explanation: In 1D image histogram, we plot the intensity values on the x-axis and the no. of pixels corresponding to intensity values on the y-axis. To know more about Image Histograms, refer to this link.

Q7. What of the following is the general form of representation of log transformation? Suppose r and s denote the input and output pixel values respectively.

  1. s=clog10(1/r)
  2. s=clog10(1+r)
  3. s=clog10(1-r)
  4. s=clog10(1*r)

Answer: 2
Explanation: Log transformation means replacing each pixel value with its logarithm. The general form of log transformation function is given by s=clog10(1+r). Refer to this link to know more.

Q8. What is a high pass filter?

  1. a filter that enhances the high-frequency parts of an image
  2. a filter that enhances the low-frequency parts of an image

Answer: 1
Explanation: A high pass filter is the one that enhances the high-frequency parts of an image.

Image Processing Quiz-2

Q1. Which of the following Morphological operations closes the holes/gaps present in the object while keeping the initial object size the same?

  1. Dilation
  2. Erosion
  3. Closing
  4. Opening

Answer: 3
Explanation: As clear from the name, Dilation dilates or expands the object region so for bridging/closing the holes Dilation can be used but to keep the initial object size same we need Erosion. Since Closing is Dilation followed by Erosion so this can also be used.

Q2. Which of the following OpenCV functions can be used to threshold an image?

  1. cv2.threshold()
  2. cv2.thresh()
  3. cv2.Thresh()
  4. cv2.Threshold()

Answer: 1
Explanation: In OpenCV, cv2.threshold() can be used to threshold an image. Refer to this link to know more.

Q3. Difference between the image and its opening is known as __________?

  1. Black top-hat transform
  2. White top-hat transform
  3. Hit or Miss
  4. Closing

Answer: 2
Explanation: Difference between the image and its opening is known as White top-hat transform. Refer to this link to know more.

Q4. What is the contrast in image processing?

  1. the difference in luminance or color that makes an object distinguishable from other objects within the same field of view.
  2. the difference in the resolution that makes an object distinguishable from other objects within the same field of view.
  3. same as brightness
  4. There is no such term in image processing!!!

Answer: 1
Explanation: In image processing, contrast refers to the difference in luminance or color that makes an object distinguishable from other objects within the same field of view. To know more about contrast, refer to this link.

Q5. Which of the following refers to a type of noise in an image?

  1. Gaussian
  2. Salt and Pepper
  3. Speckle
  4. All of the above

Answer: 4
Explanation: All of the above refers to a type of noise in an image.

Q6. Which of the following Morphological operations can be used for shape detection or finding particular patterns in the given image?

  1. Morphological Gradient
  2. Hit-or-Miss Transform
  3. Top-hat Transform
  4. Opening

Answer: 2
Explanation: Hit-or-Miss Transform can be used for shape detection or finding particular patterns in the given image. In this, we use two structuring elements (say B1 and B2) and ask a simple question of does B1 fits the object while, simultaneously, B2 misses the object, i.e. fits the background. Refer to this link to know more.

Q7. Which of the following matplotlib functions can be used to calculate the image histogram? Suppose we import as “import matplotlib.pyplot as plt”

  1. plt.hist()
  2. plt.calcHist()
  3. plt.showHist()
  4. plt.histCalc()

Answer: 1
Explanation: In matplotlib, plt.hist() can be used to calculate the image histogram. Refer to this link to know more about this function.

Q8. In Perspective Transformation, what is the minimum number of points to select to obtain the transformation matrix?

  1. 1
  2. 2
  3. 3
  4. 4

Answer: 4
Explanation: In Perspective Transformation, the transformation matrix (M) is defined by 8 constants, thus to find this matrix we need 4 points. Refer to this link to know more.

Image Processing Quiz-1

Q1. Which domain refers to the Fourier transform of an image?

  1. Spatial domain
  2. Frequency domain

Answer: 2
Explanation: In transform domain we first transform an image into another domain (like frequency) by applying for instance Fourier transform, do processing there and convert it back to the spatial domain by some inverse operations.

Q2. Which of the following techniques can be used for image segmentation?

  1. Histogram Equalization
  2. CLAHE
  3. Histogram Backprojection
  4. Histogram Specification

Answer: 3
Explanation: Histogram Backprojection can be used for image segmentation. To know more about Histogram Backprojection, refer to this link.

Q3. Which of the following OpenCV functions can be used to perform convolution operations?

  1. cv2.filter2D()
  2. cv2.convolve()
  3. cv2.filter()
  4. cv2.conv2D()

Answer: 1
Explanation: In OpenCV, cv2.filter2D() can be used to perform convolution operation. Refer to this link to know more about this function.

Q4. Which color model is used in printing?

  1. Additive color model
  2. Subtractive color model

Answer: 2
Explanation: Subtractive color model (CMYK) is used in printing. Refer to this link to know more.

Q5. Which domain refers to the image plane itself?

  1. Spatial domain
  2. Frequency domain

Answer: 1
Explanation: Spatial domain refers to the image plane. This means we perform all operations directly on image pixels.

Q6. In the dilation operation, generally the output image features becomes ________ ?

  1. Thinner
  2. Thicker
  3. Blurred
  4. Sharpened

Answer: 2
Explanation: Because Dilation dilates or expands the object region, the output image features becomes thicker. Refer to this link to know more.

Q7. Dilation is the ________ of Erosion?

  1. dual
  2. rotated version
  3. translated version
  4. neighbor

Answer: 1
Explanation: Dilation is the dual of erosion. Dual in the sense that dilating the object region is equivalent to eroding the background region and vice versa.

Q8. What type of filters results in image sharpening?

  1. Low Pass filters
  2. High Pass filters

Answer: 2
Explanation: Because high pass filters enhances the high-frequency parts of an image, these results in image sharpening.