A (physical) pinhole camera is simply a box with a hole in it. Describe how the image would change if you made the distance from the pinhole to the back of the box longer or shorter. Assume the other box dimensions stay the same.
Given a 3-channel color image with width width
and height height
stored in a 3-dimensional array F
, write pseudocode to give the image a reddish tint. Assume that F[r, c, i]
is the syntax to access the value of the i
th color channel (where 0 is red, 1 is green, 2 is blue) of the pixel at the r
th row and c
th column. Your answer can, but does not need to involve any color space transformations.
Suppose you want to make a color image represented in RGB more saturated, but without allowing any pixel values to go outside the range from 0 to 1. Write pseudocode (or python code) to implement this.
Given a grayscale image f(x,y), how could you increase the contrast? In other words, how could you make the bright stuff brighter and dark stuff darker? As above, your approach should not allow values to go outside their original range from 0 to 1.
In terms of an input image f(x,y), write a mathematical expression for a new image g that is shifted four pixels to the left.
In terms of an input image f(x,y), write a mathematical expression for a new image g that is twice as big (i.e., larger by a factor of two in both x and y).
For each of Problems 2 through 7, determine whether the transformation described is geometric or photometric.