Spatial transformations

Slides:



Advertisements
Similar presentations
Digital Image Processing Exercise 1.
Advertisements

Image Processing Ch2: Digital image Fundamentals Part 2 Prepared by: Tahani Khatib.
Graphing Ordered Pairs
Image Display MATLAB functions for displaying image Bit Planes
Document Image Processing
Teaching assistant: Yimo Guo Digital Image Processing (Digitaalinen kuvankäsittely) Exercise 1.
Digital Image Processing Lecture 12: Image Topology
Image Topology ( Part 3 ) Dr. Bai-ling Zhang School of Computer Science & Mathematics Victoria University of Technology SCM3511 Image Processing 2, Week.
September 10, 2013Computer Vision Lecture 3: Binary Image Processing 1Thresholding Here, the right image is created from the left image by thresholding,
The Cartesian Coordinate System
3-D Computer Vision CSc – Ioannis Stamos 3-D Computer Vision CSc Binary Images Horn (Robot Vision): pages
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2005 Some slides from Steve Seitz
Digital Image Processing Chapter 2: Digital Image Fundamentals.
Objective of Computer Vision
Lecture 9: Image alignment CS4670: Computer Vision Noah Snavely
Objective of Computer Vision
Copyright © 2012 Elsevier Inc. All rights reserved.. Chapter 9 Binary Shape Analysis.
1 Parallel Algorithms IV Topics: image analysis algorithms.
E.G.M. PetrakisBinary Image Processing1 Binary Image Analysis Segmentation produces homogenous regions –each region has uniform gray-level –each region.
Scale-Invariant Feature Transform (SIFT) Jinxiang Chai.
1 Image Processing(IP) 1. Introduction 2. Digital Image Fundamentals 3. Image Enhancement in the spatial Domain 4. Image Enhancement in the Frequency Domain.
Chapter 3 Binary Image Analysis. Types of images ► Digital image = I[r][c] is discrete for I, r, and c.  B[r][c] = binary image - range of I is in {0,1}
Image Warping (Szeliski 3.6.1) cs129: Computational Photography James Hays, Brown, Fall 2012 Slides from Alexei Efros and Steve Seitz
Chapter 3: Image Restoration Geometric Transforms.
Imaging Geometry for the Pinhole Camera Outline: Motivation |The pinhole camera.
CS 6825: Binary Image Processing – binary blob metrics
Digital Image Fundamentals II 1.Image modeling and representations 2.Pixels and Pixel relations 3.Arithmetic operations of images 4.Image geometry operation.
September 23, 2014Computer Vision Lecture 5: Binary Image Processing 1 Binary Images Binary images are grayscale images with only two possible levels of.
Digital Image Processing Lecture 6: Image Geometry
Introduction Image geometry studies rotation, translation, scaling, distortion, etc. Image topology studies, e.g., (i) the number of occurrences.
Digital Image Fundamentals Faculty of Science Silpakorn University.
Spring 2012Meeting 2, 7:20PM-10PM1 Image Processing with Applications-CSCI567/MATH563 Lectures 3, 4, and 5: L3. Representing Digital Images; Zooming. Bilinear.
Image Warping and Morphing cs195g: Computational Photography James Hays, Brown, Spring 2010 © Alexey Tikhonov.
CSCE 643 Computer Vision: Extractions of Image Features Jinxiang Chai.
1 Regions and Binary Images Hao Jiang Computer Science Department Sept. 25, 2014.
CVPR2013 Poster Detecting and Naming Actors in Movies using Generative Appearance Models.
Prof. Amr Goneid Department of Computer Science & Engineering
1 Regions and Binary Images Hao Jiang Computer Science Department Sept. 24, 2009.
CS654: Digital Image Analysis Lecture 5: Pixels Relationships.
CS654: Digital Image Analysis Lecture 4: Basic relationship between Pixels.
Hough transform and geometric transform
Digital Topology CIS 601 Fall 2004 Longin Jan Latecki.
Nottingham Image Analysis School, 23 – 25 June NITS Image Segmentation Guoping Qiu School of Computer Science, University of Nottingham
© by Yu Hen Hu 1 ECE533 Digital Image Processing Image Geometry and Geometric Transformation.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
CS559: Computer Graphics Lecture 7: Image Warping and Morphing Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Course 3 Binary Image Binary Images have only two gray levels: “1” and “0”, i.e., black / white. —— save memory —— fast processing —— many features of.
Morphological Image Processing (Chapter 9) CSC 446 Lecturer: Nada ALZaben.
Relationship between pixels Neighbors of a pixel – 4-neighbors (N,S,W,E pixels) == N 4 (p). A pixel p at coordinates (x,y) has four horizontal and vertical.
Equations of Straight Line Graphs. Graphs parallel to the y -axis All graphs of the form x = c, where c is any number, will be parallel to the y -axis.
Image Warping 2D Geometric Transformations
Arithmetic and Geometric Transformations (Chapter 2) CS474/674 – Prof. Bebis.
Geometric Preprocessing
Image Sampling and Quantization
Proportionality using Graphs and Tables
图像处理技术讲座(3) Digital Image Processing (3) Basic Image Operations
Image Geometry and Geometric Transformation
Introduction to Coordinate Grid
Computer Vision Lecture 5: Binary Image Processing
CSCE 441: Computer Graphics Image Warping
T490 (IP): Tutorial 2 Chapter 2: Digital Image Fundamentals
Transformations Example Draw the line Draw 1 at , ,
Recap from Friday Image Completion Synthesis Order Graph Cut Scene Completion.
2.1 Graphs of equations.
Graphing Ordered Pairs
Binary Image processing بهمن 92
Proportionality using Graphs and Tables
x − 7 = 13 m − 9 = −13 m + 4 = −12 Ticket in the Door
Data hiding method using image interpolation
x − 7 = 13 m − 9 = −13 m + 4 = −12 Ticket in the Door
Presentation transcript:

