Lecture #13. Point (pixel) transformations. Neighborhood processing. Color segmentation

Similar documents
Color Image Processing

Lecture 12 Color model and color image processing

Digital Image Processing

Fall 2015 Dr. Michael J. Reale

Lecture 1 Image Formation.

Digital Image Processing, 3rd ed.

CHAPTER 3 IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN

Color and Shading. Color. Shapiro and Stockman, Chapter 6. Color and Machine Vision. Color and Perception

Digital Image Processing. Introduction

Image Enhancement: To improve the quality of images

Colour Reading: Chapter 6. Black body radiators

Digital Image Processing. Prof. P. K. Biswas. Department of Electronic & Electrical Communication Engineering

Lecture: Edge Detection

Lecture 4: Spatial Domain Transformations

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Color. making some recognition problems easy. is 400nm (blue) to 700 nm (red) more; ex. X-rays, infrared, radio waves. n Used heavily in human vision

Lecture 4 Image Enhancement in Spatial Domain

Chapter 6 Color Image Processing

Lecture 11. Color. UW CSE vision faculty

Computer Vision & Digital Image Processing. Image segmentation: thresholding

(0, 1, 1) (0, 1, 1) (0, 1, 0) What is light? What is color? Terminology

Opponent Color Spaces

Pop Quiz 1 [10 mins]

IMAGE PROCESSING >FILTERS AND EDGE DETECTION FOR COLOR IMAGES UTRECHT UNIVERSITY RONALD POPPE

Chapter - 2 : IMAGE ENHANCEMENT

Project Report for EE7700

3. (a) Prove any four properties of 2D Fourier Transform. (b) Determine the kernel coefficients of 2D Hadamard transforms for N=8.

Introduction to color science

This guide helps you understand how operations available on the printer can be used to adjust and customize color output.

6. Color Transforms. Computer Engineering, Sejong University. 비선형색공간 (Non-linear color space) 균등 (uniform) 색공간을위해도입

Computer and Machine Vision

Chapter 3: Intensity Transformations and Spatial Filtering

EE795: Computer Vision and Intelligent Systems

Texture. Texture is a description of the spatial arrangement of color or intensities in an image or a selected region of an image.

Display. Introduction page 67 2D Images page 68. All Orientations page 69 Single Image page 70 3D Images page 71

CS 490: Computer Vision Image Segmentation: Thresholding. Fall 2015 Dr. Michael J. Reale

Filtering and Enhancing Images

Topic 4 Image Segmentation

Noise Model. Important Noise Probability Density Functions (Cont.) Important Noise Probability Density Functions

CSE 167: Introduction to Computer Graphics Lecture #6: Colors. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Outlines. Medical Image Processing Using Transforms. 4. Transform in image space

Line, edge, blob and corner detection

EECS490: Digital Image Processing. Lecture #22

Mosaics. Today s Readings

Image processing. Reading. What is an image? Brian Curless CSE 457 Spring 2017

Physical Color. Color Theory - Center for Graphics and Geometric Computing, Technion 2

BSB663 Image Processing Pinar Duygulu. Slides are adapted from Selim Aksoy

Learning to Detect Faces. A Large-Scale Application of Machine Learning

The Elements of Colour

Computer Vision for HCI. Topics of This Lecture

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Digital Image Processing COSC 6380/4393. Lecture 19 Mar 26 th, 2019 Pranav Mantini

Color quality guide. Quality menu. Color quality guide. Page 1 of 6

Visible Color. 700 (red) 580 (yellow) 520 (green)

EEM 463 Introduction to Image Processing. Week 3: Intensity Transformations

Outline 7/2/201011/6/

Babu Madhav Institute of Information Technology Years Integrated M.Sc.(IT)(Semester - 7)

Chapter 4 Color in Image and Video

Edge and local feature detection - 2. Importance of edge detection in computer vision

Color Balancing Experimental Projection Displays

