Image Display MATLAB functions for displaying image Bit Planes

Slides:



Advertisements
Similar presentations
Types of Image Enhancements in spatial domain
Advertisements

Introduction to Computer Vision Image Texture Analysis
Matlab Tutorial. Session 1 Basics, Filters, Color Space, Derivatives, Pyramids, Optical Flow Gonzalo Vaca-Castano.
SIFT & MatLab Pier Luigi Mazzeo.
1 A L L A H. Command-Window Workspace & Directory Command- History The Matlab Command window - Finding your way around.
Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng.
Digital Image Processing Lecture 3: Image Display & Enhancement
Laboratory of Image Processing Pier Luigi Mazzeo
Image Data Representations and Standards
Grey Level Enhancement Contrast stretching Linear mapping Non-linear mapping Efficient implementation of mapping algorithms Design of classes to support.
Chap 1 Image fundamental. Trends Image processing techniques have developed from Gray-level processing to color processing 2-D processing to 3-D processing.
 Image Characteristics  Image Digitization Spatial domain Intensity domain 1.
SCCS 4761 Point Processing Basic Image Processing Operations Arithmetic Operations Histograms.
BYST Eh-1 DIP - WS2002: Enhancement in the Spatial Domain Digital Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department Image Enhancement.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Binary & Decimal numbers = 3* * *10 + 5*1 = 3* * * *10 0 Decimal system: Ten digits: 0,1,2,3,…,9 Example:
Half Toning. Continuous Half Toning Color Half Toning.
Color Quantization. Common color resolution for high quality images is 256 levels for each Red, Greed, Blue channels, or 256 = colors. How can.
Computer Vision Lecture 3: Digital Images
Images Course web page: vision.cis.udel.edu/cv March 3, 2003  Lecture 8.
Image Formation. Input - Digital Images Intensity Images – encoding of light intensity Range Images – encoding of shape and distance They are both a 2-D.
2/3/04© University of Wisconsin, CS559 Spring 2004 Last Time Color –Transforming between two color spaces –A gamut is the set of displayable colors in.
Measurements in Fluid Mechanics 058:180:001 (ME:5180:0001) Time & Location: 2:30P - 3:20P MWF 218 MLH Office Hours: 4:00P – 5:00P MWF 223B-5 HL Instructor:
Image and Video Processing in MATLAB Partly based on slides by Dmitri Roduy.
The Digital Image Dr. John Ryan.
Gulsah Tumuklu Ozyer MATLAB IMAGE PROCESSING TOOLBOX.
Seeram Chapter #3: Digital Imaging
M ATLAB L ECTURE 1 Basic Concepts of Digital Image Processing.
Image Processing:Fundementals Lecture: Introduction –An image is digitized to convert it to a form which can be stored in a computer's memory or.
Digital Image Processing Lecture 6: Image Geometry
September 5, 2013Computer Vision Lecture 2: Digital Images 1 Computer Vision A simple two-stage model of computer vision: Image processing Scene analysis.
Digital Image Processing Lecture 4: Image Enhancement: Point Processing Prof. Charlene Tsai.
CS112 Scientific Computation Department of Computer Science Wellesley College Numb3rs Number and image types.
Digital Image Processing Lecture 3: Image Display & Enhancement March 2, 2005 Prof. Charlene Tsai.
Digital Image Processing Lecture9: Intensity (Gray-level) Transformation Functions using MATLAB.
Image Enhancement in the Spatial Domain (MATLAB)
Presented By: ROLL No IMTIAZ HUSSAIN048 M.EHSAN ULLAH012 MUHAMMAD IDREES027 HAFIZ ABU BAKKAR096(06)
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Image Processing Example.
Digital Image Processing Lecture4: Fundamentals. Digital Image Representation An image can be defined as a two- dimensional function, f(x,y), where x.
09/17/02 (C) 2002, University of Wisconsin, CS 559 Last Time Color Spaces File formats.
Digital Imaging Fundamentals Ms. Hema C.R. School of Mechatronic Engineering.
Elements of Visual Perception
02/05/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Mach Banding –Humans exaggerate sharp boundaries, but not fuzzy ones.
Digital Image Processing Introduction to MATLAB. Background on MATLAB (Definition) MATLAB is a high-performance language for technical computing. The.
Computer Science 121 Scientific Computing Winter 2014 Chapter 14 Images.
Digital Image Processing Sampling and Quantization
3-1 Chapter 3: Image Display The goodness of display of an image depends on (a) Image quality: i) Spatial resolution, ii) Quantization (b) Display device:
Image Representation Last update st March Heejune Ahn, SeoulTech.
©Soham Sengupta,
Digital Image Processing Lecture 4: Image Enhancement: Point Processing January 13, 2004 Prof. Charlene Tsai.
การใช้งานโปรแกรม MATLAB ดร. อำนาจ ขาวเน. BASIC ELEMENTS OF MATLAB MATLAB Desktop MATLAB Editor Help System MATLAB (MATrix LABoratory)
Point Processing When doing so you actually perform a special type of image processing known as point processing.
Binary & Decimal numbers
Computer Application in Engineering Design
(Project) by:- ROHAN HIMANSHU ANUP 70282
图像处理技术讲座(3) Digital Image Processing (3) Basic Image Operations
Images In Matlab.
Histogram Equalization
Image Enhancement.
T490 (IP): Tutorial 2 Chapter 2: Digital Image Fundamentals
Digital Image Processing using MATLAB
Computer Vision Lecture 3: Digital Images
Tutorial 1 (additional materials)
Digital Image Fundamentals
Digital Image Processing
© 2010 Cengage Learning Engineering. All Rights Reserved.
Digital Image Processing Lecture 3: Image Display & Enhancement
Filtering Images Work in the spatial domain
Fundamentals of Image Processing Digital Image Representation
Presentation transcript:

