Computer Vision. Color image processing. 25 August 2014



Similar documents
Computer Vision: Machine Vision Filters. Computer Vision. Optical Filters. 25 August 2014

Computer Vision. Image math. Copyright by NHL Hogeschool and Van de Loosdrecht Machine Vision BV All rights reserved

Overview. Raster Graphics and Color. Overview. Display Hardware. Liquid Crystal Display (LCD) Cathode Ray Tube (CRT)

Green = 0,255,0 (Target Color for E.L. Gray Construction) CIELAB RGB Simulation Result for E.L. Gray Match (43,215,35) Equal Luminance Gray for Green

Outline. Quantizing Intensities. Achromatic Light. Optical Illusion. Quantizing Intensities. CS 430/585 Computer Graphics I

Computer Vision. License Plate Recognition Klaas Dijkstra - Jaap van de Loosdrecht

Computer Vision. Image acquisition. 25 August Copyright by NHL Hogeschool and Van de Loosdrecht Machine Vision BV All rights reserved

How Landsat Images are Made

CBIR: Colour Representation. COMPSCI.708.S1.C A/P Georgy Gimel farb

1. Three-Color Light. Introduction to Three-Color Light. Chapter 1. Adding Color Pigments. Difference Between Pigments and Light. Adding Color Light

Light Waves and Matter

THE NATURE OF LIGHT AND COLOR

Digital Image Basics. Introduction. Pixels and Bitmaps. Written by Jonathan Sachs Copyright Digital Light & Color

1. Introduction to image processing

Color Management Terms

RGB Workflow Key Communication Points. Journals today are published in two primary forms: the traditional printed journal and the

Color Balancing Techniques

Digital Image Fundamentals. Selim Aksoy Department of Computer Engineering Bilkent University

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

STAAR Science Tutorial 30 TEK 8.8C: Electromagnetic Waves

Name Class Date. spectrum. White is not a color, but is a combination of all colors. Black is not a color; it is the absence of all light.

Important. Please read this User s Manual carefully to familiarize yourself with safe and effective usage.

Supervised Classification workflow in ENVI 4.8 using WorldView-2 imagery

Scanners and How to Use Them

ColourSpace Conversions

INTRODUCTION IMAGE PROCESSING >INTRODUCTION & HUMAN VISION UTRECHT UNIVERSITY RONALD POPPE

CALIBRATION AND OPERATION OF PANASONIC PLASMA MONITORS JULY 2009

Overview. What is EMR? Electromagnetic Radiation (EMR) LA502 Special Studies Remote Sensing

Calibration Best Practices

Image Optimization GUIDE

Computer vision. 3D Stereo camera Bumblebee. 25 August 2014

A remote sensing instrument collects information about an object or phenomenon within the

Composite Video Separation Techniques

Perception of Light and Color

Experiment C-31 Color Absorption

Adjusting Digitial Camera Resolution

Color Accurate Digital Photography of Artworks

Effect of Light Colors on Bean Plant Growth

The role of working spaces in Adobe applications

UNIVERSITY OF LONDON GOLDSMITHS COLLEGE. B. Sc. Examination Sample CREATIVE COMPUTING. IS52020A (CC227) Creative Computing 2.

INTRODUCTION FIGURE 1 1. Cosmic Rays. Gamma Rays. X-Rays. Ultraviolet Violet Blue Green Yellow Orange Red Infrared. Ultraviolet.

T O B C A T C A S E G E O V I S A T DETECTIE E N B L U R R I N G V A N P E R S O N E N IN P A N O R A MISCHE BEELDEN

HOW TO PRINT YOUR DIGITAL SCRAPBOOK

How many PIXELS do you need? by ron gibbs

A simpler version of this lesson is covered in the basic version of these teacher notes.

Chapter 7 ADDITIVE COLOR MIXING

Color and Light. DELTA SCIENCE READER Overview Before Reading Guide the Reading After Reading

Using Image J to Measure the Brightness of Stars (Written by Do H. Kim)

Can Traffic Accidents be eliminated by Robots?

Using Microsoft Picture Manager

OPERATION MANUAL. MV-410RGB Layout Editor. Version 2.1- higher

Mouse Control using a Web Camera based on Colour Detection

8.2 Cells and Energy. What is photosynthesis? Photosynthesis takes place in the chloroplasts. CHAPTER 8. Solar cells and chloroplasts

Electromagnetic Radiation (EMR) and Remote Sensing