Module 3. Illumination Systems. Version 2 EE IIT, Kharagpur 1

EECS 556 Image Processing W 09. Image enhancement. Smoothing and noise removal Sharpening filters

MediaTek Video Face Beautify

ITP 140 Mobile App Technologies. Colors

CS 445 HW#6 Solutions

Illumination and Shading

CHAPTER 3 FACE DETECTION AND PRE-PROCESSING

Anno accademico 2006/2007. Davide Migliore

MODULATING A POLYCHROMATIC IMAGE BY A 2 ND IMAGE PLOTTED AGAINST SATURATION AND A 3 RD IMAGE PLOTTED AGAINST LIGHTNESS: PROGRAM hlsplot

Image Enhancement in Spatial Domain (Chapter 3)

Image Processing. CSCI 420 Computer Graphics Lecture 22

Digital Image Processing, 2nd ed. Digital Image Processing, 2nd ed. The principal objective of enhancement

Extensions of One-Dimensional Gray-level Nonlinear Image Processing Filters to Three-Dimensional Color Space

Intensity Transformation and Spatial Filtering

Image Processing. Alpha Channel. Blending. Image Compositing. Blending Errors. Blending in OpenGL

Digital Image Processing. Image Enhancement in the Spatial Domain (Chapter 4)

Vivekananda. Collegee of Engineering & Technology. Question and Answers on 10CS762 /10IS762 UNIT- 5 : IMAGE ENHANCEMENT.

CMPUT 206. Introduction to Digital Image Processing

A Tutorial Guide to Tribology Plug-in

Digital Image Processing. Week 4

Digital Image Processing. Prof. P.K. Biswas. Department of Electronics & Electrical Communication Engineering

User Manual Release Note. PhaserMatch

Image Processing: Final Exam November 10, :30 10:30

CHAPTER 1 Introduction 1. CHAPTER 2 Images, Sampling and Frequency Domain Processing 37

SIFT: SCALE INVARIANT FEATURE TRANSFORM SURF: SPEEDED UP ROBUST FEATURES BASHAR ALSADIK EOS DEPT. TOPMAP M13 3D GEOINFORMATION FROM IMAGES 2014

INTENSITY TRANSFORMATION AND SPATIAL FILTERING

One image is worth 1,000 words

Robust color segmentation algorithms in illumination variation conditions

Local Feature Detectors

CS143 Introduction to Computer Vision Homework assignment 1.

Edge Detection (with a sidelight introduction to linear, associative operators). Images

Biometrics Technology: Image Processing & Pattern Recognition (by Dr. Dickson Tong)

CIE L*a*b* color model

HOMEWORK 1. Theo Lorrain-Hale UNIVERSITY OF MARYLAND

Image segmentation. Stefano Ferrari. Università degli Studi di Milano Methods for Image Processing. academic year

Raytracing CS148 AS3. Due :59pm PDT

Chapter 3 Image Registration. Chapter 3 Image Registration

2%34 #5 +,,% ! # %& ()% #% +,,%. & /%0%)( 1 ! # %& % %()# +(& ,.+/ +&0%//#/ &

IT Digital Image ProcessingVII Semester - Question Bank

Transcription:

Lecture #13 Point (pixel) transformations Color modification Color slicing Device independent color Color balancing Neighborhood processing Smoothing Sharpening Color segmentation

Color Transformations Color transformations are similar to pixel or point transformations. New color s i =T i (r 1,r 2,, r n ) where r 1,r 2,, r n are the component colors and T i is a set of transformations.

Color Transformations In RGB color space: I = 1 [ 3 R + G + B ] To modify intensity multiply each color component by k I ' = 1 [ kr + kg + kb]= k [ 3 3 R + G + B ]= ki

