John Federici NJIT Physics Department

Slides:



Advertisements
Similar presentations
Laboratory of Image Processing Pier Luigi Mazzeo
Advertisements

A Digital Imaging Primer Nick Dvoracek Instructional Resources Center University of Wisconsin Oshkosh.
Chapter 14 Landsat 7 image of the retreating Malaspina Glacier, Alaska.
Digital Image Processing Lecture11: Histogram Processing.
Image Processing IB Paper 8 – Part A Ognjen Arandjelović Ognjen Arandjelović
MATLAB Week 3 17 November Outline Graphics – Basic plotting – Editing plots from GUI – Editing plots from m-file – Advanced plotting commands.
Graphics in the web Digital Media: Communication and Design
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
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.
MA/CS 3751 Fall 2002 Lecture 24. MA/CS 3752 ginput ginput is a Matlab function which takes one argument input: number of points to select in the image.
CS 376b Introduction to Computer Vision 02 / 08 / 2008 Instructor: Michael Eckmann.
Intelligent Vision Systems Image Geometry and Acquisition ENT 496 Ms. HEMA C.R. Lecture 2.
CS112 Scientific Computation Department of Computer Science Wellesley College Numb3rs Number and image types.
Image Representation. Digital Cameras Scanned Film & Photographs Digitized TV Signals Computer Graphics Radar & Sonar Medical Imaging Devices (X-Ray,
Digital Image Processing Lecture4: Fundamentals. Digital Image Representation An image can be defined as a two- dimensional function, f(x,y), where x.
Introduction to MATLAB Session 5 Simopekka Vänskä, THL 2010.
June 14, ‘99 COLORS IN MATLAB.
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.
Intelligent Vision Systems Image Geometry and Acquisition ENT 496 Ms. HEMA C.R. Lecture 2.
MA/CS375 Fall MA/CS 375 Fall 2002 Lecture 5.
Adobe Photoshop CS4 – Illustrated Unit A: Getting Started with Photoshop CS4.
An Introduction to Programming in Matlab Emily Blumenthal
EEE 242 Computer Tools for Electrical Engineering
How to use MATLAB (using M-files) Double click this icon To start Matlab 6.5.
Photoshop CS6 – Nelson Unit 3: Photoshop CS6. Objectives Define photo editing software Start Photoshop and view the workspace Use the Zoom tool and the.
CS112 Scientific Computation Department of Computer Science Wellesley College Kodak moments 3-D Visualization and Color.
CS112 Scientific Computation Department of Computer Science Wellesley College Kodak moments 3-D Visualization and Color.
Coin Recognition Using MATLAB - Emad Zaben - Bakir Hasanein - Mohammed Omar.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter.
Image Processing F34IMP lecture 1
Physics 114: Lecture 1 Overview of Class Intro to MATLAB
BITMAPPED IMAGES & VECTOR DRAWN GRAPHICS
CS 115: Computing for The Socio-Techno Web
Computer Application in Engineering Design
CNIT 131 Graphics.
(Project) by:- ROHAN HIMANSHU ANUP 70282
Unit 1 The History of Photography & The Camera
John Federici NJIT Physics Department
Getting Started with Adobe Photoshop CS6
Image Processing Objectives To understand pixel based image processing
Physics 114: Lecture 18 Least Squares Fit to 2D Data
Sampling, Quantization, Color Models & Indexed Color
Miguel Tavares Coimbra
Images In Matlab.
Physics 114: Lecture 17 More Fitting to Arbitrary Functions
Image Processing Digital image Fundamentals. Introduction to the course Grading – Project: 30% – Midterm Exam: 30% – Final Exam : 40% – Total: 100% –
Compression (of this 8-bit 397,000 pixel image):
Ch3 Graphics Overview of Plotting Editing Plots
OPSE 301: Lab13 Data Analysis – Fitting Data to Arbitrary Functions
Chapter I Digital Imaging Fundamentals
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Physics 114: Lecture 6 Measuring Noise in Real Data
Digital Image Fundamentals
Digital Image Processing using MATLAB
6th Lecture – Rectangles and Regions, and intro to Bitmap Images
Physics 114: Lecture 11 Error Analysis, Part II
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Matlab tutorial course
Digital Image Processing
Multimedia System Image
Fundamentals of Image Processing Digital Image Representation
MATLAB stands for MATrix LABoratory.
Lecture 2: Image filtering
Non-numeric Data Representation
VISUAL COMMUNICATION USING ADOBE PHOTOSHOP CREATIVE SUITE 5
Miguel Tavares Coimbra
WJEC GCSE Computer Science
Physical Problem of Simultaneous Linear Equations in Image Processing
DIGITAL IMAGE PROCESSING Elective 3 (5th Sem.)
Presentation transcript:

John Federici NJIT Physics Department Physics 114: Lecture 4 More MatLab Basic matrix/array operations for reading in data and for graphical output Image Data Cartoon and histograms Lecture04 APPLICATION: Write a basic MatLAB program to read in real data and make a plot John Federici NJIT Physics Department

Physics Cartoons

Data for Images HINT: Use ‘pathtool’ in command window to open path set dialog box You can IMPORT images for files in several ways Use IMPORT DATA tool and specify the file type to be an image (eg. JPEG) Use IMPORT DATA tool to create MATLAB code Use “imread” function IMdata=imread('Cartoon.jpg') Note that the data is imported as INTEGERS for the image. Why is the array of integers a 3D array with the ‘z’ dimension being 3 units for a color image? Display the image using ‘image()’ command >> IMdata=imread('Cartoon.jpg'); >> image(IMdata)

Data for Images Since images are just integers, we can create our own images by defining an array of numbers. In this example, we SCALE the colors so that each color represents a number >> C = [0 2 4 6; 8 10 12 14; 16 18 20 22]; imagesc(C) colorbar BUT, we can also create images on NON-integers >> [X,Y] = meshgrid(-2:.2:2); >> Z = X .* exp(-X.^2 - Y.^2); >> imagesc(Z) >> colorbar

Colormap R G B mymap = [0 0 0 ; 1 0 0 ; 0 1 0 ; 0 0 1 ; 1 1 1]; A colormap is matrix of values between 0 and 1 that define the colors for graphics objects such as surface, image, and patch objects. MATLAB draws the objects by mapping data values to colors in the colormap. Colormaps can be any length, but must be three columns wide. Each row in the matrix defines one color using an RGB triplet. An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range [0,1]. A value of 0 indicates no color and a value of 1 indicates full intensity. For example, this is a colormap with five colors: black, red, green, blue, and white. R G B mymap = [0 0 0 ; 1 0 0 ; 0 1 0 ; 0 0 1 ; 1 1 1];

Colormap EXAMPLES >> colormap summer >> imagesc(Z) >> colorbar >> colormap default >> imagesc(Z) >> colorbar >> mymap=[0 0 0 ; 1 0 0 ; 0 1 0 ; 0 0 1 ;1 1 1]; >> colormap(mymap) >> imagesc(Z) >> colorbar

Converting RGB to grayscale >> colormap gray(256) >> grayout=rgb2gray(IMdata); >> image(grayout) >> colorbar An aside: What does the x and y axis scale denote?

How to acquire Image data using your Laptop’s Webcam

Find your webcam among the Devices You will need to install an image adapter so that the your camera can be controlled via Matlab. Usually, the default winvideo adapter will work. Open Matlab And demonstrate Show export of data

Histograms >> z=randn(1000,1); >> % produce an array (1000 by 1) of Normal Distribution >> % ie. Gaussian distribution of random numbers >> nbins=25; % set # of bins to 25 >> h=histogram(z,nbins); >> xlabel('Value') >> ylabel('# of occurrances') NOTE: histogram ASSUMES that you have 1D data. If you have 2D data (eg. in image) and would like to have a histogram of ALL the data combines, you must first combine the 2D data into a 1D array. Use ‘reshape’ function

Histograms Nbin=40 Nbin=25 Note that the shape as well as # of occurrences will change when you change the # of bins (or equivalently, the WIDTH of each bin. Nbin=25 Nbin=40

Histograms h = Histogram with properties: Data: [1000x1 double] Number of bins, Bin limits, and Bin width are related. h = Histogram with properties: Data: [1000x1 double] Values: [1x25 double] NumBins: 25 BinEdges: [1x26 double] BinWidth: 0.2800 BinLimits: [-3.4000 3.6000] Normalization: 'count' FaceColor: 'auto' EdgeColor: [0 0 0]

Histograms Why does the histogram NOT look like a Gaussian distribution?

Histograms 100 samples 1000 samples 10000 samples Why does the histogram NOT look like a Gaussian distribution? 100 samples 1000 samples 10000 samples

Class Exercise: Simple processing of an image/ Histogram Use Matlab HELP or DOCUMENATION SEARCH as needed Create a MATLAB program which Reads in as an image the CARTOON which is posted with the lecture notes on the course web page. Convert the color image to grayscale and Plot the cartoon to make sure that it looks correct. Create a HISTOGRAM of the image pixel counts. Vary the number of bins in the histogram. Does the shape of the histogram appear to change? If you have time, use the camera on your laptop and MATLAB to take a picture of yourself and save the image as a grayscale. Create a histogram of the pixel counts of your image.

Preparation for HW #3 For Homework #3, you will prepare JOURNAL QUALITY figures from experimental data You will plot data from a Terahertz (THz) transmission measurement Visible Radio Microwave THZ Infrared UV X-rays 108 109 1010 1011 1012 1013 1014 1015 1016 1017 Frequency (Hz) 1 THz frequency = 300 m wavelength or 33 cm-1 or 4.1 meV or T = 48 K Also known as Far-Infrared or sub-millimeter

THz Transmission Measurement Think of THz pulses of radiation as similar to a Radar pulse Unlike many other light detectors, my THz system measures ELECTRIC field rather than POWER (~E2)

THz Transmission Measurement Think of THz pulses of radiation as similar to a Radar pulse

Download Data for HW#3 from Course Webpage 01/17/2007 14:38:41 Ver. 3.0 Long Scan Optical Delay 430.00 Delta X (ps) 0.033890 Sweeps 1 430.00000 -0.12766 430.03391 -0.12734 430.06778 -0.12652 430.10168 -0.12787 430.13556 -0.12689 430.16946 -0.12749 430.20334 -0.12704 430.23724 -0.12731 430.27112 -0.12632 Two lines of comments on experimental details Column data of THz Electric Field in Arbitrary Units Column data of time in picoseconds