270 likes | 465 Views
Image Processing Lecture 2. Gaurav Gupta Shobhit Niranjan. Today. Image Formation (More Details) Camera Models Perspective Geometry Color Models. Human Visual System (HVS): The Eye. Image is formed on retina Photoreceptors (rods and cones) are stimulated and generate visual signal
E N D
Image Processing Lecture 2 Gaurav Gupta Shobhit Niranjan
Today • Image Formation (More Details) • Camera Models • Perspective Geometry • Color Models
Human Visual System (HVS): The Eye • Image is formed on retina • Photoreceptors (rods and cones) are stimulated and generate visual signal • Received and processed by brain (Cortex)
Pin Hole Camera Model • Light enters through small hole. • Image plane is placed between focal point and object (to have “non-inverted” projection)
Perspective Geometry • Mapping from R3->R2 • Convention image coordinate (u,v), object coordinate (x,y,z) u = (f/z)x ; v = (f/z)y f = focal length (by geometry) The linear version is ( S = scale factor)
Contd.. • Concept of Vanishing Line, Point and Horizon is important for Reconstruction from 2D image to 3D information • Vanishing point : The point where parallel lines at particular direction meet . • Two sets of parallel lines in different directions will give two vanishing points. • Two vanishing points form a vanishing line for the collection of parallel planes defined by these two sets of parallel lines.
The Horizon • Vanishing Line for ground plane • Anything below it will be below horizon and above it will be above horizon • Different heights of viewer ?? What would be affect on the horizon?
Interpretation of Calibration matrix • It gives you location of the vanishing point. • The homogeneous coordinate (x,y,0) is the ideal point or point at infinity in the direction of (x,y). (how??) (guess how to represent point at infinity in x direction), where will this appear in Image
Camera Calibration • Why? To find how the object coordinated are projected in image plane • Parameters: Intrinsic & Extrinsic • Model
contd.. From the figure, hence, In other words, => In some cases focal lengths can be different in x and y direction fu , fv f, uo,vo are intrinsic parameters
Extrinsic Parameters • In general, the three dimensional world coordinates of a point will not be specfied in a frame whose origin is at the centre of projection • So we can transform by a linear transformation ( Rotation and Scale) Where T is 4x4 transformation matrix, R pure rotation (rigid body), t is the rigid body translation
Color Models • Three independent quantities are used to describe any particular color. (HVS) • Achromatic light has no color - its only attribute is quantity or intensity. Greylevel is a measure of intensity. • On the other hand, brightness or luminance is determined by the perception of the color • Color depends primarily on the reflectance properties of an object.
contd… • The tristimulus theory of color perception seems to imply that any color can be obtained from a mix of the three primaries, red, green and blue • Color models provide a standard way to specify a particular color and specifies a 3D coordinate system or subspace • Any color that can be specified using a model will correspond to a single point within the subspace it defines
CMY Model • RGB model asks what is added to black to get a particular color, the CMY (cyan-magenta-yellow) model asks what is subtracted from white. • Appropriate to absorption of colors, used in printing devices and filters
HSI Model • The hue is determined by the dominant wavelength • The saturation is determined by the excitation purity, and depends on the amount of white light mixed with the hue • the intensity is determined by the actual amount of light
YIQ • YIQ (luminance-inphase-quadrature) is Recoding of RGB for color television
Some points to think about.. • what is the best way to apply the image processing techniques color images ? • Which color space to choose ? • If we want to increase the contrast in a dark image by histogram equalization, can we just equalize each color independently?
Some quick facts • Normally Image is array of RGB values of pixels in BGR order • N-bit , m channel Image => It has m color spaces having N bit quantized data per color space per pixel (Ex. 8 bit RGB Image) • Very Simple data structure is Bitmap Format and Raw • JPEG widely used to store/capture images but it is compressed form
Home Work • Install OpenCV (Intel Open Source Lib) http://sourceforge.net/projects/opencvlibrary • Check its documentation and see how image is described by IplImage data structure http://www.cs.bham.ac.uk/resources/courses/robotics/doc/opencvdocs/ • Try to write and run sample programs given in OpenCV tutorial and see for different images loss in JPEG format I will mail you.