Color Transformations In CMY color space intensity is: I = 1 3 ( 1 C )+ ( 1 M )+ 1 Y To modify intensity modify each component as: C ' = kc + ( 1 k) ( ) I ' = 1 1 kc + ( 1 k)+ km + ( 1 k)+ ky + 1 k 3 = 1 1 3 kc+ ( M + Y )+ 31k = 1 [ 3 C M Y ]= 1 1 3 3 C + M + Y ( ) ( ) = 1 k [ 3 C + M + Y ] 1 + k = k 1 1 3 C + M + Y [ ] = 1 k [ 3 C + M + Y ] 3 [ 3 1 k ] ( ) = ki

Color Transformations The cost of performing transformations will vary depending upon the color space you are using. Consider an intensity transformation g(x,y)=kf(x,y) for 0k1 In HSI color space: s 1 =r 1, s 2 =r 2, s 3 =kr 3 In RGB color space: s i =kr i, k=1,2,3 In CMY color space: s i =kr i +(1-k), k=1,2,3 I = 1 [ 3 R + G + B ]= 1 3 ( 1 C )+ ( 1 M )+ 1 Y ( ) = 1 1 [ 3 C + M + Y ]

Color Transformations CMYK Remember Y absorbs B and transmits R & G RGB HSI Hue is difficult to interpret for black, white and any gray since it is undefined. Strawberries are highly saturated so they are white Just intensity I = 1 [ 3 R + G + B]= 1 3 ( 1 C )+ ( 1 M )+ 1 Y ( ) [ ] = 1 1 3 C + M + Y

Intensity Transformation Scale each RGB component C=1-R; M=1-G; Y=1-B I decreases since R,G,B decrease. H and S do not change. (This slide corrected since last edition)

Color complements warm colors cool colors Newton s color circle summarizes complementary colors. C M Y = 1 1 1 R G B

Complement Transforms RGB complement simply 1-R, 1-G, 1-B C M Y = 1 1 1 R G B RGB complement HSI approximate complement I goes down because R,G,B are going down. S does not change. H complement transform not obvious. (see problem 6.18) Basically colors undergo a 180 angle shift

Color Slicing Transforms s i = 0.5 if r j a j > W 2 r i otherwise (0.5,0.5,0.5) defines a neutral gray outside a RGB cube centered at (0.6863,0.1608,0.1922) ( ) 2 n s i = 0.5 if r a 2 j j > R o j =1 r i otherwise (0.5,0.5,0.5) defines a neutral gray outside a RGB sphere centered at (0.6863,0.1608,0.1922) Sphere might be slightly better at fully capturing area of strawberries.

Color Intensity Transforms Make brights brighter flat Increase contrast of each component at high and low ends Make darks darker when applied uniformly to R,G, and B light Decreases brightness overall dark Increases brightness overall

Color Transforms We need a device independent color model to get consistency between monitors and printers L*a*b* is Colorimetric - colors perceived as identical have identical values Perceptually uniform- color differences are perceived uniformly Device independent

Color Transforms L*a*b* is similar to HSI in that it separates color from intensity: lightness, R-G, G-B X,Y,Z are the RGB tristimulus values of a color X w,y w,z w are the RGB tristimulus values of a perfect white diffuser illuminated with a CIE D65 (daylight) lamp

Color Transforms Lightness L* = 116h Y Y w 16 Red-Green a* = 500 h X X w h Y Y w Green-Blue b* = 200 h Y Y w h Z Z w where hq ( )= 3 q q > 0.008856 7.787q + 16 q 0.008856 116

Color Balancing The easiest way to detect a color imbalance in an image is to analyze a known color such as whites or skintone. Darken (boost) Correct using simple transformation to boost or lighten a particular color. Lighten skin

Color Histogram Equalization Original image. H & S remain the same. Equalize the intensity. Image after equalization of intensity. Increase saturation slightly (after equalization) to make colors look better. How can you equalize a color image? Use a color space such as HSI which separates intensity from color so you can equalize intensity.

Lena: RGB space

Lena: HSI space

Color Neighborhood Processing 1. Combine each component image separately and combine into one composite image 2. Process color vectors directly Averaging will give the same result using either method. 1. Sum all pixels and average in each color plane. Then combine via averaging. 2. Compute average (mean) of all vectors in the neighborhood.

