Wednesday 29 February 2012

LAB 2 : Matlab Basic

In todays's lab (28/2/2012), we have learned about scalar and vector using Matlab

Scalar : a= 5
Vector : b= [1 2 3]

[col , row] = size



1 : Given an image A as shown below



Write the location of the pixel 4 and 10 using Matlab

Answer:


Pixel 4 =  Z (1,3) ; Z (2,3) ; Z (3,2)
Pixel 10 = Z(1,6) ; Z (3,5)


2: Simple Operation On Matric





3: Given an image C as shown




Apply the operation:-

  • Get the Min value

  • Get Total value

  • Get Average value

  • Get Max value

Tuesday 21 February 2012

LAB 1 : Camera vs Eyes

1) How Cameras Work 




We take a Manual Single-lens-reflect (SLR) camera as an example. Optical component of the camera is the lens. It is a piece of glass or plastic that responsible to take the beam of light bouncing off of an object and redirect them so they come together to form a real image. As light travels from one medium to another, it changes speed because light travel more quickly through air than it does through glass. So the lens slow it down.

When light waves enter a piece of glass at an angle, one part of wave will reach the class before another. A light will bend in one direction as it enter the glass at an angle. It bends again when it exits the glass because part of the light wave enter the air and speed up before other parts of the waves. In a standard converging, or convex lens, one or both sides of the glass curves out. This means rays of light passing through will bend toward the center of the lens on a entry. In a double convex lens, such as magnifying glass, the light will bend when it exits as well as when its enters.

  • Light bouncing off the object passes into the camera through a set of lens and onto the mirror. 
  • Light bounce up into a shape of glass called a pentaprism (five sides penta) 
  • Once light enter the pentaprism, it bounce around in a complicated way until it passes through the eyepiece and enter your eyes. 
  • When you press snap button on a camera, the mirror flips out of the way. Instead of bouncing into pentaprism, light from the object passes directly to the back of the camera. 
  • It hits photography film and starts a chemical reaction or else it impact an array of light-sensitivity cells that release a tiny electric charge in each activated cells. 
  • You successfully captured the object 

2) Camera vs Eye


source: Google image


The similarities between eye and camera can be explained in two points which is in term of image focusing and light adjustment. In term of image focusing, human and camera lenses both focus an inverted image onto light-sensitive surface. In the case of camera, it is focused onto film or a sensor chip while in human eye; the light sensitive surface is the retina on the inside of the eyeball. Beside, in term of light adjustment, both eye and camera can adjust the quantity of light entering. On a camera, it is done with the aperture control built into the lens, whilst in human eye; it is done by having a larger or smaller iris.
 
The differences between human eye and camera can be compared with absolute versus subjective measuring of light. Human eye can be said as subjective device as it can work in harmony with the brain to create the image that perceive. The eye can adjust the focus and translating the light into an electrical impulse which the brain can process. However, camera is an absolute measurement device where it will measure the light that hits a series of sensor, but the sensor is dumb, and the signal recorded need to be adjusted to suit the colour temperature of the light illuminating the scene.

Besides, the sensitivity of light between the human eye and camera are different. A film in camera is uniformly sensitive to light, but the human retina is not. Therefore, human eye have a greater sensitivity in dark locations than a typical camera. Unlike film and camera sensor, human eye do not have any define ISO level (the number signifying the light sensitivity of an imaging sensor). However, human eyes do have a great ability to naturally adjust to ambient light levels even under the most severe lighting condition. 

References:

http://www.yesmag.ca/how_work/camera.html

http://www.photo-seminars.com/BasicPhotography/lesson2.htm

http://www.howstuffworks.com/camera.htm

http://www.pixiq.com/article/eyes-vs-cameras