Geometric and Point Transforms

Slides:



Advertisements
Similar presentations
Linear Filtering – Part I Selim Aksoy Department of Computer Engineering Bilkent University
Advertisements

Spatial Filtering (Chapter 3)
Topic 6 - Image Filtering - I DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Image Processing Lecture 4
Spatial Filtering.
Image Filtering. Outline Outline Concept of image filter  Focus on spatial image filter Various types of image filter  Smoothing, noise reductions 
Chapter 3 Image Enhancement in the Spatial Domain.
Lecture 6 Sharpening Filters
EDGE DETECTION ARCHANA IYER AADHAR AUTHENTICATION.
Sliding Window Filters and Edge Detection Longin Jan Latecki Computer Graphics and Image Processing CIS 601 – Fall 2004.
EE 4780 Image Enhancement. Bahadir K. Gunturk2 Image Enhancement The objective of image enhancement is to process an image so that the result is more.
Digital Image Processing
Chapter 3: Image Enhancement in the Spatial Domain
6/9/2015Digital Image Processing1. 2 Example Histogram.
Image Filtering CS485/685 Computer Vision Prof. George Bebis.
Digital Image Processing
MSU CSE 803 Stockman Linear Operations Using Masks Masks are patterns used to define the weights used in averaging the neighbors of a pixel to compute.
1 Image Filtering Readings: Ch 5: 5.4, 5.5, 5.6,5.7.3, 5.8 (This lecture does not follow the book.) Images by Pawan SinhaPawan Sinha formal terminology.
MSU CSE 803 Linear Operations Using Masks Masks are patterns used to define the weights used in averaging the neighbors of a pixel to compute some result.
ECE 472/572 - Digital Image Processing Lecture 4 - Image Enhancement - Spatial Filter 09/06/11.
Chapter 3 (cont).  In this section several basic concepts are introduced underlying the use of spatial filters for image processing.  Mainly spatial.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Chapter 10: Image Segmentation
Presentation Image Filters
Spring 2012Meetings 5 and 6, 7:20PM-10PM Image Processing with Applications-CSCI567/MATH563/MATH489 Lectures 8, 9, 10,11: Spatial Filtering 8. Linear Filters,
Spatial Filtering: Basics
Basis beeldverwerking (8D040) dr. Andrea Fuster Prof.dr. Bart ter Haar Romeny dr. Anna Vilanova Prof.dr.ir. Marcel Breeuwer Convolution.
University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Image processing.
Introduction to Image Processing Grass Sky Tree ? ? Sharpening Spatial Filters.
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
Introduction to Image Processing
Chapter 10, Part I.  Segmentation subdivides an image into its constituent regions or objects.  Image segmentation methods are generally based on two.
Image Subtraction Mask mode radiography h(x,y) is the mask.
COMP322/S2000/L171 Robot Vision System Major Phases in Robot Vision Systems: A. Data (image) acquisition –Illumination, i.e. lighting consideration –Lenses,
CSC508 Convolution Operators. CSC508 Convolution Arguably the most fundamental operation of computer vision It’s a neighborhood operator –Similar to the.
CSE 6367 Computer Vision Image Operations and Filtering “You cannot teach a man anything, you can only help him find it within himself.” ― Galileo GalileiGalileo.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
Instructor: Mircea Nicolescu Lecture 7
EE 7730 Image Enhancement. Bahadir K. Gunturk2 Image Enhancement The objective of image enhancement is to process an image so that the result is more.
Digital Image Processing Week V Thurdsak LEAUHATONG.
Digital Image Processing CSC331
Lecture Seven Figures from Gonzales and Woods, Digital Image Processing, Copyright 2002.
Sliding Window Filters Longin Jan Latecki October 9, 2002.
1 Edge Operators a kind of filtering that leads to useful features.
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Image Enhancement in the Spatial Domain.
Medical Image Analysis
Miguel Tavares Coimbra
Image Subtraction Mask mode radiography h(x,y) is the mask.
Chapter 10 Image Segmentation
Basis beeldverwerking (8D040) dr. Andrea Fuster dr. Anna Vilanova Prof
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Linear Filters and Edges Chapters 7 and 8
IMAGE ENHANCEMENT TECHNIQUES
ECE 692 – Advanced Topics in Computer Vision
Digital Image Processing
Image Processing - in short
CIS 350 – 3 Image ENHANCEMENT SPATIAL DOMAIN
Image Enhancement in the Spatial Domain
Lecture 3 (2.5.07) Image Enhancement in Spatial Domain
9th Lecture - Image Filters
a kind of filtering that leads to useful features
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
a kind of filtering that leads to useful features
Linear Operations Using Masks
Enhancement.
Image Enhancement To process an image so that the result is more suitable than the original image for a specific application. Spatial domain methods and.
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Image Filtering with GLSL
Image Enhancement in the Spatial Domain
Presentation transcript:

Geometric and Point Transforms

