Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

COMPSCI373

FIRST SEMESTER, 2019

Computer Graphics and Image Processing

Question 1

[1 mark] Given the vectors u = (  ) v = (  ) What is the cross-product u x v?

(a) None of the others.

(b) 11

(e)  (  )1(8)

Question 2

[1 mark] Given a point P = (1, 2, 3). If P is expressed as the point P’ in a coordinate system centred on (4, 1, 1) with unit vectors u = (- 1, 0, 0)T, v = (0, 0, 1)T, n = (0, - 1, 0)T, what is the location of P’?

(a) (5, 3, 4)

(b) (3, 2, -1)

(c) (4, 2, 3)

(d) (-3, 3, 2)

(e) None of the others.

Question 3

[1 mark] What are the coordinates of the CIE XYZ colour (0.5, 0.3, 0.2) on the CIE chromacity diagram?

(a) (0.3, 0.5)

(b) (0.5, 0.5)

(c) (0.5, 0.3)

(d) None of the others.

(e) (0.5, 0.3, 0.2)

Question 4

[1 mark] Given a light source delivering Blue light with a transmitted component of 80%. Given an object with a spectral response of 40% for Blue light. What percentage of the full component of Blue light is emitted from the object?

(a) 32%

(b) None of the others.

(c) 40%

(d) 50% (e)  16%

Question 5

[1 mark] What is the purpose of the glClear() command

(a) None of the others.

(b) To enable transparency.

(c) To define the colour to be drawn in the background.

(d) To reset the values in the active drawing buffers.

(e) To reset the drawing matrices.

Question 6

[1 marks] Given are the vertices

Which calling sequence of these vertices (using glVertex2fv) results in the shape below if we use the OpenGL commands glBegin(GL_TRIANGLE_FAN) and glEnd()?

(a) 2, 4, 3, 1, 0

(b) 2, 1, 0, 4, 3

(c) None of the others.

(d) 0, 1, 2, 3, 4

(e) 0, 2, 1, 3, 4

Question 7

[1 mark] Given are the vertices

Which calling sequence of these vertices (using glVertex2fv) results in the shape below if we use the

OpenGL commands glBegin(GL_TRIANGLE_STRIP) and glEnd()?

(a) 0, 5, 6, 1, 2, 7, 4, 3, 0, 5

(b) 0, 1, 2, 3, 4, 5, 6, 7, 0

(c) 0, 5, 1, 6, 2, 7, 3, 4, 0, 5

(d) None of the others.

(e) 0, 3, 4, 5, 6, 1, 2, 7, 4, 3

Question 8

[1 mark] Which of the following statements about primitives in OpenGL isfalse?

(a) None of the others.

(b) Any   shape   that   can   be   drawn   using   GL_QUAD_STRIP   can   be   drawn   using

GL_TRIANGLE_STRIP.

(c) Any   shape   that   can  be   drawn   using   GL_TRIANGLE_STRIP   can  be   drawn   using GL_TRIANGLES.

(d) Any shape that can be drawn using GL_QUADS can be drawn using GL_TRIANGLES.         (e) Any   shape   that   can  be   drawn   using   GL_TRIANGLE_STRIP   can  be   drawn   using

GL_TRIANGLE_FAN.

Question 9

[1 mark] Which of the following statements about the Phong Illumination Model is false?

(a) Diffuse reflection is dependent on the distance to the light source.

(b) None of the others.

(c) Specular reflection has the highest intensity when light is reflected directly towards the camera.

(d) Diffuse reflection is responsible for highlights on a surface.      (e) Ambient reflection is independent of the position of the viewer.

Question 10

[1 mark] In the Phong Illumination Model, which of the following will increase the size of the specular highlight?

(a) Moving the camera closer to the surface.

(b) Increasing the shininess α .

(c) Increasing the intensity of the ambient light.

(d) Increasing the intensity of the diffuse light.

(e) None of the others.

Use the following information to answer the next 2 questions.

Given a scene with a single light shining on a point P located at (0, 0, 0). The surface normal at P is (0, 1, 0), the light position is (4, 3, 0), and the viewpoint is (-3, 4, 0).

The light has ambient intensity Ia = 0.5, diffuse intensity Id = 0.6, and specular intensity Is = 0.8.          The surface has an ambient reflection coefficient ρa = 0.8, a diffuse reflection coefficient ρd = 1.0, a specular reflection coefficient ρs = 0.6, and a shininess of 1.

