Digital 2D Image Basic Masaki Hayashi

Slides:



Advertisements
Similar presentations
Multimedia System Video
Advertisements

CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 4 – Digital Image Representation Klara Nahrstedt Spring 2009.
M-JPEG M-JPEG April 15, 2015 INF5063: Programming heterogeneous multi-core processors.
EE4H, M.Sc Computer Vision Dr. Mike Spann
Image Processing IB Paper 8 – Part A Ognjen Arandjelović Ognjen Arandjelović
Digital image processing Chapter 6. Image enhancement IMAGE ENHANCEMENT Introduction Image enhancement algorithms & techniques Point-wise operations Contrast.
COLORCOLOR A SET OF CODES GENERATED BY THE BRAİN How do you quantify? How do you use?
School of Computing Science Simon Fraser University
Chap 4-2. Frequency domain processing Jen-Chang Liu, 2006.
CMPT 365 Multimedia Systems
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
5. 1 JPEG “ JPEG ” is Joint Photographic Experts Group. compresses pictures which don't have sharp changes e.g. landscape pictures. May lose some of the.
Roger Cheng (JPEG slides courtesy of Brian Bailey) Spring 2007
01/31/02 (C) 2002, UNiversity of Wisconsin, CS 559 Last Time Color and Color Spaces.
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
CS559-Computer Graphics Copyright Stephen Chenney Image File Formats How big is the image? –All files in some way store width and height How is the image.
Media File Formats Jon Ivins, DMU. Text Files n Two types n 1. Plain text (unformatted) u ASCII Character set is most common u 7 bits are used u This.
Page 18/30/2015 CSE 40373/60373: Multimedia Systems 4.2 Color Models in Images  Colors models and spaces used for stored, displayed, and printed images.
Presentation Image Filters
Introduction to JPEG Alireza Shafaei ( ) Fall 2005.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 8 – JPEG Compression (Part 3) Klara Nahrstedt Spring 2012.
ECE472/572 - Lecture 12 Image Compression – Lossy Compression Techniques 11/10/11.
Image Formation. Input - Digital Images Intensity Images – encoding of light intensity Range Images – encoding of shape and distance They are both a 2-D.
IMAGE SAMPLING AND IMAGE QUANTIZATION 1. Introduction
Lab #5-6 Follow-Up: More Python; Images Images ● A signal (e.g. sound, temperature infrared sensor reading) is a single (one- dimensional) quantity that.
Klara Nahrstedt Spring 2011
Digital Image Processing Chapter # 4 Image Enhancement in Frequency Domain Digital Image Processing Chapter # 4 Image Enhancement in Frequency Domain.
Video Video.
1 Lecture 1 1 Image Processing Eng. Ahmed H. Abo absa
Image Representation. Digital Cameras Scanned Film & Photographs Digitized TV Signals Computer Graphics Radar & Sonar Medical Imaging Devices (X-Ray,
Digital Image Processing (DIP) Lecture # 5 Dr. Abdul Basit Siddiqui Assistant Professor-FURC 1FURC-BCSE7.
Digital image processing Chapter 3. Image sampling and quantization IMAGE SAMPLING AND IMAGE QUANTIZATION 1. Introduction 2. Sampling in the two-dimensional.
G52IIP, School of Computer Science, University of Nottingham 1 G52IIP 2011 Summary Topic 1 Overview of the course Related topics Image processing Computer.
Visual Computing Computer Vision 2 INFO410 & INFO350 S2 2015
Introduction to JPEG m Akram Ben Ahmed
Dr. Abdul Basit Siddiqui FUIEMS. QuizTime 30 min. How the coefficents of Laplacian Filter are generated. Show your complete work. Also discuss different.
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 4 – Audio and Digital Image Representation Klara Nahrstedt Spring 2010.
Computer Graphics & Image Processing Chapter # 4 Image Enhancement in Frequency Domain 2/26/20161.
Ec2029 digital image processing
Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.
Digital Video Representation Subject : Audio And Video Systems Name : Makwana Gaurav Er no.: : Class : Electronics & Communication.
Tytus Bernas Biological applications of image processing.
Image Enhancement in the Spatial Domain.
Masaki Hayashi 2015, Autumn Visualization with 3D CG Digital 2D Image Basic.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 4 – Visual Perception and Digital Image Representation Klara Nahrstedt Spring 2014.
Color Models Light property Color models.
Digital Image Fundamentals
CS 115: Computing for The Socio-Techno Web
Fundamental concepts in video
Image Subtraction Mask mode radiography h(x,y) is the mask.
Image Processing Objectives To understand pixel based image processing
Sampling, Quantization, Color Models & Indexed Color
Video Basics.
Image enhancement algorithms & techniques Point-wise operations
JPEG Image Coding Standard
Images, Display, Perception
Image Pyramids and Applications
CMPT 365 Multimedia Systems
Fourier Transform.
Image Acquisition.
EEE 501 Applied Digital Image Processing Dr. Türker İnce
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Topic 1 Three related sub-fields Image processing Computer vision
Lecture 2: Image filtering
Image segmentation Grey scale image Binary image
Review and Importance CS 111.
DIGITAL IMAGE PROCESSING Elective 3 (5th Sem.)
Templates and Image Pyramids
Presentation transcript:

Digital 2D Image Basic Masaki Hayashi 2016, Autumn Visualization with 3D CG Digital 2D Image Basic Masaki Hayashi

2D Image Digitization

2D coordinate in image processing Mathematics y x

Scanning

Image data > 2 dimensional data > series of data 125 5 185 225 12 127 115 114 135 3 95 45 62 235 245 244 25 ....... 1 92 35 9 121 3 15 165 ....... > series of data 125 5 185 225 12 127 115 114 135 .... 3 0 95 45 ....

Gray scale & RGB pixel Grey scale (Black & white) RGB (Color)

Image size Spatial Size (Resolution) 320 x 240 640 x 480  SDTV pixel Size (Resolution) 320 x 240 640 x 480  SDTV 1920 x 1080  HDTV 3840 x 2160  4K 4096 x 2160  4K (cinema) 7680 x 4320  8K ...... V size H size ( TV industry )

Image depth Depth (sampling bit rate) 1 pixel has: 8-bit 10-bit 12-bit V size 10-bit 12-bit 14-bit 16-bit,... Depth H size

Image depth Number of level 8-bit has 256 levels 10-bit (1024 levels) 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 = 28 = 256 10-bit (1024 levels) 12-bit (4096 levels) 16-bit (65536 levels) One level difference of 256 levels is actually visible.... ( 8-bit = 1 byte ) Depth and Color 24-bit RGB || 8-bit X 3 256 x 256 x 256 = 1.677 million colors 32-bit color usually has RGBα it is equivalent to 24-bit color e.g. iMac 4K/5K has 10-bit depth which is 30-bit RGB

Features of image (summary) Resolution Depth Sharpness Spatial detail Color representation Dynamic range Picture quality degradation when processed

Aspect ratio 1 : 1 3 : 2 4 : 3 16 : 9 ? : ? Square pixel, basically 512 3456 640 1 : 1 512 3 : 2 (Film) 2304 4 : 3 (TV in the past) 480 1920 16 : 9 (HDTV, 4K, 8K) 1080 ? : ? (Computer, cinema, etc.)

Color system

Color scheme R (Red) H (Hue) G (Green) S (Saturation) B (Blue) B (Brightness) Additive color mixing

Color scheme Brightness: Y = 0.3R + 0.59G + 0.11B CR = R - Y Chroma: Hue + Saturation Brightness: Y = 0.3R + 0.59G + 0.11B (Luminance) CR = R - Y Chroma: CB = B - Y

Color scheme H CB S CR H = tan-1 (CR/CB) S = CR 2 + CB 2 Chroma Hue + Saturation CB CR H S CR H = tan-1 (CR/CB) S H CB S = CR 2 + CB 2

Y CB CR Color scheme Y PB PR Y U V 4:4:4 RGB, baseband Slightly different but almost same Y PB PR Y U V Brightness Color components Imagine coloring Human eye is less sensitive to color, compared to brightness. You can reduce the data amount by using this characteristic. 4:4:4 RGB, baseband 4:2:2 YUV, half res for UV. 4:1:1 YUV, quarter res for UV. ....

Coloring

Coloring

Coloring Brightness (contour) Color

Image compression

JPEG GIF PNG Image format Most popular Mosquito noise, Blocky noise Not suitable for Logo, text, cartoon GIF Popular in the past. Motion-GIF is still used Only 256 colors PNG Improved version of GIF, Most commonly used in the Internet Un-limited color. OK for both natural image and logo stuff Loss-less compression (no quality selection)

How JPEG compress image INPUT Image 8×8 spatial 8×8 frequency Important Less important Split into 8×8 blocks Discrete Cosine Transform (DCT) Quantization & Entropy coding Approx. 1/10 compress 8×8 blocky noise Mosquito noise at sharp edge JPEG data series OUTPUT

How GIF compress image INPUT OUTPUT Reduce colors LZW compress GIF data series Good for logo, font, cartoon Bad for photograph No blocky noise, no mosquito Taken over by PNG (similar to ZIP) OUTPUT

How PNG compress image INPUT OUTPUT Deflate compress PNG data series 16777216 colors Deflate compress PNG data series (similar to ZIP) OUTPUT Good for all kinds Loss less No blocky noise, no mosquito

Compression method of ZIP, etc. LZW, Deflate,... etc. INPUT Output 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 x 8, 1 x 12 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 01 x 10 compress The more random the input data is, the less compression the output is.

Image processing

Intensity distribution of an image Histogram Histogram Input image Intensity distribution of an image

How to make histogram Input image pixel count Histogram ↑ 125 5 121 225 12 127 115 114 135 3 95 45 62 235 245 244 25 1 92 35 9 15 165 ....... pixel count ↑ Histogram Count the number of pixel with a value of 121 If it's 823 pixels Then plot it 823 121 →level

Histogram Correction

Spatial filtering Filter convolution Input image Output image -1 -1 -1 -1 9 -1 50x(-1) + 50x(-1) + 150x(-1) + 100x(-1) + 100x9 + 100x(-1) + 120x(-1) + 120x(-1) + 120x(-1) = 90 -1 -1 -1 Filter (3x3 kernel) convolution 60 50 50 150 150 110 50 50 150 130 100 Move the frame 1 pixel to the right and repeat the same convolution 40 100 100 100 90 90 120 120 120 120 110 170 50 50 150 150 Input image Output image

Smoothing 1/9 1/9 1/9 Mean filter

Edge detection 1 1 -4 1 1 1 -8 1 -1 2 2 -4 -1 2 Laplacian filter 1 1 -4 1 1 1 -8 1 -1 2 2 -4 -1 2 Laplacian filter Second spatial derivative of an image

Edge detection 1 1 1 -2 1 1 1 1 -1 Laplacian filter

Edge enhancement (sharpen filter) Edge enhancement using edge signal detected by laplacian + in + out - Laplacian 2.0 1 -2 1 1.0 1.0 1.0 0.0 0.0 0.0 -1.0 -1.0 -1 -1 4 -1 Laplacian filter

Spatial domain vs Frequency domain transforming Spatial signal Frequency signal inverse-transforming f f

Spatial domain vs Frequency domain Original image Frequency signal DFT IDFT Spatial domain Frequency domain DFT: Discrete Fourier Transform

Digital filter DFT Original image Frequency signal Mask apply Mask = remove high frequency Filtered signal Output image IDFT Spatial domain Frequency domain

Image magnification 2 times magnification Input Output Gap If output pixel position is calculated by using input pixel position

Interporation 2 times magnification Input Output Input pixel position should be calculated by output pixel position Interpolated from the neighbored 4 pixel values

Image magnification 5 times zooming No interpolation (Nearest neighbor) Original image With interpolation (Bi-linear) 5 times zooming

Image shrinking 1/2 shrinking Input Output This works but not enough Aliasing problem

Image shrinking Input Output 5 times shrinking Undesired signal called "aliasing" appears

Aliasing noise Bad... Good

Sub-sampling & Anti-aliasing Bad... Aliasing f f / 2 f f / 2 Good LPF No aliasing f f / 2 f f / 2

Unti-aliasing No Anti-aliasing With anti-aliasing (Low pass filtered prior to the shrinking)