3D Input Format Requirements for DLP Projectors using the new DDP4421/DDP4422 System Controller ASIC. Version 1.3, March 2 nd 2012

Chapter 2. Point transformation. Look up Table (LUT) Fundamentals of Image processing

Understanding HD: Frame Rates, Color & Compression

CULTURAL HISTORY Primary Colors - Part 1 of 2 by Neal McLain

After a wave passes through a medium, how does the position of that medium compare to its original position?

Graphic Design. Background: The part of an artwork that appears to be farthest from the viewer, or in the distance of the scene.

CS 325 Computer Graphics

Science In Action 8 Unit C - Light and Optical Systems. 1.1 The Challenge of light

MAKING SENSE OF ENERGY Electromagnetic Waves

Learning about light and optics in on-line general education classes using at-home experimentation.

Digital Color Workflows and the HP DreamColor LP2480zx Professional LCD Display

Technical Paper DISPLAY PROFILING SOLUTIONS

Panasonic Primary Colors Matching Support Software. Version 5.01

Creating Fill-able Forms using Acrobat 8.0: Part 1

Displays. Cathode Ray Tube. Semiconductor Elements. Basic applications. Oscilloscope TV Old monitors. 2009, Associate Professor PhD. T.

Selecting the appropriate band combination for an RGB image using Landsat imagery

Applications. Blue IF 039, Green IF 062, Yellow IF 022, Orange IF 041, Red IF 090,Dark Red IF 091 IR pass IF 092, IF098, IF 093 Surface 1 5/2 0.

Introduction to Light, Color, and Shadows

Otis Photo Lab Inkjet Printing Demo

Colour Image Segmentation Technique for Screen Printing

designed and prepared for california safe routes to school by circle design circledesign.net Graphic Standards

Grasshopper3 U3. Point Grey Research Inc Riverside Way Richmond, BC Canada V6W 1K7 T (604)

Principle of Thermal Imaging

Remote Sensing. Vandaag. Voordelen Remote Sensing Wat is Remote Sensing? Vier elementen Remote Sensing systeem

A Proposal for OpenEXR Color Management

A Guide to. Understanding Graphic Arts Densitometry

Photosynthesis and Light in the Ocean Adapted from The Fluid Earth / Living Ocean Heather Spalding, UH GK-12 program

e-4 AWT07MLED 7 Q TFT LCD MONITOR (LED Backlighted) USER MANUAL

Periodontology. Digital Art Guidelines JOURNAL OF. Monochrome Combination Halftones (grayscale or color images with text and/or line art)

Filters for Black & White Photography

Colour spaces - perceptual, historical and applicational background

A comparison between a CRT and a LCD monitors colors rendering

MANAGING COLOR IN A GLOBAL PRINT WORKFLOW MANAGING COLOR IN A PRINT WORKFLOW

Color Part I. (The two items we can determine: a. How bright is the light is. b. What color the light is.)

Important Notes Color

Analog Video Connections Which Should I Use and Why?

Color Theory. Tips & Tricks. Why do some colors work better together than others? More available at artbeats.com. by Chris & Trish Meyer, Crish Design

Final Software Tools and Services for Traders

Spectroscopy Using the Tracker Video Analysis Program

Transcription:

Computer Vision Color image processing 25 August 2014 Copyright 2001 2014 by NHL Hogeschool and Van de Loosdrecht Machine Vision BV All rights reserved j.van.de.loosdrecht@nhl.nl, jaap@vdlmv.nl Color image processing Overview: Introduction Color spaces Extract and merge channels Image enhancement Segmentation False color images (*) Exercise 26-aug-14 Color image processing 2 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 1

Introduction Electromagnetic spectrum Human vision Color systems Sensing illuminated objects 26-aug-14 Color image processing 3 Electromagnetic spectrum X-rays Visible light Radio waves Ultraviolet Blue Green Red Infrared 400 500 600 700 800 Wavelength (nanometers) 26-aug-14 Color image processing 4 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 2

Human vision Human eye: Bars for gray values Cones for color, one type for each primary color Blue Green (most sensitive) Red 26-aug-14 Color image processing 5 Color systems Additive: the primary colors of light are individual red, green and blue light sources that are projected onto a common region of space to reproduce a colored light. Example: RGB monitor. Subtractive: the primary pigments are magenta, cyan and yellow. A primary pigment subtracts or absorbs a primary color of light and reflects or transmits the other two primaries of light. Example: white light on yellow object: blue is absorbed <subtractive>, red and green (= yellow) are reflected <additive>. 26-aug-14 Color image processing 6 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 3

