Image Processing 고려대학교 컴퓨터 그래픽스 연구실 kucg.korea.ac.kr.

Slides:



Advertisements
Similar presentations
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 4: Image Processing 1 Ravi Ramamoorthi
Advertisements

Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 4 Ravi Ramamoorthi
Warping and Morphing.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi Some slides.
Sampling, Aliasing, & Mipmaps
Image Filtering CS485/685 Computer Vision Prof. George Bebis.
CS248 Midterm Review. CS248 Midterm Mon, November 4, 7-9 pm, Terman Aud Mostly “short answer” questions – Keep your answers short and sweet! Covers lectures.
Digital Cameras CCD (Monochrome) RGB Color Filter Array.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 5: Image Processing 2: Warping Ravi Ramamoorthi
CS248 Midterm Review. CS248 Midterm Mon, November 3, 7-9 pm, Gates B01 Mostly “short answer” questions – Keep your answers short and sweet! Covers lectures.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 5: Image Processing 2: Warping Ravi Ramamoorthi
Lecture 1: Images and image filtering
IMAGE 1 An image is a two dimensional Function f(x,y) where x and y are spatial coordinates And f at any x,y is related to the brightness at that point.
© Chun-Fa Chang Sampling Theorem & Antialiasing. © Chun-Fa Chang Motivations “ My ray traced images have a lot more pixels than the TV screen. Why do.
Image Processing 고려대학교 컴퓨터 그래픽스 연구실 cgvr.korea.ac.kr.
What is an image? f(x,y):2 
Image Formation. Input - Digital Images Intensity Images – encoding of light intensity Range Images – encoding of shape and distance They are both a 2-D.
Geometric transformations Affine transformations Forward mapping Interpolations schemes.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
The Digital Image Dr. John Ryan.
Image Preprocessing: Geometric Correction Image Preprocessing: Geometric Correction Jensen, 2003 John R. Jensen Department of Geography University of South.
Filtering Robert Lin April 29, Outline Why filter? Filtering for Graphics Sampling and Reconstruction Convolution The Fourier Transform Overview.
Image Processing and Sampling
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
Geometric transformations Affine transformations Forward mapping Interpolations schemes.
Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.
GEOMETRIC OPERATIONS. Transformations and directions Affine (linear) transformations Translation, rotation and scaling Non linear (Warping transformations)
DIGITAL IMAGE. Basic Image Concepts An image is a spatial representation of an object An image can be thought of as a function with resulting values of.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae, VUW Images and 2D Graphics COMP # 17.
Image Processing 고려대학교 컴퓨터 그래픽스 연구실 cgvr.korea.ac.kr.
Visual Computing Computer Vision 2 INFO410 & INFO350 S2 2015
Image 2013, Fall. Image Processing Quantization  Uniform Quantization  Halftoning & Dithering Pixel Operation  Add random noise  Add luminance  Add.
Krivljenje slike - warping. Princip 2D krivljenja Demo.
Instructor: Mircea Nicolescu Lecture 5 CS 485 / 685 Computer Vision.
CS559: Computer Graphics Lecture 7: Image Warping and Panorama Li Zhang Spring 2008 Most slides borrowed from Yungyu ChuangYungyu Chuang.
CS559: Computer Graphics Lecture 7: Image Warping and Morphing Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Lecture 1: Images and image filtering CS4670/5670: Intro to Computer Vision Noah Snavely Hybrid Images, Oliva et al.,
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae & david streader, VUW Images and 2D Graphics COMP.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter.
Antialiasing. What is alias? Alias - A false signal in telecommunication links from beats between signal frequency and sampling frequency (from dictionary.com)
Krivljenje slike - warping
Images and 2D Graphics COMP
Computer Graphics Overview
Image Processing Objectives To understand pixel based image processing
Advanced Computer Graphics
CSE 455 HW 1 Notes.
Images, Display, Perception
Image Processing and Sampling
Image 2016, Fall.
Advanced Computer Graphics
Digital 2D Image Basic Masaki Hayashi
Sampling Theorem & Antialiasing
Digital Image Processing
Computer Vision Lecture 4: Color
Image Processing - in short
Histogram Histogram is a graph that shows frequency of anything. Histograms usually have bars that represent frequency of occuring of data. Histogram has.
CSCE 441: Computer Graphics Image Warping
EE/CSE 576 HW 1 Notes.
Image Processing Today’s readings For Monday
2D transformations (a.k.a. warping)
EE/CSE 576 HW 1 Notes.
Morphing WU PO-HUNG.
Edge Detection in Computer Vision
Filtering Images Work in the spatial domain
Lecture 2: Image filtering
Image Processing 고려대학교 컴퓨터 그래픽스 연구실 kucg.korea.ac.kr.
ECE/CSE 576 HW 1 Notes.
Graphics Laboratory Korea University
Computer Graphics: Image Warping/Morphing
DIGITAL IMAGE PROCESSING Elective 3 (5th Sem.)
Presentation transcript:

