Linear functions of images. In this problem we consider several linear functions
ID: 3167571 • Letter: L
Question
Linear functions of images. In this problem we consider several linear functions of monochrome image with N x N pixels. To keep the matrices small enough to work o by hand, we will consider the case with N = 3 (which would hardly qualify as an image We represent a 3 x 3 image as a 9-vector using the ordering of pixels shown below (This ordering is called column-major.) Each of the operations or transformations below defines a function y = f(x), where the 9-vector z represents the original image, and the 9-vector y represents the resulting or transformed image. For each of these operations give the 9 x 9 matrix A for which y = Ax. (a) Turn the original image z upside-down. (b) Rotate the original image z clockwise 90° (c) Translate the image up by 1 pixel and to the right by 1 pixel. In the translated image, assign the value y 0 to the pixels in the first column and the last row (d) Set each pixel value y, to be the average of the neighbors of pixel i in the original image. By neighbors, we mean the pixels immediately above and below, and imme diately to the left and right. The center pixel has 4 neighbors; corner pixels have 2 neighbors, and the remaining pixels have 3 neighbors.Explanation / Answer
The Original 3x3 image, as 9-vector using ordering of pixel is
1 4 7
2 5 8
3 6 9
This above is image is original image (x).
Now, let us solve (a)
(a) Turn the original image x upside-down
Here, the original 9-vector image x will turn upside-down as following,
It is image y
So, y= f(x)= Ax
So, transformed image y is below...
9 6 3
8 5 2
7 4 1
This above transformed image y is upside-down.
Let us now solve (b)
(b) Rotate the original image x clockwise 90°
Here, the original 9-vector image x will will turn clockwise 90°
as follows.
It is y
So, y = f(x) = Ax
So, transformed image y is below....
8 6 3
8 5 2
7 4 1
This above transformed image y is rotated clockwise 90°.
Let us now solve (c)
(c) [ See description of (c) in question....... ]
Up by 1 pixel and right by 1 pixel...
Here, the original 9- Vector image x will turn upside 1 pixel and right by 1 pixel as follows...
It is image y
So, y= f(x)= Ax
So, transformed image y is below....
2 3 4
5 6 7
8 9 10
Comparing with original x this is 1 pixel up and one pixel right.
Let us see the pixel 5 in original x is at middle
but here in transformed y, it is 6, so it is one pixel up
Also, in transformed y the A12 is 3,
where as in original x it was 2, it is one pixel right also.
Also, in the transform
Now, let us solve, (d)
(d)...[ See detail in question]
Here, the original 9-vector image will transformed with average of neighbour as follows.
Let it will be 'Bij'
The original was 'Aij'
If A11= 1 then B11= (4+ 2)/2 = 3
If A12= 4 then B12= (7+1+5)/3 = 13/3
If A13= 7 then B13= (4+8)/2 = 6
Similarly, B21= 3, B22= 5, B23= 7,
B31= 4, B32=17/3, B33= 7
So transformed y is as follows...
3 13/3 6
3 5 7
4 17/3 7
This above transformed image y is required solution.
Now, let us solve for
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.