Assume that lighting is unaffected by distance, i.e. kc=1.0 and kl=kq=0.0.

Note: in order to work out your answers you may not need all of the parameters specified above.

Question 11

[1 mark] Using the achromatic Phong illumination equation, what is the intensity of the reflected ambient light?

(a) 0.2

(b) 0.5

(c) 0.6

(d) None of the others.

(e) 0.4

Question 12

[1 mark] Using the achromatic Phong illumination equation, what is the intensity of the reflected diffuse light?

(a) 0.36

(b) 0.4

(c)  1.0

(d) None of the others. (e) 0.6

Question 13

[1 mark] Which of the following lists shading algorithms in order from fastest to slowest:

(a) None of the others.

(b) Flat, Gouraud, Phong

(c) Phong, Flat, Gouraud

(d) Flat, Phong, Gouraud

(e) Phong, Gouraud, Flat

Question 14

[1 mark] Which of the following statements about shading algorithms is true?

(a) Phong shading produces stronger Mach bands than Gouraud shading.

(b) Phong shading cannot render highlights in the centre of a face.

(c) Phong shading interpolates vertex normals across a face.

(d) None of the others.

(e) Phong shading interpolates the colour across a face.

Question 15

[1 mark] Which of the following statements about shadows algorithms is true?

(a) None of the others.

(b) Shadow Mapping can render shadows on curved surfaces.

(c) The Phong illumination model accounts for shadows.

(d) Shadows are only possible when using Phong shading.

(e) Projected Shadows are more versatile than Shadow Mapping.

Question 16

[1 mark] Which coefficients of the linear mapping operation, g(x,y) = af(x,y) + b, will map the pixel value f(x,y) = 50 to g(x,y) = 200 and pixel value f(x,y) = 100 to g(x,y) = 100?

(a) a=- 1, b=250

(b) None of the others

(c) a=1, b=150

(d) a=4, b=0

(e) a=-2, b=300

Question 17

[1 mark] Consider the greyscale image J defined at the beginning of this exam script. What is the image value at the pixel location (x=0,y=1) after applying a 20-90 percentile based           mapping on J?

(a)  156

(b) None of the others

(c)  16

(d) 150 (e) 52

Question 18

[1 mark] Consider the binary image I, which was introduced at the beginning of this exam   script, with white objects on black background (“1”/”0”) and the 3 by 3 structuring element S. Assume that the border pixels are not processed (i.e. they are not modified by any             morphological operator). What is the resulting image value at the pixel location (x=1,y=1)   after eroding the binary image I with the structuring element S?

(a) None of the others

(b) 0

(c) It is impossible to perform this operation

(d) Erosion does not apply to binary images (e)  1

Question 19

[1 mark] Consider the binary image I, which was introduced at the beginning of this exam   script, with white objects on black background (“1”/”0”) and the 3 by 3 structuring element S. Assume that the border pixels are processed using padding- 1. What is the resulting image value at the pixel location (x=3,y=2) after closing the binary image I with the structuring      element S?

(a) 0

(b) 1

(c) Erosion does not apply to binary images

(d) None of the others

(e) It is impossible to perform this operation

Question 20

[1 mark] Consider the binary image I, which was introduced at the beginning of this exam    script, with white objects on black background (“1”/”0”) and a 3 by 3 structuring element S. Assume that the border pixels are not processed (i.e. they are not modified by any                  morphological operator). What is the resulting value at pixel location (x=2,y=2) of the           morphological gradient of I computed with the structuring element S?

(a) None of the others

(b) Erosion does not apply to binary images

(c)  1

(d) 0

(e) It is impossible to perform this operation

Question 21

[1 mark] Consider the greyscale image J defined at the beginning of this exam script. What is the image value at the pixel location (x=1,y=2) after applying the 3 rows by 3 columns           median filter to J?

(a) 2

(b) 4

(c)  181

(d) 52

(e) None of the others

Question 22

[1 mark] Consider the greyscale image J defined at the beginning of this exam script. What is the image value at the pixel location of the resultant image (x=3,y=2) after performing            histogram equalization?

(a)  170

(b) None of the others

(c) 87

(d) 4  (e) 20

Question 23

[1 mark] Consider the greyscale image J defined at the beginning of this exam script; and the equalized image J’, that is, the image J after histogram equalization, and the cumulative          histogram C = [C(0),C(1),…,C(255)] of the image J’ . What is the cumulative histogram count C(102) in image J’?