Spatial transformations tiepoints f(w,z) g(x,y) distorted original

Affine transform MATLAB code: T=[2 0 0; 0 3 0; 0 0 1]; tform=maketform('affine', T); tform.tdata.T tform.tdata.Tinv WZ=[1 1; 3 2]; XY=tformfwd(WZ, tform); WZ2=tforminv(XY, tform);

Exercise#1 % generate a grid image [w, z]=meshgrid(linspace(0,100,10), linspace(0,100,10)); wz = [w(:) z(:)]; plot(w, z, 'b'), axis equal, axis ij hold on plot(w', z', 'b'); set(gca, 'XAxisLocation', 'top'); EX. Apply the following T to the grids, and plot all results T1 = [3 0 0; 0 2 0; 0 0 1]; T2 = [1 0 0; .2 1 0; 0 0 1]; T3 = [cos(pi/4) sin(pi/4) 0; -sin(pi/4) cos(pi/4) 0; 0 0 1];

Apply spatial transformations to images Inverse mapping then interpolation distorted original

Apply spatial transformations to images (cont.) MATLAB function Ex#2 g=imtransform(f, tform, interp); f=checkerboard(50); Apply T3 to f with ‘nearest’, ‘bilinear’, and ‘bicubic’ interpolation method. Zoom the resultant images to show the differences.

Tiepoints after original distortion restored distorted Nearest neighbor restored distorted Bilinear interp. restored distorted

original distorted (Using Previous Slide) restored Diff.

Image transformation using control points Ex#3, for original f and transformed g in Ex#2, using cpselect tool to select control points: cpselect(g, f); With input_points and base_points generated using cpselect, we do the following to reconstruct the original checkerboard. tform=cp2tform(input_points, base_points, 'projective'); gp=imtransform(g, tform);

Project#3: iris transformation Polar coordinate to Cartesian coordinate Check the reference paper

Image Topology

Motivation How many rice?

Outline Neighbors and adjacency Path, connected, and components Component labeling Lookup tables for neighborhood

Neighborhood and adjacency 4-neighbors 8-neighbors P Q P and Q are 4-adjacent Q P and Q are 8-adjacent P

Path, connected and components Q P and Q are 8-connected The above set of pixels are 8-connected. => 8-component Q P P and Q are 4-connected The above set of pixels are 4-connected. => 4-component

Component labeling Two 4-components. How to label them?

Component labeling algorithm Scan left to right, top to down. Start from top left foreground pixel. 2. Check its upper and left neighbors. Neighbor labeled => take the same label Neighbor not labeled => new label 1 2 1 3 4 3 5 4

Component labeling algorithm {1,2} and {3,4,5} are equivalent classes of labels, which are defined by adjacent relation. {1,2} => 1 {3,4,5} => 2 1 2 1 2 3 4 5

Ex#4: component labeling MATLAB code Threshold the rice.tiff image, then count the number of rice. Using 4- and 8-neighbors. Show the label image and the number of rice in the title. i=zeros(8,8); i(2:4,3:6)=1; i(5:7,2)=1; i(6:7,5:8)=1; i(8,4:5)=1; bwlabel(i,4) bwlabel(i,8)

Lookup tables for neighborhood For a 3x3 neighborhood, there are 29=512 possible For each possible neighborhood, give it a unique number(類似2進位編碼) 1 8 64 = 3 2 16 128 .X 4 32 256

Lookup tables for neighborhood (cont.) Performing any possible 3x3 neighborhood operation is equivalent to table lookup Input Output 1 2 1 … … 2 511

Ex#5: table lookup Find the boundary that are 4-connected in a binary image Ex#5: Find the 8-boundary of the rice image using lookup table f=inline('x(5) & ~(x(2)*x(4)*x(6)*x(8))'); lut=makelut(f,3); Iw=applylut(II, lut);

Ex#6: table lookup Build lookup tables for the following cases Show your result with the following matrix a=zeros(8,8); a(2,2)=1; a(4:8,4:8)=1; a(6,6)=0;