Copyright GA Tagliarini, PhD Standard Angles Rotation or reflection through standard angles such as 90°, 180°, or 270° can be done most conveniently via direct index. Intermediate angle rotations employ matrix manipulations of the indices 11/30/2018 Copyright GA Tagliarini, PhD

Rotation By Matrix Multiplication 11/30/2018 Copyright GA Tagliarini, PhD

Rotating The Standard Basis 11/30/2018 Copyright GA Tagliarini, PhD

Graphically Portraying The Standard Basis Rotation <0, 1> <-sin(θ), cos(θ)> -sin(θ) <cos(θ), sin(θ)> cos(θ) θ sin(θ) θ <1, 0> cos(θ) 11/30/2018 Copyright GA Tagliarini, PhD

Rotating An Arbitrary Point <x, y> 11/30/2018 Copyright GA Tagliarini, PhD

Geometrically Interpreting Rotation <xcos(θ)-ysin(θ), xsin(θ)+ycos(θ)> = <rcos(α+θ), rsin(α+θ)> Why?? <0, 1> r y or y<0, 1> <x, y> = <r cos(α), r sin(α)> r θ α x or x<1, 0> <1, 0> 11/30/2018 Copyright GA Tagliarini, PhD

Observations About Rotation Depending upon the rotation angle and image dimension, special processing may be required for some pixels Matrix multiplication applied to pixel indices provides access to pixel values for the destination image Working from the source to the destination may omit pixels 11/30/2018 Copyright GA Tagliarini, PhD

Copyright GA Tagliarini, PhD Spatial Filtering Common types of filtering Smoothing: averaging may be done Over multiple images to de-noise the source To reduce noise or soften the appearance in a single image Speckle reducing Edge enhancing Often implemented by point operations using neighborhood data and a filter Filters are commonly represented with rectangular arrays of numbers The numeric values are the coefficients of the filter The arrays may be referred to as masks, kernels, templates, windows 11/30/2018 Copyright GA Tagliarini, PhD

Smoothing Filter: Averaging In An Image 11/30/2018 Copyright GA Tagliarini, PhD

Geometrical Interpretation 11/30/2018 Geometrical Interpretation s a b c d e f g h i 1/9 r c 11/30/2018 Copyright GA Tagliarini, PhD Copyright GA Tagliarini, PhD

Averaging Observations Average filtering will reduce the clarity of sharp edges. (Why?) The form of the filter is typically adapted at the boundaries of the image to accommodate computation. This 3x3 filter becomes: 2x2 at the image corners (with coefficients = ¼) 2x3 along the top and bottom, and 3x2 along the left and right sides (with coefficients = 1/6) 11/30/2018 Copyright GA Tagliarini, PhD

Averaging Observations (continued) Averaging (and other) filters are commonly square with odd side length (so that they possess a center weight). The center weight may be zero. The weights are not required all to have the same value. The sum of the weights will be 1. Not all filters will be symmetric. 11/30/2018 Copyright GA Tagliarini, PhD

Example Averaging Filters Some other averaging filters: 1/8 1 = 1 2 3 7 11 17 1/16 2/16 4/16 1 2 4 = 11/30/2018 Copyright GA Tagliarini, PhD

Speckle Reduction By Median Filtering Median filters are another type of spatial filter. Suppose a neighborhood of odd side length, sl = 2m+1 for pixel (r, c) in an image s, denoted N(s, r, c, sl). To apply a median filter: Find the median intensity, mi, of the pixels in N(s, r, c, m); i.e., mi = median( N(s, r, c, sl)) Set d(r, c) = mi 11/30/2018 Copyright GA Tagliarini, PhD

Copyright GA Tagliarini, PhD Median Filtering The median can be found by sorting the pixel intensities in N(s, r, c, sl) It is NOT necessary to sort the list of pixel intensities completely. (Why?) Exercises Implement monochrome and multi-spectral median filters. What happens when a median filter is applied recursively? How does this differ from the result of recursively applying a smoothing filter? 11/30/2018 Copyright GA Tagliarini, PhD

Copyright GA Tagliarini, PhD Contrast Enhancement Polynomial or root transformations Log transformations Histogram equalization 11/30/2018 Copyright GA Tagliarini, PhD

Polynomial And Root Transforms 11/30/2018 Copyright GA Tagliarini, PhD

Copyright GA Tagliarini, PhD Log Transforms 11/30/2018 Copyright GA Tagliarini, PhD

Key Insight: Changing Contrast f(x) When f’>1, a unit change in x results more than a unit change in y When f’<1, a unit change in x results less than a unit change in y When f’≈1, a unit change in x results approximately a unit change in y y f’<1 f’≈1 x f’>1 11/30/2018 Copyright GA Tagliarini, PhD

An Typical Image Histogram 11/30/2018 Copyright GA Tagliarini, PhD

Overlaying The Histograms 11/30/2018 Copyright GA Tagliarini, PhD

Copyright GA Tagliarini, PhD Cumulative Histogram Similar to a probability density function Increases contrast where the most frequently occurring pixel intensities lie Used for monochrome images but separate application to RGB color planes leads to surreal images 11/30/2018 Copyright GA Tagliarini, PhD

