0% found this document useful (0 votes)
94 views2 pages

Computer Vision Section Questions

The document contains a quiz on computer vision concepts with multiple choice and code writing questions. It tests knowledge of topics like image processing, colorspaces, filters, and segmentation. Sample questions cover identifying computer vision, image array types, histogram views, filtering techniques, and writing MATLAB code to perform operations like loading, transforming, filtering and saving an image.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views2 pages

Computer Vision Section Questions

The document contains a quiz on computer vision concepts with multiple choice and code writing questions. It tests knowledge of topics like image processing, colorspaces, filters, and segmentation. Sample questions cover identifying computer vision, image array types, histogram views, filtering techniques, and writing MATLAB code to perform operations like loading, transforming, filtering and saving an image.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Computer Vision Quiz

Answer the following questions.


Question 1: Choose the correct answer

1) _____ is considered high-level image processing out of which a machine/computer/software intends to decipher
the physical contents of an image or a sequence of images.
(Image processing - Computer vision - Computer graphics)
Answer: Computer vision

2) Some images, such as truecolor images, require a/an _____ array.


(one-dimensional - two-dimensional - three-dimensional)
Answer: three-dimensional

3) _____ views the distribution of image pixel intensities.


(impixel(I) - imhist(I) - imsize(I))
Answer: imhist(I)

4) _____ stretches the histogram of an image in order to have the intensity range of the image fill the entire
available range.
(imadjust(I) - imstretch(I) - histeq(I))
Answer: imadjust(I)

5) ____ is the simplest method of image segmentation. It replaces each pixel in an image by comparing it with
some fixed constant.
(Edge detection - Region growing - Thresholding)
Answer: Thresholding

6) _____ is a device or process that removes from a signal some unwanted component or feature.
(Segmentation - Filter - Transformation)
Answer: Filter

7) _____ is an edge detection filter by first derivative technique.


(edge(b,'canny') - fspecial(’lablacian’) - fspecial('gaussian'))
Answer: edge(b,’canny’)

8) _____ is a nonlinear digital filtering technique, often used to remove noise.


(Average - Median - Lablacian)
Answer: Median

Question 2: Write a matlab code for the following program


1) Read an image named ’balls.jpg’.
I = imread(’balls.jpg’);

2) Transform the colorspace from RGB to Gray.


I = rgb2gray(I);

3) Scale the image to 0.5 of its size.


I = imresize(I, 0.5);
4) Rotate it with 180 degrees.
I = imrotate(I, 180);

5) Add salt and pepper noise to the image.


I = imnoise(I, ‘salt&pepper’, 0.25);

6) Filter it with Average filter.


average_f = fspecial(’average’);
I = imfilter(I, average_f);

7) Is the average filter optimal for this type of noise? if not, filter the image with the optimal one.
No
I = medfilt2(I);

8) Blur the image using motion filter.


motion_f = fspecial(‘motion’, 10);
I = imfilter(I, motion_f);

9) Sharpen the image.


I = imsharpen(I, ’amount’, 5);

10) save the image with name ’filteredBalls.jpg’.


I = imwrite(I, ’filteredBalls.jpg’, ’jpg’);

Question 3: Bonus
a) Filter the image by a 3*3 median filter, without padding.

Solu.
1st pixel = med(0, 5, 5, 6, 6, 6, 7, 7, 15) = 6
2nd pixel = med( 6, 6, 6, 7, 7, 8, 8, 8, 15) = 7
3rd pixel = med(0, 5, 5, 6, 6, 6, 7, 7, 15) = 6
4th pixel = med( 6, 6, 6, 7, 7, 8, 8, 8, 15) = 7

Filtered image = 6 7
6 7

b) Filter the image by a 3*3 average filter, without padding.


.
Solu.
1st pixel = (0, 5, 5, 6, 6, 6, 7, 7, 15)/9 = 6.3 ~ 6
2nd pixel = ( 6, 6, 6, 7, 7, 8, 8, 8, 15)/9 = 7.8 ~ 8
3rd pixel = (0, 5, 5, 6, 6, 6, 7, 7, 15)/9 = 6.3 ~ 6
4th pixel = ( 6, 6, 6, 7, 7, 8, 8, 8, 15)/9 = 7.8 ~ 8

Filtered image = 6 8
6 8

You might also like