Mixtures of light (additive primaries) green yellow red white cyan magenta blue 26-aug-14 Color image processing 7 Mixtures of pigments (subtractive primaries) yellow red magenta black green blue cyan 26-aug-14 Color image processing 8 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 4

Sensing illuminated objects illumination source reflection object camera 26-aug-14 Color image processing 9 Sensing illuminated objects The sensation, or perception, of an object s color depends upon three factors: The spectrum of energy in the various wavelengths illuminating the object surface The spectral reflectance of the object surface, which determines how the surface changes the received spectrum into the radiated spectrum The spectral sensitivity of the sensor irradiated by the light from the object s surface 26-aug-14 Color image processing 10 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 5

Sensing illuminated objects White light contains all colors in equal energy Domino stones illuminated by equal amounts of red, green and blue Note: both domino stones and light source do not have pure colors 26-aug-14 Color image processing 11 Sensing illuminated objects white light green light green -> green yellow -> light green (yellow = green + red) blue -> dark red -> dark 26-aug-14 Color image processing 12 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 6

Sensing illuminated objects white light red light red -> red yellow -> red (yellow = green + red) blue -> dark green-> dark 26-aug-14 Color image processing 13 Sensing illuminated objects white light green/blue (cyan) light green -> green blue -> blue yellow-> green red -> dark 26-aug-14 Color image processing 14 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 7

Color spaces RGB HSV YUV (*) Not treated: nrgb (rgb) HSI HSL YIQ CMY(K) CIELAB CIELUV 26-aug-14 Color image processing 15 RGB space 26-aug-14 Color image processing 16 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 8

RGB space RGB Is used for displaying in CRT and LCD screens Non-intuitively, where is yellow in the cube? Non-uniform, which 3D shape should threshold values have? VisionLab implementation RGB888Image and RGB161616Image: 8 or 16 bits for each color Result of 8 bit operations are clipped 26-aug-14 Color image processing 17 HSV space 26-aug-14 Color image processing 18 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 9

HSV space HSV: Hue: dominant color Saturation: relative purity (or the amount of white light mixed with the hue) Value: the amount of light (maximum of red, green and blue) Note: Saturation is not defined when intensity = 0 Hue is not defined when saturation = 0 Other related spaces: HSI and HSL 26-aug-14 Color image processing 19 HSV space HSV versus RGB More intuitively More uniform Extra conversions VisionLab implementation HSV888Image and HSV161616Image: 8 or 16 bits for each component Hue: 0.. 359 is mapped on 0.. 255 for 8 bits and mapped to 0.. 31416 for 16 bits Operations on Saturation and Value are clipped for 8 bits Operations on Hue are modulo 256 for 8 bits and modulo 31416 for 16 bits 26-aug-14 Color image processing 20 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 10

YUV space (*) YUV: Y: 0.30 * red + 0.59 * green + 0.11 * blue U: 0.493 * (blue Y) V: 0.877 * (red Y) Used as basis for PAL TV signals and in JPEG and MPEG compression VisionLab implementation YUV888Image and YUV161616Image 26-aug-14 Color image processing 21 Extract and merge channels Extract RGBImage IntImage for red IntImage for green IntImage for blue Merge RGBImage 26-aug-14 Color image processing 22 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 11

Example split RGB channels Open image dark_flower.jl Split in red, green and blue channel, useextractrgbchannels from Color menu Merge the three channels using 3 rd and 2 nd select with MergeRGBChannels 26-aug-14 Color image processing 23 Example split RGB channels 26-aug-14 Color image processing 24 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 12

Typical schema for enhancement using grayscale operations Convert Extract IntImage for hue RGBImage HSVImage IntImage for saturation IntImage for value Enhancement Enhancement IntImage for hue IntImage for saturation IntImage for value Merge Convert HSVImage RGBImage 26-aug-14 Color image processing 25 Example contrast enhancement HSV Use script contrast_hsv.jls Open image dark_flower.jl Convert from RGB to HSV Split in hue, saturation and value channel, use ExtractHSVchannels from Color menu Histogram Equalize and Contrast Stretch value channel Merge the three channels 26-aug-14 Color image processing 26 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 13

