Presentation is loading. Please wait.

Presentation is loading. Please wait.

Asma Kanwal Lecturer Department of Computer Science, GC University, Lahore Dr. Wajahat Mahmood Qazi Assistant Professor Department of Computer Science,

Similar presentations


Presentation on theme: "Asma Kanwal Lecturer Department of Computer Science, GC University, Lahore Dr. Wajahat Mahmood Qazi Assistant Professor Department of Computer Science,"— Presentation transcript:

1 Asma Kanwal Lecturer Department of Computer Science, GC University, Lahore Dr. Wajahat Mahmood Qazi Assistant Professor Department of Computer Science, GC University, Lahore

2 Why study visual perception? Image processing algorithms are designed based on how our visual system works. In image compression, we need to know what information is not perceptually important and can be ignored. In image enhancement, we need to know what types of operations that are likely to improve an image visually. 2

3 The human visual system consists of two primary components – the eye and the brain, which are connected by the optic nerve. Eye – receiving sensor (camera, scanner). Brain – information processing unit (computer system). Optic nerve – connection cable (physical wire). 3

4 4

5 5

6 1. The lens contains 60-70% water, 6% of fat. 2. The iris diaphragm controls amount of light that enters the eye. 3. Light receptors in the retina - About 6-7 millions cones for bright light vision called photopic - Density of cones is about 150,000 elements/mm 2. - Cones involve in color vision. - Cones are concentrated in fovea about 1.5x1.5 mm 2. - About 75-150 millions rods for dim light vision called scotopic - Rods are sensitive to low level of light and are not involved color vision. Blind spot is the region of emergence of the optic nerve from the eye. 6

7 7

8 Focal length of the eye: 17 to 14 mm Let h be the height in mm of that object in the retinal image, then 15/100 = h / 17, h = 2.55mm The retinal image is reflected primarily in the area of the fovea. 8

9 The visible portion of the electromagnetic (EM) spectrum. It occurs between wavelengths of approximately 400 and 700 nanometers. 9

10 10

11 Light and the Electromagnetic Spectrum Three basic quantities described the quality of a chromatic light source: Radiance: the total amount energy that flow from the light source (can be measured) Luminance: the amount of energy an observer perceives from a light source (can be measured) Brightness: a subjective descriptor of light perception; perceived quantity of light emitted (cannot be measured) 11

12 Light and the Electromagnetic Spectrum Relationship between frequency ( ) and wavelength ( ), where c is the speed of light Energy of a photon, where h is Planck’s constant

13 Wave Length: The distance between peaks (high points) is called wavelength. Frequency: Frequency describes the number of waves that pass a fixed place in a given amount of time. Amplitude: Amplitude is the height of a wave.

14 Reflection: Refraction: Refraction of waves involves a change in the direction of waves as they pass from one medium to another. Diffraction: Diffraction involves a change in direction of waves as they pass through an opening or around a barrier in their path.

15 There are two parts to the image formation process: The geometry of image formation, which determines where in the image plane the projection of a point in the scene will be located. The physics of light, which determines the brightness of a point in the image plane as a function of illumination and surface properties. 15

16 The scene is illuminated by a single source. The scene reflects radiation towards the camera. The camera senses it via chemicals on film. 16

17 This is the simplest device to form an image of a 3D scene on a 2D surface. Straight rays of light pass through a “pinhole” and form an inverted image of the object on the image plane. 17

18 http://www.howcast.com/videos/387145-How- to-Transform-a-Room-into-a-Camera- Obscura 18

19 In practice, the aperture must be larger to admit more light. Lenses are placed to in the aperture to focus the bundle of rays from each scene point onto the corresponding point in the image plane 19

20 20

21 Optical parameters of the lens lens type focal length field of view Photometric parameters type, intensity, and direction of illumination reflectance properties of the viewed surfaces Geometric parameters type of projections position and orientation of camera in space perspective distortions introduced by the imaging process 21

22 Pixel Transformation 22

23 f(x,y) g(x,y) f(x,y) Point Processing Area/Mask Processing 23

24 Color Transformation 24

25 The purpose of a color model (also called Color Space or Color System) is to facilitate the specification of colors in some standard way A color model is a specification of a coordinate system and a subspace within that system where each color is represented by a single point Color Models RGB (Red, Green, Blue) CMY (Cyan, Magenta, Yellow) HSI (Hue, Saturation, Intensity) 25

26 Each color is represented in its primary color components Red, Green and Blue This model is based on Cartesian Coordinate System 26

27 27

28 28

29 Hue (dominant colour seen) Wavelength of the pure colour observed in the signal. Distinguishes red, yellow, green, etc. More the 400 hues can be seen by the human eye. Saturation (degree of dilution) Inverse of the quantity of “white” present in the signal. A pure colour has 100% saturation, the white and grey have 0% saturation. Distinguishes red from pink, marine blue from royal blue, etc. About 20 saturation levels are visible per hue. Intensity Distinguishes the gray levels. 29

