From Last Class Homogeneous Transformations Combines Rotation + Translation into one single matri multiplication Composition of Homogeneous Transformations Homogeneous Representation Representation of points & vectors Properties. Sum & differences of vectors are vectors. Sum of a vector and a point is a point 3. Difference between two points is a vector 4. Sum of two points == meaningless Homogeneous Transformations C From Last Class Robot Velocit Kinematics Forward vs. Inverse Kinematics Holonomic vs. Non-holonomic Constraints Differential Drive Triccle Ackerman Steering A B 3 4
Robot Velocit Kinematics Forward Kinematics: Non-Holonomic Constraints The robot can reach everwhere in the configuration space, BUT, it is under-actuated, and thus the velocit is constrained. Inverse Kinematics: Testing for Integrabilit of Constraints Given a constraint in the form of Wh Not? The test: Let Not Straightforward then, if constraint can be integrated 5 6 Mobile Robot Drives Differential Steering Co-aial wheels Independentl driven Two-dimensional Non-holonomicall constrained Differential Steering: Forward Kinematics Given the robot geometr and wheel speeds, what is the robot s velocit? Let: r wheel radius Robot Position l ale length right wheel speed left wheel speed We want 7 8
Differential Steering: Forward Kinematics (cont.) Given the robot geometr and wheel speeds, what is the robot s velocit? Let: r wheel radius Goal l ale length right wheel speed left wheel speed Differential Steering Instantaneous Center of Curvature ICC Forward Velocit Angular Velocit 9 World Coordinates Differential Steering: Inverse Kinematics 3
Differential Steering Benefits Simple construction Zero minimum turning radius Drawbacks Small error in wheel speeds translates to large position errors Requires two drive motors Wheels-first is dnamicall unstable Triccle: Forward Kinematics Steerable powered front wheel Free-spinning rear wheels r front wheel radius d wheelbase front wheel speed Forward Velocit Angular Velocit d 3 4 Triccle: Instantaneous Center of Curvature Triccle: Inverse Kinematics What wheel speed and angle are necessar to produce a desired robot velocit? d d 5 6 4
Triccle Mobile Robotics Benefits Does not require accurate speed matching Drawbacks Non-zero minimum turning radius More complicated powertrain OBSERVE ORIENT DECIDE & ACT Perception Localization Control 7 8 Sensing Light Pinhole Camera How do we see the world? sun Place a piece of film in front of an object, can we get a reasonable image? Let s add a barrier, w/ a *VERY* small opening. Purpose: To block off most of the light ras Reduces blurring The opening is known as aperture What happens to the image? 9 5
Pinhole Camera Home-made Pinhole Camera www.debevec.org/pinhole/ Pinhole Model: Captures pencil of ras all ras through a single point This point is called Center of Projection (COP) The image is formed on the Image Plane Effective focal length, f, is the distance from COP to the Image Plane Wh so blurr? Camera w/ Lense Anatom of a modern camera Sensor Arras Purpose for the lens: Ideal Pinhole Model is unattainable; light gathering mechanism Keep image in sharp focus CMOS sensor 3 4 6
Images are formed b the interaction of the incident image irradiance with light sensitive elements on the image plane Light sensitive elements Film Charge Coupled Device (CCD) CMOS imaging element Image Sensors Resolution Refers to the precision of the sensor in making measurements (different formal definitions eists) Normal Resolution of a CCD sensor size of the scene element that images to a single piel on the image plane Resolution of a digital image the dimension (in piels) of the digital image. Forsthe & Ponce 5 6 Digital Imaging Sstems CCD or CMOS imaging arra When light falls on the cells in these arras a charge accumulates which is proportional to the incident light energ A/D conversion unit Host Computer Digital Snapshots A digital image is an arra of numbers indicating the image irradiance at various points on the image Image intensities are spatiall sampled Intensit values are quantized (8-bits, -bits, -bits, etc) Video Imager For a video camera, Images are taken sequentiall b opening and close the shutter 3/sec (i.e. 3 frames/sec) 7 8 7
Tpes of Images Analog Image A(,) Digital Image I(r,c) Grascale Image monochrome digital image G(r,c) Picture Function Multi-spectral Image color digital image M(r,c) Picture Function Binar Image B(r,c) Picture Function Labeled Image L(r,c) Picture Function Sensing Color In a 3-CCD video camera the light path is split 3 was which are passed through colored light filters and then imaged As a result a color image contains three channels of information: red, green, and blue image intensities In a -CCD color camera color information is obtained b converting the individual elements with a spatiall varing pattern of filters, RGB Baer pattern used to capture color images on a single imaging surface 9 3 Practical Color Sensing: Baer Grid Images in a Computer An image is a -D table of numbers or D Matri http://en.wikipedia.org/wiki/baer_filter 3 3 8
Eample 33 34 35 36 9
A word of caution For this class, image processing in Matlab Matlab etremel powerful in terms of matri manipulation and signal processing Implementation in MatLab vs. in C/C++/Java NOT EQUAL!! 37 38 Dimensionalit Reduction Machine (3D => D) Funn things happen Parallel lines are not. Figures Steven E. Palmer, What have we lost? Angles Distances (lengths) Distances can t be trusted 39 4
FOV Depends on Focal Length Conversion from mm to piels In the digital camera, measurements are made in image piels. Need to convert the focal length (in mm) to piels. Tpical digital sensors are smaller than (35 mm) film, this effectivel increases the focal length Size of field of view governed b the size of the image plane: Smaller FOV = larger Focal Length 4 4 FOV Depends on Focal Length Field of View (Zoom) Size of field of view governed b the size of the image plane: Smaller FOV = larger Focal Length 43 44
FOV Depends on Focal Length Filed of View (Zoom) Size of field of view governed b the size of the image plane: Smaller FOV = larger Focal Length 45 46 FOV Depends on Focal Length Field of View/Focal Length Size of field of view governed b the size of the image plane: Large FOV, small f Camera closer to car Small FOV, large f Camera far from car Smaller FOV = larger Focal Length 47 48
Large Focal Length Compresses Depth 49 5 Image Projection Modeling (pinhole) projection Projection Equations The coordinate sstem Use the pinhole model as an approimation Put the optical center (COP) at origin Put image plane (Projection Plane, PP) in front of the COP Wh? The camera looks down the negative z-ais Required for right-handed coordinates Note: and are colinear Given then 5 5 3
Images in a Computer An image is a -D table of numbers or D Matri Binar Image Analsis Binar Image Image w/ onl and as entries Notation: B denotes the binar image B[r,c] denotes a piel in the image B[,] upper leftmost piel Neighborhoods 4 Neighborhood N NW N 8 Neighborhood W * E W * S SW S NE E SE How would ou convert an image into a Binar Image? 53 54 Appling Masks to Images Convolution of the Image w/ another Signal Masks have origins Smmetric masks origins are the center piels 4 55 56 4
Connected Components Labeling Segmentation Recursive Labeling Algorithm Let I denote the image. Step : Convert I to B, Step : Let B = - B, label = for i = :rows for j = :columns if B (i,j) == - label = label + ; Add (i,j) onto Stack and set B (i,j) = label; 8 7 6 5 4 3? 9? end end while (Stack is not empt) Remove piel P from Stack Let M = neighbors of P whose piel value = -; Add M onto Stack; Set B (M) = label; end 57 58 Algorithm Pictoriall Result - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (3,) (3,) (3,3) (,3) 59 6 5
Morphological Operators Structuring Elements (S) Morphological Operators Dilation: Minkowski addition BOX(3,5) DISK(5) RING(5) Basic Operators Translation X t of a set of piels b a position vector t is given b X t = {+t X} 6 6 Morphological Operators Morphological Operators Erosion: Opening: 63 64 6
Closing: Morphological Operators Region Properties Area Total # of piels in the region of interest Centroid Perimeter Circularit Mean Radial Distance Standard Deviation/Variance of Radial Distance Bounding Bo & Etremal Points Spatial Moments Ellipse Properties 65 66 Thresholding & Histograms Thresholding: Manual For grascale images G, in Matlab G > epsilon Automatic Otsu Method (See Shapiro & Stockman) Histograms use hist(values, binnumber) in Matlab 67 7