Convert and split HSV channels 26-aug-14 Color image processing 27 Enhance value channel and merge 26-aug-14 Color image processing 28 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 14

Exercise enhancement Shoot color images or use image dark_flower.jl and experiment with : Gray scale (contrast enhancement) Modify color by changing hue and/or saturation 26-aug-14 Color image processing 29 Segmentation Segmentation on three channels Most intuitively using HSV space Tools in VisionLab ThresholdHSVChannels ThresholdRGBChannels ThresholdTool Note for HSV thresholding: Saturation is not defined when intensity = 0 Hue is not defined when saturation = 0 26-aug-14 Color image processing 30 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 15

Example ThresholdHSVChannels Open image domino.jl Convert to HSV888Image ThresholdHSVChannels 140 210 70 255 70 255 26-aug-14 Color image processing 31 Example ThresholdHSVChannels 26-aug-14 Color image processing 32 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 16

Example ThresholdHSVChannels 26-aug-14 Color image processing 33 Example using ThresholdTool Open image domino.jl Convert to HSV888Image Select ThresholdTool Note: wrap around red should be off Select with mouse click all blue pixels Click on accept Do the same for the red domino stone, but then it goes wrong, ask why? For selecting red domino stone, set checkbox for wrap around red after reset parameters 26-aug-14 Color image processing 34 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 17

Example using ThresholdTool for blue stone 26-aug-14 Color image processing 35 Example using ThresholdTool for red stone 26-aug-14 Color image processing 36 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 18

False color image (*) ConvertToFalseColor (srcimage, LUTImage, destimage This operator converts an OrdImage to an image with false colors. For this conversion an image is used as a LookUpTable. First the OrdImage in ContrastStreched and then the LUT is applied. The first pixel in de LUTImage has index 0. Usage: for displaying images with more contrast then possible with grayscale values for displaying measurement of temperatures 26-aug-14 Color image processing 37 Example using ConvertToFalseColor (*) Open image hand.jl (infra red image) Open script gen_lut_rgb.jls Execute script to generate LUT ConvertToFalseColor hand lut (from Color menu) Open script gen_lut_hsv.jls Execute script to generate LUT ConvertToFalseColor hand lut Open script gen_lut_hsv2.jls Execute script to generate LUT ConvertToFalseColor hand lut 26-aug-14 Color image processing 38 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 19

Using LUT hsv2 (*) 26-aug-14 Color image processing 39 Robo Challenge 26-aug-14 Color image processing 40 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 20

Robo Challenge 26-aug-14 Color image processing 41 Exercise find balls Use image robot_balls.jl Try to find the balls in: Grayscale RGB YUV HSV 26-aug-14 Color image processing 42 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 21

Find balls in grayscale Open robot_balls.jl Convert to Int16Image Use ThresholdTool, select bottom of black ball, set low to 0 and increment high to 140 Conclusion: Finding yellow and green ball is difficult 26-aug-14 Color image processing 43 Find balls in RGB color space Open robot_balls.jl Select yellow ball with ThresholdTool Select red ball with ThresholdTool Select bottom of black ball, still problem with reflection Select green ball, if top part with wire is selected, the black ball is selected Conclusion: better then grayscale very sensitive for lighting variations and shadows change in light condition is change in R G and B lows and highs for selection are very critical 26-aug-14 Color image processing 44 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 22

Find balls in HSV color space Open robot_balls.jl Convert to HSV888Image Select yellow ball H: 40-50, S: 150-255, V:80-255 (even 0-255 works, just thicker) Select red ball, (no wrap around red needed!) H:235-255, S:10-255, V:30-255 Select black ball, start at bottom side, (still problem with refection) H:0-255, S:0-255, V:0-52 Select green ball, start at bottom H:80-100, S:140-255, V:0-255 (Filter on Formfactor en Eccentrity using LabelBlobs and BlobAnalyse) Conclusion: much more robust then RGB 26-aug-14 Color image processing 45 Exercise change yellow to blue Change the color of the license plate (image 23VKF8.jl) from yellow to blue without changing the colors of the car and the background Answer: yellow_to_blue.jls 26-aug-14 Color image processing 46 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 23

Exercise change red to blue (*) Change the color of the screwdriver (image screwdriver.jl) from red to blue without changing the colors of the domino stones Answer: red_to_blue.jls 26-aug-14 Color image processing 47 Jaap van de Loosdrecht, NHL, vdlmv, j.van.de.loosdrecht@nhl.nl 24