Copyright GA Tagliarini, PhD Sharpening Unlike smoothing filters, the goal is to enhance detail that has been blurred Averaging filters typically use a scaled weighted sum (an integration) Sharpening filters commonly employ differences (derivatives) 11/30/2018 Copyright GA Tagliarini, PhD

Copyright GA Tagliarini, PhD Derivatives Recall that the derivative of a function f at a point a may be defined as when the limit exists. 11/30/2018 Copyright GA Tagliarini, PhD

Copyright GA Tagliarini, PhD Graphically a x f(x)-f(a) x-a 11/30/2018 Copyright GA Tagliarini, PhD

Copyright GA Tagliarini, PhD With Digital Samples The closest approximation is when x=a+1 So x-a=1 Hence f(a+1)-f(a) is an estimate of f’(a) a x f(x)-f(a) x-a 11/30/2018 Copyright GA Tagliarini, PhD

One Dimensional Derivative … f(x) f(x+1) 11/30/2018 Copyright GA Tagliarini, PhD

One Dimensional Second Derivative … f(x-1) f(x) f(x+1) 11/30/2018 Copyright GA Tagliarini, PhD

Laplacian 1 -4 Which gives rise to the mask 11/30/2018 1 -4 Which gives rise to the mask 11/30/2018 Copyright GA Tagliarini, PhD

Enhancement Using The Laplacian 11/30/2018 Copyright GA Tagliarini, PhD

A One-Dimensional Example 11/30/2018 Copyright GA Tagliarini, PhD

Copyright GA Tagliarini, PhD Example Detail f 50 45 40 35 30 25 20 60 100 140 180 220 120 200 f'   -5 -100 -180 f'' 5 -140 -360 f# 15 260 -80 380 -160 scaled f# [20, 220] 98 94 92 90 89 87 85 116 131 146 161 176 clipped f# clipped 0-255 f# 255 11/30/2018 Copyright GA Tagliarini, PhD

Alternative Laplacian Masks Implementing the computational simplification use: To employ diagonal derivatives in addition to x-y use -1 5 -1 9 11/30/2018 Copyright GA Tagliarini, PhD

Example With f, f’, f’’, and Sharpened f 11/30/2018 Copyright GA Tagliarini, PhD

Example With Sharpening 11/30/2018 Copyright GA Tagliarini, PhD

Gradient Operators For Enhancement Robert’s cross-gradient (2x2) Prewitt’s gradient (3x3) Sobel operator (3x3) These use the magnitude of a gradient estimate to create image enhancements 11/30/2018 Copyright GA Tagliarini, PhD

Copyright GA Tagliarini, PhD Gradient 11/30/2018 Copyright GA Tagliarini, PhD

Creating And Using Gradient Estimates Often, the sum of the absolute values of Gx and Gy are used Computationally, |Gx| and |Gy| take much less time to compute than squaring and finding a square root of a sum. Hence, the gradient magnitude may be estimated by 11/30/2018 Copyright GA Tagliarini, PhD

Using Gradient Operators Estimate the gradient magnitudes and create a gradient magnitude map. Often the gradient map is half-toned using an anecdotally determined threshold. The gradient map may be used directly to find edges. The half-toned map (or its negative) can be “OR-ed” with the original for interpretation. 11/30/2018 Copyright GA Tagliarini, PhD

Robert’s Cross-Gradient Operators Robert’s cross-gradient is estimated using |grad(f)| = |z9-z5|+|z8-z6| Using the masks below to estimate derivatives: z1 z2 z3 z4 z5 z6 z7 z8 z9 -1 1 -1 1 11/30/2018 Copyright GA Tagliarini, PhD

Copyright GA Tagliarini, PhD Robert’s Gradient Map 11/30/2018 Copyright GA Tagliarini, PhD

Copyright GA Tagliarini, PhD Prewitt’s Gradient Estimate Prewitt’s gradient using: |grad(f)| = |(z3+z6+z9)-(z1+z4+z7)|+ |(z7+z8+z9)-(z1+z2+z3)| Use the masks below: z1 z2 z3 z4 z5 z6 z7 z8 z9 -1 1 -1 1 11/30/2018 Copyright GA Tagliarini, PhD

Prewitt’s Gradient Map 11/30/2018 Copyright GA Tagliarini, PhD

Copyright GA Tagliarini, PhD Sobel Masks Sobel’s gradient is estimated using |grad(f)| = |z3-z1|+|z6-z4|+|z9-z7| Using the masks below to estimate derivatives: z1 z2 z3 z4 z5 z6 z7 z8 z9 -1 1 -2 2 -1 -2 1 2 11/30/2018 Copyright GA Tagliarini, PhD

Using Sobel’s Gradient 11/30/2018 Copyright GA Tagliarini, PhD

Using Sobel’s Gradient With Wavelet 11/30/2018 Copyright GA Tagliarini, PhD