Image Processing 고려대학교 컴퓨터 그래픽스 연구실 kucg.korea.ac.kr

Overview Image Representation Sampling and Reconstruction What is an image? Sampling and Reconstruction Key steps in image processing kucg.korea.ac.kr

What is an Image? An image is a 2D rectilinear array of pixels Continuous image Digital image kucg.korea.ac.kr

What is an Image? An image is a 2D rectilinear array of pixels Continuous image Digital image kucg.korea.ac.kr

A pixel is a sample, not a little square!! What is an Image? An image is a 2D rectilinear array of pixels Continuous image Digital image A pixel is a sample, not a little square!! kucg.korea.ac.kr

Image Acquisition Pixels are samples from continuous function Photoreceptors in eye CCD cells in digital camera Rays in virtual camera kucg.korea.ac.kr

Quantization Artifact due to limited intensity resolution Frame buffers have limited number of bits per pixel Physical devices have limited dynamic range 255 150 75 255 150 75 255 150 75 Blue channel Green channel Red channel kucg.korea.ac.kr

Image Display Re-create continuous function from samples Example: cathode ray tube Image is reconstructed by displaying pixels with finite area (Gaussian) kucg.korea.ac.kr

Image Resolution Intensity resolution Spatial resolution Each pixel has only “Depth” bits for colors/intensities Spatial resolution Image has only “Width” x “Height” pixels Temporal resolution Monitor refreshes images at only “Rate” Hz kucg.korea.ac.kr

Overview Image Representation Sampling and Reconstruction What is an image? Sampling and Reconstruction Key steps in image processing kucg.korea.ac.kr

Sampling and Reconstruction kucg.korea.ac.kr

Sampling and Reconstruction kucg.korea.ac.kr

Image Processing Pixel operations Filtering Warping Add luminance Blur Add contrast Filtering Blur Detect edge Warping Scale Rotate Warps kucg.korea.ac.kr

Adjusting Brightness Simply scale pixel components Must clamp to range (e.g., 0 to 255) Original Brighter kucg.korea.ac.kr

Adjusting Contrast Compute mean luminance L for all pixels Luminance = 0.30*r + 0.59*g + 0.11*b Scale deviation from L for each pixel component Must clamp to range (e.g. 0 to 255) L Original More contrast kucg.korea.ac.kr

Image Processing Pixel operations Filtering Warping Add luminance Blur Add contrast Filtering Blur Detect edge Warping Scale Rotate Warps kucg.korea.ac.kr

Adjusting Blurriness Convolve with a filter whose entries sum to one Each pixel becomes a weighted average of its neighbors Original Blur kucg.korea.ac.kr

Edge Detection Convolve with a filter that finds differences between neighbor pixels Original Edge Detection kucg.korea.ac.kr

Image Processing Pixel operations Filtering Warping Add luminance Blur Add contrast Filtering Blur Detect edge Warping Scale Rotate Warps kucg.korea.ac.kr

Image Warping Move pixels of image Mapping Resampling Warp Source Image Destination Image kucg.korea.ac.kr

Overview Mapping Resampling Forward Reverse Point sampling Triangle filter Gaussian filter kucg.korea.ac.kr

Mapping Define transformation Describe the destination (x, y) for every location (u, v) in the source (or vice-versa, if invertible) v y u x kucg.korea.ac.kr

Example Mappings Scale by factor : x = factor * u y = factor * v v y 0.8 u x kucg.korea.ac.kr

Example Mappings Rotate by θ degrees: x = u cos θ – v sin θ y = u sin θ + v cos θ x y v Rotate 30 u kucg.korea.ac.kr

Example Mappings Shear in X by factor : Shear in Y by factor : x = u + factor * v y = v Shear in Y by factor : x = u y = v + factor * u u v x y Shear X 1.3 u v x y Shear Y 1.3 kucg.korea.ac.kr

Other Mappings Any function of u and v : x = fx(u, v) y = fy(u, v) Fish-eye Swirl Rain kucg.korea.ac.kr

