Homework 5

Wednesday, Febrary 15, 2012

Problem 2


Flip the mask, then convulve with the original image, pad the columns on the right with zeros. The convoluted image has the same size as the original image.

Image, Mask 1

Convoluted Result: [ -5, 0, 0, -4, 0, 0, 1, 1, 1, 1, 10, -5, 0, 0, 0, 0 ]

Image, Mask 2

Convoluted Result: [ 5, 0, 0, 4, 0, 0, -1, -1, -1, -1, -10, 5, 0, 0, 0, 0 ]

Image, Mask 3

Convoluted Result: [ 5, 5, 5, 14, 14, 14, 17, 16, 15, 13, 2, 6, 5, -5, 0, 0, 0, 0 ]

Image, Mask 4

Convoluted Result: [ 5, 5, 5, 4, 4, 4, -1, -2, -3, -3, -12, -6, -5, 5, 0, 0, 0, 0 ]


Problem 3


Proportional Gain

In a closed loop system, the steady state error is
SSE = 1 / [ 1 + Kp * G(0) ]
So increasing the proportional gain will make the steady state error smaller. The system also gets to the desired steady state value faster.

Homework 4

Wednesday, Febrary 8, 2012

Image 1 + Mask 1

Image 1 + Mask 2

Image 1 + Mask 3


Image 2 + Mask 1

Image 2 + Mask 2

Image 2 + Mask 3


The Original Code can be downloaded here: convo.m

(a) These masks detect edges, and enhance them. Convoluted with the images, they give an effect as if the original images have been raised into different layers.

(b) Smaller masks cost less time to calculate, and focus more on the local information. The large masks are less efficient to apply, but can take more a larger scale of information into account.

(c) Mask 3 will work the best. Because it's not as sensitive as mask 1 and 2, thus will not detect every edge in the image, such as the waves.

Lab 2

Tuesday, January 31, 2012

Image 1: Mona Lisa

Original Image

Threshold 144

Contrast

Histogram


Image 2: Team Letter N

Original Image

Threshold 169

Contrast

Histogram


Image 3: Wall E

Original Image

Threshold 111

Contrast

Histogram


The Original Code can be downloaded here: thres.m ; contrast.m ; histogram.m

Homework 3

Tuesday, January 31, 2012

Problem 1

a.

The mask is:

1/91/91/9
1/91/91/9
1/91/91/9

b.

for(int i = 1; i < rows-1; i++)
{
for (int j = 1; cols-1; j++)
{
image[i][j] = 1/9 * image[i-1][j-1] + 1/9 * image[i-1][j] + 1/9 * image[i-1][j+1] + 1/9 * image[i][j-1] + 1/9 * image[i][j] + 1/9 * image[i][j+1] + 1/9 * image[i+1][j-1] + 1/9 * image[i+1][j] + 1/9 * image[i+1][j+1];
}
}

We just applied Convolution.

c.

We have lost information. We can no longer create the original image from the 'mean image' because we have added up and averaged everything evenly. For example, if one pixel is created from 1/9 * (1+2+3+4+5+6+7+8+9), whereas another image is created from 1/9 * (5+5+5+5+5+5+5+5+5), we wouldn't be able to know the difference.

d.

The mask can be:

0.050.050.05
0.050.60.05
0.050.050.05


Problem 2

Let x be the distance of the Martian from Pathfinder, and y be the distance from the vertical projection of Martian onto the camera, to the right camera. Then the distance from the vertical projection of Martian onto the camera, to the left camera will be 12.5-y.

Therefore we know:
x / y = 0.5 / (50/72)
x / (12.5 - y) = 0.5 / (30/72)
From which we can get:
x = 5.625
y = 375/48

So the distance from the Martian to the focal point is 5.625 inch. And the distance from the Martian to the Pathfinder is 5.625 + 0.5 = 6.125 inch.

Homework 1

Tuesday, January 24, 2012

Problem 1


The robot in the picture on the right is Keepon. Keepon is a little yellow robot designed to help disabled children with social development. Keepon was developed by Hideki Kozima from National Institute of Information and Communications Technology in Kyoto, Japan. Keepon is made of 4 motors, 2 cameras in its eyes, a microphone in its nose, and covered by a yellow rubber skin.

The purpose of Keepon is to study the underlying mechanisms of social communication, specially for children with developmental disorders such as autism. Keepon has interacted with children in schools and remedial centers for developmental disorders since 2003.

Keepon is able to respond to pokes, pats, and tickles with a rich variety of emotional movements and sounds. It can also hear the beat in music or clap and dance in synchronized rhythm.