(a)  16

(b) 20

(c) None of the others

(d) 23

(e)  102

Question 24

[1 mark] Consider the greyscale image J defined at the beginning of this exam script; and the equalised image J’, that is, the image J after histogram equalization. What is the image value at the pixel location of the resultant image (x=1,y=1) after applying the 3 rows by 3 columns median filter to the equalized image J’?

(a) None of the others

(b) 221

(c) 23

(d) 181 (e)  170

Question 25

[1 mark] Consider the greyscale image J defined at the beginning of this exam script; and the equalised image J’, that is, the image J after histogram equalization. What is the image value at the pixel location of the resultant image (x=1,y=4) after applying the 1 rows by 3 columns Gaussian filter to the equalized image J’?

(a) None of the others

(b) 3

(c)  170

(d) 34 (e) 68

Question 26

[1 mark] Consider the greyscale image J defined at the beginning of this exam script. What  will be the threshold (rounded to the nearest integer) computed after running three iterations of the adaptive threshold technique as described in class?

(a) 82

(b) 87

(c) None of the others

(d) 75 (e) 52

Question 27

[1 mark] Consider a submission to coderunner2 transforming a greyscale image into another greyscale image. Which imageJ/coderunner instruction allows you to obtain the pixel value of the current image at location x=55, y=235?

(a) None of the others

(b) getPixel(235,55)

(c) getPixel(55,235)

(d) setPixel(55,235)

(e) setPixel(235,55)

Question 28

[1 mark] Which of the following statements about surface representations isfalse?

(a) Constructive Solid Geometry (CS) objects are popular in engineering applications.

(b) Point clouds can be converted into surfaces by triangulating them (connecting points with triangles).

(c) Subdivision surfaces are a popular technique for smoothing coarse polygon models.

(d) Implicit surfaces are easily represented with polygons. (e) A spline surface is a type of parametric surface.

Question 29

[1 mark] Which of the following cues is not a monocular depth cue?

(a) Texture gradient (the texture in an image is less detailed as objects become more distant). (b) Stereopsis (the left and right eye perceive slightly different images of a 3D scene)            (c) Interposition (close objects appear in the front of farther objects).

(d) Relative size (farther objects appear smaller).

(e) Linear perspective (parallel lines seem to meet in the distance).

Question 30

[1 mark] Given is the following code rendering the colour cube shown in the image below. The vertex indices for the right and bottom face of the cube have been deleted.

const int numVertices=8;

const int numFaces=6;

const int numFaceVertices=4;

const float vertices[numVertices][3] =

{{0,0,0},{1,0,0},{0,1,0},{1,1,0},{0,0,1},{1,0,1},{0,1,1},{1,1,1}};

const int faces[numFaces][numFaceVertices] =

{{Bottom}, {Right}, {0,4,6,2}           // Bottom, Right, Left

{2,6,7,3}, {4,5,7,6}, {0,2,3,1}}; // Top, Front, Back

Which of the following vertex sequences produces the image above (please use anti-clockwise order):

(a) Right = 1,5,7,3  (b) Right = 5,1,3,7  (c) Right = 1,3,7,5  (d) Right = 3,1,5,7  (e) None of the others

Bottom = 1,5,4,0

Bottom = 0,4,5,1

Bottom = 0,1,5,4

Bottom = 1,0,4,5

Question 31

[1 mark] Given is a right-angled triangle ABC, i.e. a triangle where two sides form a 90 degree angle. Assume the vertex with the right angle is A, and the other two vertices are B and C. The vertex           colours of A, B and C are CA=(0.2, 0.6, 0.6), CB=(0.8, 0.2, 0.4), and CC=(0.4, 0.6, 0.8). Given is a       point P such that the area of the triangle BPC is ½ of the area of ABC, and the areas of the triangles    ABP and APC are ¼ of the area of ABC. If the triangle is displayed using OpenGL, what is the colour CP at the point P?

(a) CP=(0.45, 0.55, 0.65)

(b) CP=(0.55, 0.4, 0.55)

(c) CP=(0.35, 0.35, 0.45)

(d) CP=(0.4, 0.5, 0.6)

(e) None of the others

Question 32

[1 mark] Which of the following OpenGL commands defines the same transformation matrix as glScalef(1, 1, -1)?

(a) glRotatef(180, 0, 1, 0)