Color Neighborhood Transforms The color transforms considered to know were point (or pixel) transforms. The next level of processing is neighborhood processing such as smoothing or sharpening. Color averaging: c( x, y)= 1 K ( x,y)s xy c x, y ( ) c( x, y)= 1 K 1 K 1 K ( x,y)s xy ( x,y)s xy ( x,y)s xy ( ) R x, y ( ) G x, y ( ) B x, y

Color Smoothing Using a 5x5 uniform mask Smoothing RGB color planes independently. Smooth only I in HSI and convert back to RGB. Subtract images* Average of two pixels of different colors is yet another different color. Averaging in I does not change color. Minimizes color shifts *no details of how computation was performed given

Color Sharpening Sharpening g( x, y)= f( x, y)± 2 f( x, y) Use a vector approach with Laplacian: 2 ( ) c x, y ( ) 2 R x, y = 2 G x, y ( ) 2 B( x, y)

Color Sharpening Using a Laplacian Sharpen RGB color planes independently. Sharpen only I in HSI and convert back to RGB. Subtract images* Minimizes color shifts *no details of how computation was performed given

Color Image Segmentation Divides images into constituent regions or objects Usually works better in RGB space than HSI space Objective is to classify each color pixel as having a color within the specified range or not Use a distance classifier D( z, a )= z a = More generally D( z, a )== ( z a ) T ( z a) = ( zr a R ) 2 + ( z G a G ) 2 + ( z B a B ) 2 z a ( ) T C 1 z a ( ) (This is really color slicing since no connectivity)

Color Image Segmentation Spherical using Euclidian distance Ellipsoidal happens when you use the covariance matrix C Box is computationally very effective since no squares or square roots. Choose sides proportional to standard deviations of each color.

HSI Color Image Segmentation HSI is the most natural color space in which to do color segmentation (a Ch.10 topic) We want to segment the pixels in this red area. H image S image I image 1. Threshold S image at 0.1 of max_sat_value to get saturated color mask. 2. Multiply thresholded S image by H image to identify regions of saturated color 3. Histogram of masked H image. 4. Threshold masked image at 0.9 to get only pixels near red color

RGB Color Image Segmentation 1. Select a sample of region to be segmented 2. Compute mean and standard deviations of the color contained in the sample rectangle 3. Construct box in color space corresponding to standard deviations of sample a R ± 1.25 R a G ± 1.25 G a B ± 1.25 B 4. Classify pixel as white if inside this box else black

RGB Color Image Segmentation Rectangle shows color we want to segment

Color Edges RED GREEN BLUE COLOR Color edges aligned Color edges NOT aligned If we simply added the magnitudes of the gradients they would be the same at the center. Intuitively they cannot be the same.

(Vector) Color Gradient See Section 6.6 and p. 563-564 of GWE. Implemented as colorgrad. The maximum rate of change of a color vector c(x,y) at (x,y) is given by F( )= 1 ( 2 g xx + g yy )+ ( g xx g yy )cos2 + 2g xy sin 2 in the direction ( x, y)= 1 2g xy 2 Tan1 g xx g yy NOTE: This expression gives two directions. One is the direction of the maximum of F; the other is the direction of the minimum. S.D.Zenzo, A Note on the Gradient of a Multi-Image, Computer Vision, Graphics and Image Processing, Vol. 33, pp.116-125, 1986.

(Vector) Color Gradient Let ˆr, ĝ, ˆb be the unit vectors along the RGB axes of a RGB color space. Define Further define u = R x ˆr + G x ĝ + B x g xx = ui u = u T u = R x g yy = vi v = v T v = R y g xy = ui v = u T v = R x ˆb 2 2 + G x + G y R y + G x v = R y ˆr + G y ĝ + B y 2 2 + B x + B y 2 2 G y + B x B y ˆb