Image Warping Implementation I Forward mapping : for(int u=0; u<umax; u++) { for(int v=0; v<vmax; v++) { float x = fx(u,v); float y = fy(u,v); dst(x,y) = src(u,v); } (u, v) f (x, y) Source Image Destination Image kucg.korea.ac.kr

Forwarding Mapping Iterate over source image y v Rotate -30 u x kucg.korea.ac.kr

Forwarding Mapping – NOT Iterate over source image Many source pixels can map to same destination pixel x y u v Rotate -30 kucg.korea.ac.kr

Forwarding Mapping – NOT Iterate over source image Some destination pixels may not be covered Many source pixels can map to same destination pixel x y u v Rotate -30 kucg.korea.ac.kr

Image Warping Implementation II Reverse mapping for(int x=0; x<xmax; x++) { for(int y=0; y<ymax; y++) { float u = fx-1(x,y); float v = fy-1(x,y); dst(x,y) = src(u,v); } (u, v) f (x, y) Source Image Destination Image kucg.korea.ac.kr

Reverse Mapping Iterate over destination image Must resample source May oversample, but much simpler! x y u v Rotate -30 kucg.korea.ac.kr

(u, v) does not usually have integer coordinates Resampling Evaluate source image at arbitrary (u, v) (u, v) does not usually have integer coordinates (u, v) (x, y) Source Image Destination Image kucg.korea.ac.kr

Overview Mapping Resampling Forward Reverse Point sampling Triangle filter Gaussian filter kucg.korea.ac.kr

This method is simple, but it causes aliasing Point Sampling Take value at closest pixel int iu = trunc(u+0.5); int iv = trunc(v+0.5); dst(x, y) = src(iu, iv); This method is simple, but it causes aliasing x y u v Rotate -30 Scale 0.5 kucg.korea.ac.kr

Triangle Filtering Convolve with triangle filter Input Output kucg.korea.ac.kr

Triangle Filtering Bilinearly interpolate four closest pixels a = linear interpolation of src(u1, v2) and src(u2, v2) b = linear interpolation of src(u1, v1) and src(u2, v1) dst(x, y) = linear interpolation of “a” and “b” a (u1, v2) (u2, v2) (u, v) (u1, v1) (u2, v1) b kucg.korea.ac.kr

Width of Gaussian kernel affects bluriness Gaussian Filtering Convolve with Gaussian filter Input Output Width of Gaussian kernel affects bluriness kucg.korea.ac.kr

Gaussian Filtering Compute weighted sum of pixel neighborhood : Weights are normalized values of Gaussian function (u, v) kucg.korea.ac.kr

Filtering Methods Comparison Trade-offs Aliasing versus blurring Computation speed Point Bilinear Gaussian kucg.korea.ac.kr

Image Warping Implementation III Reverse mapping for(int x=0; x<xmax; x++) { for(int y=0; y<ymax; y++) { float u = fx-1(x,y); float v = fy-1(x,y); dst(x,y) = resample_src(u,v,w); } (u, v) f (x, y) Source Image Destination Image kucg.korea.ac.kr

Image Warping Implementation III Reverse mapping for(int x=0; x<xmax; x++) { for(int y=0; y<ymax; y++) { float u = fx-1(x,y); float v = fy-1(x,y); dst(x,y) = resample_src(u,v,w); } (u, v) f (x, y) w Source Image Destination Image kucg.korea.ac.kr

Example: Scale Scale (src, dst, sx, sy) : float w ≈ max(1/sx, 1/sy) for(int x=0; x<xmax; x++) { for(int y=0; y<ymax; y++) { float u = x/sx ; float v = y/sy; dst(x,y) = resample_src(u,v,w); } v y (u, v) Scale 0.5 (x, y) u x kucg.korea.ac.kr

Example: Rotate Rotate (src, dst, theta) for(int x=0; x<xmax; x++) { for(int y=0; y<ymax; y++) { float u = x*cos(-θ)-y*sin(-θ) float v = x*sin(-θ)+y*cos(-θ) dst(x,y) = resample_src(u,v,w); } x y v (u, v) (x, y) Rotate 30 u kucg.korea.ac.kr

Example: Fun Swirl (src, dst, theta) for(int x=0; x<xmax; x++) { for(int y=0; y<ymax; y++) { float u = rot(dist(x,xcenter)*θ) float v = rot(dist(y,ycenter)*θ) dst(x,y) = resample_src(u,v,w); } v (u, v) y (x, y) Swirl 45 u x kucg.korea.ac.kr