(b) None of the others

(c) glScalef(0, 0, -1)

(d) glRotatef(180, 0, 0, 1)

(e) glRotatef(180, 1, 0, 0)

Question 33

[1 mark] Given is a function drawOne() which draws a shape resembling the number “1” in the xy-

plane as shown in the image below.

Which scene is produced by executing the OpenGL code below?

glRotatef(90, 1, 0, 0);

glTranslatef(0, 1, 0);

drawOne();

(a)

(b) None of the others

(c)

(d)

(e)

Question 34

[1 mark] Given is a function drawOne() which draws a shape resembling the number “1” in the xy-

plane as shown in the image below.

Which scene is produced by executing the OpenGL code below?

glRotatef(90, 1, 0, 0);

glPushMatrix();

glScalef(2, 1, 1);

drawOne();

glPopMatrix();

glRotatef(90, 0, 1, 0);

drawOne();

(a)

(b)

(c)

(d) None of the others     (e)

Question 35

[1 mark] Given is a function drawHouse() which draws a wire frame house in the xy-plane as shown in the image below.

Which of the code segments below produces the same image as shown above (i.e. the house appears unchanged)?

(a) glScalef(0, 0, 0);

(b) glTranslatef(2, 0, 0);

glScalef(-1, 1, 1);

(c) None of the others

(d) glScalef(-1, -1, -1);

(e) glRotatef(180, 0, 1, 0);

glTranslatef(2, 0, 0);

Question 36

[1 mark] Given is the profile curve c(t)=( r(1-t), 0, th), 0≤ t ≤1, shown in the picture below.

What is the parametric equation of the surface of revolution p(s,t)=(x(s,t), y(s,t), z(s,t)), 0≤ s,t ≤1, formed by rotating the line segment c(t) around the z-axis?

(a) p(s, t ) = r(r)1(1)t(t)2(2)πs(πs)

(b) p(s, t ) = t(t)h(h)

(c) p(s, t ) = r(r)1(1)t(t)2(2)πs(πs)

(d) None of the others        (e) p(s, t ) = t(t)h(h)

Question 37

[1 mark] Which of the following statements about ray tracing are true?

I   Increasing the distance N between the eye and the view plane zooms out of the scene.

II  Increasing the distance N between the eye and the view plane increases the resolution of the image. III The colour of objects in the shadow is computed using the ambient component of Phong’s              illumination model.

IV If objects are opaque, shadow rays only need to be computed for the first intersection point of a primary ray with an object.

V  The ray tracing algorithm presented in the lecture uses Gouraud shading.

(a) Only statements I, III, and V are true

(b) Only statements III and IV are true

(c) Only statements II and IV are true

(d) Only statement III is true (e) All statements are false

Question 38

[1 mark] Given is a ray tracer with camera coordinate axes u, v, n, a distance from eye to viewplane of N, a viewplane width of 2W, and a viewplane height of 2H. Assumed the eye point is the origin, how do we calculate the world coordinates for the bottom-right point pbottomRight of the viewplane?

(a) None of the others

(b) pbottomRight = -Nn - Wu - Hv

(c) pbottomRight = -Nn + Wu - Hv

(d) pbottomRight = Nn + Wu + Hv

(e) pbottomRight = Nn - Wu + Hv

Question 39

[1 mark] Given is a scene containing two light sources and one sphere in front of the virtual camera. The sphere is opaque and not reflective. If we ray trace the scene creating an image with 3x3 pixels, and each primary ray hits the sphere, how many shadow rays are created?

(a) 9

(b) 3

(c) 27

(d) None of the others (e)  1

( 1(1)), B = ( 1), and C = ( 1(2)) and a ray p(t)

(b) The ray intersects the triangle’s plane for t=1.5, but the intersection point is outside the triangle

(c) The ray is parallel to the triangle

(d) The ray intersects the triangle for t =1.

(e) The ray intersects the triangle’s plane for t=1, but the intersection point is outside the triangle.

( ) + t ( 1(2)). For

(a) r = 1

(b) r = √2

(c) r = √3

(d) r = 2

(e) r = 1.5

Question 42

[1 mark] Given is a raytraced scene with a light source at position L=(3, 4, 1)T . The scene contains the xy-plane as ground plane and a sphere with radius 1 and centre point c=(c, 0, 1)T . For which values of c is the point P=(3, 0, 1)T in the shadow of the sphere?