30 Color transformation can be represented by the expression :: g(x,y)=T[f(x,y)] f(x,y): input image g(x,y): processed (output) image T[*]: an operator on f defined over neighborhood of (x,y). The pixel values here are triplets or quartets (i.e group of 3 or 4 values) 30

31 31

32 Geometric Transformation 32

33 Why don’t these image line up exactly? 33

34 ? Answer: Similarity transformation (translation, rotation, uniform scale) 34

35 ? 35

36 Very important for creating mosaics! 36

37 Transformation applied on the coordinates of the pixels (i.e., relocate pixels). A geometric transformation has the general form (x,y) = T{(v,w)} where (v,w) are the original pixel coordinates and (x,y) are the transformed pixel coordinates. 37

38 image filtering: change range of image g(x) = h(f(x)) image warping: change domain of image g(x) = f(h(x)) f x h g x f x h g x 38

39 image filtering: change range of image g(x) = h(f(x)) image warping: change domain of image g(x) = f(h(x)) hh f f g g 39

40 Examples of parametric warps: translation rotation aspect 40

41 Transformation T is a coordinate-changing machine: p’ = T(p) What does it mean that T is global? Is the same for any point p can be described by just a few numbers (parameters) Let’s consider linear xforms (can be represented by a 2D matrix): T p = (x,y)p’ = (x’,y’) 41

42 Linear transformations are combinations of … Scale, Rotation, Shear, and Mirror Properties of linear transformations: Origin maps to origin Lines map to lines Parallel lines remain parallel Ratios are preserved Closed under composition 42

43 Trick: add one more coordinate: homogeneous image coordinates Converting from homogeneous coordinates x y w (x, y, w) w = 1 (x/w, y/w, 1) homogeneous plane 43

44 Moves a point to a new location by adding translation amounts to the coordinates of the point. or 44

45 To translate an object, translate every point of the object by the same amount. 45

46 Changes the size of the object by multiplying the coordinates of the points by scaling factors. or 46

47 Uniform vs non-uniform scaling Effect of scale factors: 47

48 Rotates points by an angle θ about origin (θ >0: counterclockwise rotation) From ABP triangle: From ACP’ triangle: A BC 48

49 From the above equations we have: or 49

50 Add one more coordinate: (x,y)  (x h, y h, w) Recover (x,y) by homogenizing (x h, y h, w): So, x h =xw, y h =yw, (x, y)  (xw, yw, w) 50

51 (x, y) has multiple representations in homogeneous coordinates: w=1 (x,y)  (x,y,1) w=2 (x,y)  (2x,2y,2) All these points lie on a line in the space of homogeneous coordinates !! projective space 51

52 w=1 52

53 Successive translations: 53

54 w=1 54

55 Successive scalings: 55

56 w=1 56

57 Successive rotations: or 57

58 The transformation matrices of a series of transformations can be concatenated into a single transformation matrix. * Translate P 1 to origin * Perform scaling and rotation * Translate to P 2 Example: 58

59 Important: preserve the order of transformations! translation + rotation rotation + translation 59

60 Shearing along x-axis: Shearing along y-axis changes object shape! 60

61 any transformation with last row [ 0 0 1 ] we call an affine transformation 61

62 Translate 2D in-plane rotationShear Scale 62

63 Under certain assumptions, affine transformations can be used to approximate the effects of perspective projection! G. Bebis, M. Georgiopoulos, N. da Vitoria Lobo, and M. Shah, " Recognition by learning affine transformations", Pattern Recognition, Vol. 32, No. 10, pp. 1783-1799, 1999. affine transformed object 63

64 Affine transformations are combinations of … Linear transformations, and Translations Properties of affine transformations: Origin does not necessarily map to origin Lines map to lines Parallel lines remain parallel Ratios are preserved Closed under composition 64

65 Called a homography (or planar perspective map) 65

66 Projective transformations … Affine transformations, and Projective warps Properties of projective transformations: Origin does not necessarily map to origin Lines map to lines Parallel lines do not necessarily remain parallel Ratios are not preserved Closed under composition 66

67 These transformations are a nested set of groups Closed under composition and inverse is a member 67

68 Right-handed / left-handed systems 68

69 Positive rotation angles for right-handed systems: (counter-clockwise rotations) 69

70 Add one more coordinate: (x,y,z)  (x h, y h, z h,w) Recover (x,y,z) by homogenizing (x h, y h, z h,w): In general, x h =xw, y h =yw, z h =zw (x, y,z)  (xw, yw, zw, w) Each point (x, y, z) corresponds to a line in the 4D-space of homogeneous coordinates. 70

71 71

72 72

73 Rotation about the z-axis: 73

74 Rotation about the x-axis: 74

75 Rotation about the y-axis 75


Download ppt "Asma Kanwal Lecturer Department of Computer Science, GC University, Lahore Dr. Wajahat Mahmood Qazi Assistant Professor Department of Computer Science,"

Similar presentations


Ads by Google