Image Display MATLAB functions for displaying image Bit Planes Spatial resolution Quantization Dithering

MATLAB Functions Command: image Command: imshow display matrix as image default: use current color map to assign color Command: imshow display uint8 matrix as image for double matrix, display in the range of [0,1]

MATLAB: image Function Require mapping to display grayscale images No mapping required for true color images Commands to add after image: truesize : display one matrix element as one pixel axis off : turn off axis labelling colormap(gray(num_color)) : adjust color map to grayscale Note: Find the number of gray level by command size(unique(matrix))

Notes on Color Map Mapping to fewer color than required. Result: Brighter image or Darker image Mapping to more color than required

Notes on Color Map Mapping to fewer color than required produces brighter image. (pixel whose intensity higher than the defined value assigned the highest value (white)) Mapping to more color than required produces darker image. (no pixels mapped to white) For indexed color image, map to the image’s palette.

imshow for Double Matrix Range is [0,1] not [0,255]. How to do it? imshow(double_matrix/255) Vary the brightness of the image: imshow(double_matrix/value) value > 255: darker; value < 255: brighter

Conversion: Double to Uint Image Manually >> b = double(a); >> c = b/255; Specific command: im2double >> d = im2double(a); Note: im2double automatically scale the output to the range of [0,1]

Conversion: Double to Uint Image Manually >> a = uint8(c * 255); Specific command: im2uint8 >> a = im2uint8(c); Note: im2uint8 automatically scale the input (range [0,1]) to the range of [0,255]

Display Binary Image Use uint8 data type with logical flag on >> imshow(logical(binary_matrix)) Or >> imshow(double(binary_matrix)) For normal grayscale image >> logical_matrix = integer_matrix > threshold Conversion: logical to uint8 >> matrix = + matrix

Bit Plane 8-bit unsigned integer Bit plane: binary image whose pixel is the value at the particular bit in the 8-bit unsigned integer MSB  Most Significant Bit Plane LSB  Least Significant Bit Plane

Bit Plane: Lena Bit Plane#0 Bit Plane#1 Bit Plane#2 Bit Plane#3

Bit Plane Construction: Example >> c = imread(‘cameraman.tif’); >> cd = double(c); >> c0 = mod(cd,2); >> c1 = mod(floor(cd/2),2); >> c2 = mod(floor(cd/4),2); >> c3 = mod(floor(cd/8),2); >> c4 = mod(floor(cd/16),2); >> c5 = mod(floor(cd/32),2); >> c6 = mod(floor(cd/64),2); >> c7 = mod(floor(cd/128),2); >> >> >> >>

Spatial Resolution Density of the pixels over the image Higher spatial resolution = more pixels in the image Change spatial resolution by imresize command Syntax: imresize(matrix, scale, method) imresize(matrix, scale) method: ‘nearest’ , ‘bilinear’, ‘bicubic’

Decrease Spatial Resolution E.g. Lower the resolution by half on x and y axis >> imresize(x,1/2);

Increase Spatial Resolution E.g. Increase the spatial resolution by two on X and Y axes >> imresize(x,2);

Interpolation Example 450% Scaled up Nearest Neighbor Bicubic Bilinear http://www.dpreview.com/learn/?/key=interpolation

Quantization Digitize the image so that the number of the unique value is within the available range 1 2 3 1 2 3

Uniform Quantization x Quantized value 3 2 1 0.25MAX 0.5MAX 0.75MAX 0.25MAX 0.5MAX 0.75MAX MAX Input value

Uniform Quantization Original values Output value 0 - 63 0 64 -127 1 MAX = 255 Original values Output value 0 - 63 0 64 -127 1 128 -191 2 192 - 255 3

Quantization: Example 2 level 3 level

Quantization in MATLAB Quantization is simply applying flooring function after division Input image matrix = x Number of output grayscales = n Quantized output: f = floor(double(x)/n);

Quantization in MATLAB: Method 1 Command Number of grayscales uint8(floor(double(x)/2)*2) 128 uint8(floor(double(x)/4)*4) 64 uint8(floor(double(x)/8)*8) 32 uint8(floor(double(x)/16)*16) 16 uint8(floor(double(x)/32)*32) 8 uint8(floor(double(x)/64)*64) 4 uint8(floor(double(x)/128)*128) 2

Quantization in MATLAB: Method 2 Command Number of grayscales imshow(grayslice(x,128),gray(128)) 128 imshow(grayslice(x,64),gray(64)) 64 imshow(grayslice(x,32),gray(32)) 32 imshow(grayslice(x,16),gray(16)) 16 imshow(grayslice(x,8),gray(8)) 8 imshow(grayslice(x,4),gray(4)) 4 imshow(grayslice(x,2),gray(2)) 2 grayslice produces a uint8 version of image x, gray(n) produces a color map of n values.