Matlab for FMRI Module 2: BOLD signals, Matlab and the general linear model Instructor: Luis Hernandez-Garcia

Size: px
Start display at page:

Download "Matlab for FMRI Module 2: BOLD signals, Matlab and the general linear model Instructor: Luis Hernandez-Garcia"

Transcription

1 Matlab for FMRI Module 2: BOLD signals, Matlab and the general linear model Instructor: Luis Hernandez-Garcia The goal for this tutorial is to see how the statistics that we will be discussing in class can be implemented on your PC using Matlab. We are going to do a few simple exercises involving a few basic statistical concepts: distributions, t-tests, linear regression. Our hope is that seeing the guts of a statistical analysis program will give you a deeper understanding of the statistics that you will routinely perform in FMRI analysis. This will also be very helpful when you are trying to do your own customized analyses. More importantly, it will help you when things go wrong in a standard analysis and you need to roll up your sleeves and troubleshoot. In this tutorial, we re going to build a fake BOLD signal and then analyze it using linear regression in Matlab. This tutorial is a preview of the bulk of what you ll be seeing in the next week or two. You don t need to turn anything in, just read through this document and run the code that is provided. As you run through it, please ask an instructor or a classmate if anything doesn t make sense. Note: You will need to include SPM12 in your Matlab path!! 1. Noise Noise refers to the unwanted fluctuations of a signal. Sometimes they are random, other times they have a well defined structure. There are many sources of noise more to follow in lectures - and some of them cannot be avoided. Noise is the enemy, so let s have a look at it. In FMRI data, you ll see that the noise is a mix of Gaussian and auto-correlated noise within individual runs, and mostly Gaussian noise when you pool the results of individual subjects. The following script will generate three different types of noise with different characteristics: Gaussian, Uniform and Auto- Regressive. Before executing this code, read the HELP information in the randn and rand commands. Then, copy the following code into the Matlab editor and execute it a few times (the random samples should change each time). Npoints = 100; Gnoise = randn(npoints,1); subplot(321) plot(gnoise); title('gaussian noise') subplot(322) hist(gnoise,20); title('gaussian noise histogram'); Unoise = rand(npoints,1);

2 subplot(323) plot(unoise) title('uniform white noise'); subplot(324) hist(unoise,20); title('uniform white noise histogram'); % Now make auto-regressive noise Anoise = Gnoise; rho = 0.9; for n=2 : length(anoise) Anoise(n) = rho * Anoise(n-1) + Anoise(n); end subplot(325) plot(anoise) title('ar(1) noise'); subplot(326) hist(anoise,20); title('ar(1) noise histogram'); Next, increase the variable Npoints and execute it a few times. Do you notice the trends in the histograms? Finally, take that script and turn it into a function where you specify the number of samples (Npoints) as the input. Remember how to do that from the first tutorial? 2. A simple example: the T-test Matlab has a lot of statistical functions predefined so that you don t have to type in a lot of formulas when you want to analyze data. Let s look at a simple example to familiarize ourselves with Matlab s statistical functions. In this next exercise, we ll pretend we have two parameters that we measure over and over and we want to perform a t-test to see if there is a difference in the populations. As usual, there is some error in those measurements and it s not clear whether there is a difference between those two measurements. Use this code to generate 1000 measurements of two parameters ( truea and trueb ) with their associated random errors. figure(2) Npoints = 1000; truea = 5; trueb = 6; Gnoise = randn(npoints,1); dataa = truea + Gnoise; Gnoise = randn(npoints,1); datab = trueb + Gnoise; subplot(211) plot(dataa) hold on plot(datab,'r')

3 hold off We want to know if the difference between those parameters, so the thing to do is a paired t-test. Use this code to make the appropriate computations. [h, p, ci, stats] = ttest(dataa - datab) Now, let s pretend that the data points are matched and we want to perform a two-sample t-test: [h, p, ci, stats] = ttest(dataa, datab) Note the output and check the documentation to see what each item is (help ttest). Do you know what h, p, and ci stand for? Now use this code to display the results. subplot(212) hista = hist(dataa, 20); histb = hist(datab, 20); plot(hista); hold on; plot(histb,'r'); hold off legend('histogram of A', 'histogram of B') text(0.1,0.6,['degrees of freedom= ' num2str(stats.df)], 'Units','Normalized'); text(0.1,0.8,['t statistic =' num2str(stats.tstat)],'units','normalized'); text(0.1,0.7,['estimated Std. Dev. =', num2str(stats.sd)],'units','normalized'); text(0.1,0.5,['p-value =' num2str(p)],'units','normalized'); 3. Making models of the data The standard way of analyzing FMRI data consists of answering the question Does this pixel s time course look like my model of the time course? and then How about the next five thousand pixels? Do they fit too? In this exercise, we are going to learn how to make such a model of activation: a time course of the expected activation, based on what we know about the BOLD signals and our experimental conditions (such as onset times and durations). Later we ll see how to answer the question of whether the observed time course matches the expected time course. Use this code to create a time course: %% Creating a model of brain activity (BOLD) res = 100; % this is the number of samples per second: % (This sampling rate is not realistic, but it s OK for now) duration = 50; % seconds % create a canonical BOLD response hrf = spm_hrf( 1/res );

4 figure(4) subplot 311, plot(hrf),title('response to a single stimulus') This is what a single response looks like. It s purely based on observation, but it s consistent enough across people, so we use it as a canonical HRF. Read the HELP information for spm_hrf to find out more. % create a set of stimuli occurring at specific times % in the time series. First make an array of zeros, % then put ones where you want to have activity occur stim=zeros(duration*res,1); stim( 5*res:13*res:end ) =1; subplot 312, plot(stim),title('a set of stimuli at randomized times') % convolve the input and the HRF and clip out the end (empty) % first note what the convolution operation does resp = conv(stim, hrf); % Note the size s of the inputs and the outputs to the function: whos resp stim hrf % clip off the end of the response function and plot it resp = resp(1:length(stim)); resp = resp / max(resp); subplot 313, plot(resp),title('response to the whole set of stimuli') So that would be the BOLD signal due to a set of short bursts of activation. Typical experiments are a little bit more complicated, but not much. Let s make another example in which there are two processes going on. %%%%%%% res = 100; % this is the number of samples pre second - the temporal resolution % when creating the time course. We'll downsample it to match what the % scanner can really do later. duration = 200; % seconds % create a canonical BOLD response - impulse response function hrf = spm_hrf( 1/res ); % create two waveforms representing the activity of two mental processes stim1 =zeros(duration*res,1); stim1( 5*res:13*res:end ) =1; stim2 =zeros(duration*res,1); for n=8:10:duration-15 stim2( n*res : (n+4)*res ) =1; end figure(5) subplot(311) plot(stim1); hold on

5 axis([ 0 duration*res -1 2]) subplot(312) plot(stim2); hold on axis([ 0 duration*res -1 2]) title('two types of events') %Next we convolve the input and the HRF % first note what the convolution operation does resp1 = conv(stim1, hrf); resp2 = conv(stim2, hrf); % Note the size s of the inputs and the outputs to the function: whos resp stim hrf % remove the data at the end of the response function, so that it matches the size of the data, and normalize it resp1 = resp1(1:length(stim1)); resp1 = resp1 / max(resp1); resp2 = resp2(1:length(stim2)); resp2 = resp2 / max(resp2); subplot 311, plot(resp1,'r'),hold off title('event type 1') subplot 312, plot(resp2,'r'),hold off title('event Type 2') More realistically, the two processes will rarely have the same amplitude, but the observed signal will be a combination of the two processes with different amplitudes, something like this: % Now let's put these two things together into a single time course. % Each of the responses will have different amplitude - let's call that % beta beta2 = 0.5; beta1 = 1; beta0 = 10; % this will be the baseline signal % This is the simple way to construct a model: % you add the different components of the signal % weighted by some coefficient: y = beta0 + beta1 * resp1 + beta2*resp2; You ll note that there is an offset added to the signal (beta0). This is because there is always some baseline signal present. This is just the image intensity of the MRI image and is not related to brain activity. subplot(313) plot(y); title ('The whole signal ') That works really well, but if we write the same thing in terms of matrices, it makes the math easier down the line (trust me). Our job is to take the independent contributors to the signal and put them into a matrix as columns. Like this:

6 % General Linear Models: % The exact same thing written as a matrix operation % create a design matrix figure(6) x = [ones(size(resp1)) resp1 resp2]; imagesc(x); title('the General Linear Model') colormap gray Note the display of the design matrix. If it doesn t make sense to you, please ask an instructor. Next, we can create another matrix with the amplitudes of each contributor: % The amplitudes can also be lumped into another matrix. betas = [beta0 ; beta1 ; beta2]; That s all well and good, but this would be a good time to remember that our model so far is based on making about 100 measurements per second, which is crazy fast. More realistically, we ll get a measurement about every two seconds. Let s downsample the model like this: % Last Step: % let's downsample it to a more realistic acquisition rate for FMRI % Typically it's in the order of one image every two seconds x = x(1:2*res:end, :); imagesc(x), colormap gray title('glm sampled every two seconds') 4. Generate a realistic signal Now that we have a model, we can synthesize FMRI signals to experiment with. Let s make a signal that we can use later in order to learn how to carry out the analysis. %% Generate a quasi-realistic signal by adding noise to it figure(7) noise_level = 0.1; Npoints = size(x,1); Nregressors = size(x,2); Gnoise = randn(npoints,1); % multiply the design matrix by the appropriate coefficients % and add noise to it. y = x*betas + noise_level*gnoise; subplot(211) plot(y) title('an FMRI signal with Gaussian noise') Feel free to change the values of the betas and the noise level to get a sense for how those signals would look. How does it look when you add Autoregressive noise (see above)? 5. Estimation / linear regression

7 Suppose we have a model and we observe a signal. If we believe in our model, we would want to know how big the contribution of each element of that model to the signal is. The model is Y = Xb + e Then b = (X) -1 Y unfortunately, X is often not easily invertible, so we use the pseudo-inverse: ˆβ = (X T X) -1 X T Y In Matlab this goes like this (The function pinv() does the same as (X T X) -1 X T ): beta_hat = pinv(x)*y; If we want to know whether those betas are significant, we ll want to compare them to the noise the residual signal. The residual signal is what you have when you subtract your estimated signal from the original signal. If everything went perfectly, it should be just noise. Res = Y - X ˆβ Usually we want to know an estimate of the variance of this residual. We compute it like this: var_est = (y - x*beta_hat)'*(y - x*beta_hat) / (Npoints - Nregressors); The next step is to make some judgments about whatever combination of effects we re interested in. For example, was effect 2 bigger than effect 1 (in this pixel)?. One very useful way to ask the same question is: Is b 2 b 1 significantly bigger than 0? ( b 2 b 1 ) is the contrast between effects 1 and 2. When implementing this, you can say the same thing, but this time in matrix form by specifying the matrix C = [0-1 1] and doing this: % if we were only interested in looking at subsets of the model, ie - % compare amplitudes between regressors, we can "mask out" regressors % by using a contrast vector: con = [0-1 1]; % this lets us make quick estimates of the difference between the amplitude % of the second and third regressors: % the estimate of the contrast is this: betacon = (beta_hat' * con') ; You ll note that this last line is just calculating beta2 beta1. You can see if this difference is significant by comparing it to the residual variance, and evaluating a Test: % the estimate of the variance of that contrast is this: pinvx = pinv(x); % this is a temporary variable to save us some typing. vcon = con * pinvx * var_est * pinvx' * con' Finally, we can make some inference from these values. By its definition, a t-score is essentially a measure of how big an effect is, relative to the natural variability of the measurement, in other words: Tscore = (beta_hat' * con')./ sqrt(vcon)'

8 You have just learned the first step toward writing your own version of SPM!! 6. What if the data don t meet the assumptions: autoregressive noise The type of noise that you find in FMRI data is not quite white and Gaussian, but autoregressive most of the time. Let s see what that does to the analysis. We re not going to fix it here, but we re just going to see what it does. Anoise = Gnoise; rho = 0.9; for n=2 : length(anoise) Anoise(n) = rho * Anoise(n-1) + Anoise(n); end y = x*betas + noise_level*anoise; subplot(212) plot(y) title('an FMRI signal with AR noise') Let s re-do the same analysis as before. The parameter rho determines how much autocorrelation there is in the data, so change that parameter a few times and rerun the following code. beta_hat = pinv(x)*y; var_est = (y - x*beta_hat)'*(y - x*beta_hat) / (Npoints - Nregressors); con = [0-1 1]; betacon = (beta_hat' * con') ; pinvx = pinv(x); vcon = con * pinvx * var_est * pinvx' * con'; Tscore = (beta_hat' * con')./ sqrt(vcon)'; What do you observe? How do the different estimates of the parameters and the noise change (beta_hat and vcon)? What about the T-score? What if you increase the noise level? We will stop here for today and continue tomorrow to analyze a whole brain. Please make sure that this Matlab code is fairly transparent to you. Otherwise, please ask for help.

First-level fmri modeling. UCLA Advanced NeuroImaging Summer School, 2010

First-level fmri modeling. UCLA Advanced NeuroImaging Summer School, 2010 First-level fmri modeling UCLA Advanced NeuroImaging Summer School, 2010 Task on Goal in fmri analysis Find voxels with BOLD time series that look like this Delay of BOLD response Voxel with signal Voxel

More information

(i) Understanding the basic concepts of signal modeling, correlation, maximum likelihood estimation, least squares and iterative numerical methods

(i) Understanding the basic concepts of signal modeling, correlation, maximum likelihood estimation, least squares and iterative numerical methods Tools and Applications Chapter Intended Learning Outcomes: (i) Understanding the basic concepts of signal modeling, correlation, maximum likelihood estimation, least squares and iterative numerical methods

More information

Wireless Communication Systems Laboratory Lab#1: An introduction to basic digital baseband communication through MATLAB simulation Objective

Wireless Communication Systems Laboratory Lab#1: An introduction to basic digital baseband communication through MATLAB simulation Objective Wireless Communication Systems Laboratory Lab#1: An introduction to basic digital baseband communication through MATLAB simulation Objective The objective is to teach students a basic digital communication

More information

Methods. Experimental Stimuli: We selected 24 animals, 24 tools, and 24

Methods. Experimental Stimuli: We selected 24 animals, 24 tools, and 24 Methods Experimental Stimuli: We selected 24 animals, 24 tools, and 24 nonmanipulable object concepts following the criteria described in a previous study. For each item, a black and white grayscale photo

More information

Supplementary Material

Supplementary Material Supplementary Material Orthogonal representation of sound dimensions in the primate midbrain Simon Baumann, Timothy D. Griffiths, Li Sun, Christopher I. Petkov, Alex Thiele & Adrian Rees Methods: Animals

More information

PHYSIOLOGICAL DE-NOISING FMRI DATA. Katie Dickerson & Jeff MacInnes February 11th, 2013

PHYSIOLOGICAL DE-NOISING FMRI DATA. Katie Dickerson & Jeff MacInnes February 11th, 2013 PHYSIOLOGICAL DE-NOISING FMRI DATA Katie Dickerson & Jeff MacInnes February 11th, 2013 OUTLINE OUTLINE Theoretical overview OUTLINE Theoretical overview OUTLINE Theoretical overview Tutorial in FSL OVERVIEW

More information

Noise Measurements Using a Teledyne LeCroy Oscilloscope

Noise Measurements Using a Teledyne LeCroy Oscilloscope Noise Measurements Using a Teledyne LeCroy Oscilloscope TECHNICAL BRIEF January 9, 2013 Summary Random noise arises from every electronic component comprising your circuits. The analysis of random electrical

More information

MATLAB for time series analysis! e.g. M/EEG, ERP, ECG, EMG, fmri or anything else that shows variation over time! Written by!

MATLAB for time series analysis! e.g. M/EEG, ERP, ECG, EMG, fmri or anything else that shows variation over time! Written by! MATLAB for time series analysis e.g. M/EEG, ERP, ECG, EMG, fmri or anything else that shows variation over time Written by Joe Bathelt, MSc PhD candidate Developmental Cognitive Neuroscience Unit UCL Institute

More information

UNIVERSITY OF UTAH ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT

UNIVERSITY OF UTAH ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT UNIVERSITY OF UTAH ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT ECE1020 COMPUTING ASSIGNMENT 3 N. E. COTTER MATLAB ARRAYS: RECEIVED SIGNALS PLUS NOISE READING Matlab Student Version: learning Matlab

More information

Create A Starry Night Sky In Photoshop

Create A Starry Night Sky In Photoshop Create A Starry Night Sky In Photoshop Written by Steve Patterson. In this Photoshop effects tutorial, we ll learn how to easily add a star-filled sky to a night time photo. I ll be using Photoshop CS5

More information

Non Linear Image Enhancement

Non Linear Image Enhancement Non Linear Image Enhancement SAIYAM TAKKAR Jaypee University of information technology, 2013 SIMANDEEP SINGH Jaypee University of information technology, 2013 Abstract An image enhancement algorithm based

More information

muse Capstone Course: Wireless Sensor Networks

muse Capstone Course: Wireless Sensor Networks muse Capstone Course: Wireless Sensor Networks Experiment for WCC: Channel and Antenna Characterization Objectives 1. Get familiar with the TI CC2500 single-chip transceiver. 2. Learn how the MSP430 MCU

More information

Lane Detection in Automotive

Lane Detection in Automotive Lane Detection in Automotive Contents Introduction... 2 Image Processing... 2 Reading an image... 3 RGB to Gray... 3 Mean and Gaussian filtering... 5 Defining our Region of Interest... 6 BirdsEyeView Transformation...

More information

Image restoration and color image processing

Image restoration and color image processing 1 Enabling Technologies for Sports (5XSF0) Image restoration and color image processing Sveta Zinger ( s.zinger@tue.nl ) What is image restoration? 2 Reconstructing or recovering an image that has been

More information

Brief Introduction to Vision and Images

Brief Introduction to Vision and Images Brief Introduction to Vision and Images Charles S. Tritt, Ph.D. January 24, 2012 Version 1.1 Structure of the Retina There is only one kind of rod. Rods are very sensitive and used mainly in dim light.

More information

EE 215 Semester Project SPECTRAL ANALYSIS USING FOURIER TRANSFORM

EE 215 Semester Project SPECTRAL ANALYSIS USING FOURIER TRANSFORM EE 215 Semester Project SPECTRAL ANALYSIS USING FOURIER TRANSFORM Department of Electrical and Computer Engineering Missouri University of Science and Technology Page 1 Table of Contents Introduction...Page

More information

Statistics 101: Section L Laboratory 10

Statistics 101: Section L Laboratory 10 Statistics 101: Section L Laboratory 10 This lab looks at the sampling distribution of the sample proportion pˆ and probabilities associated with sampling from a population with a categorical variable.

More information

USE OF BASIC ELECTRONIC MEASURING INSTRUMENTS Part II, & ANALYSIS OF MEASUREMENT ERROR 1

USE OF BASIC ELECTRONIC MEASURING INSTRUMENTS Part II, & ANALYSIS OF MEASUREMENT ERROR 1 EE 241 Experiment #3: USE OF BASIC ELECTRONIC MEASURING INSTRUMENTS Part II, & ANALYSIS OF MEASUREMENT ERROR 1 PURPOSE: To become familiar with additional the instruments in the laboratory. To become aware

More information

Matlab for CS6320 Beginners

Matlab for CS6320 Beginners Matlab for CS6320 Beginners Basics: Starting Matlab o CADE Lab remote access o Student version on your own computer Change the Current Folder to the directory where your programs, images, etc. will be

More information

a. Use (at least) window lengths of 256, 1024, and 4096 samples to compute the average spectrum using a window overlap of 0.5.

a. Use (at least) window lengths of 256, 1024, and 4096 samples to compute the average spectrum using a window overlap of 0.5. 1. Download the file signal.mat from the website. This is continuous 10 second recording of a signal sampled at 1 khz. Assume the noise is ergodic in time and that it is white. I used the MATLAB Signal

More information

Permutation inference for the General Linear Model

Permutation inference for the General Linear Model Permutation inference for the General Linear Model Anderson M. Winkler fmrib Analysis Group 3.Sep.25 Winkler Permutation for the glm / 63 in jalapeno: winkler/bin/palm Winkler Permutation for the glm 2

More information

Computer Vision & Digital Image Processing

Computer Vision & Digital Image Processing Computer Vision & Digital Image Processing MATLAB for Image Processing Dr. D. J. Jackson Lecture 4- Matlab introduction Basic MATLAB commands MATLAB windows Reading images Displaying images image() colormap()

More information

Princeton ELE 201, Spring 2014 Laboratory No. 2 Shazam

Princeton ELE 201, Spring 2014 Laboratory No. 2 Shazam Princeton ELE 201, Spring 2014 Laboratory No. 2 Shazam 1 Background In this lab we will begin to code a Shazam-like program to identify a short clip of music using a database of songs. The basic procedure

More information

Sampling distributions and the Central Limit Theorem

Sampling distributions and the Central Limit Theorem Sampling distributions and the Central Limit Theorem Johan A. Elkink University College Dublin 14 October 2013 Johan A. Elkink (UCD) Central Limit Theorem 14 October 2013 1 / 29 Outline 1 Sampling 2 Statistical

More information

Signal segmentation and waveform characterization. Biosignal processing, S Autumn 2012

Signal segmentation and waveform characterization. Biosignal processing, S Autumn 2012 Signal segmentation and waveform characterization Biosignal processing, 5173S Autumn 01 Short-time analysis of signals Signal statistics may vary in time: nonstationary how to compute signal characterizations?

More information

! Multi-Rate Filter Banks (con t) ! Data Converters. " Anti-aliasing " ADC. " Practical DAC. ! Noise Shaping

! Multi-Rate Filter Banks (con t) ! Data Converters.  Anti-aliasing  ADC.  Practical DAC. ! Noise Shaping Lecture Outline ESE 531: Digital Signal Processing! (con t)! Data Converters Lec 11: February 16th, 2017 Data Converters, Noise Shaping " Anti-aliasing " ADC " Quantization "! Noise Shaping 2! Use filter

More information

ELT Receiver Architectures and Signal Processing Fall Mandatory homework exercises

ELT Receiver Architectures and Signal Processing Fall Mandatory homework exercises ELT-44006 Receiver Architectures and Signal Processing Fall 2014 1 Mandatory homework exercises - Individual solutions to be returned to Markku Renfors by email or in paper format. - Solutions are expected

More information

Do It Yourself 3. Speckle filtering

Do It Yourself 3. Speckle filtering Do It Yourself 3 Speckle filtering The objectives of this third Do It Yourself concern the filtering of speckle in POLSAR images and its impact on data statistics. 1. SINGLE LOOK DATA STATISTICS 1.1 Data

More information

Digital Image Processing. Digital Image Fundamentals II 12 th June, 2017

Digital Image Processing. Digital Image Fundamentals II 12 th June, 2017 Digital Image Processing Digital Image Fundamentals II 12 th June, 2017 Image Enhancement Image Enhancement Types of Image Enhancement Operations Neighborhood Operations on Images Spatial Filtering Filtering

More information

Midterm is on Thursday!

Midterm is on Thursday! Midterm is on Thursday! Project presentations are May 17th, 22nd and 24th Next week there is a strike on campus. Class is therefore cancelled on Tuesday. Please work on your presentations instead! REVIEW

More information

The Use of Non-Local Means to Reduce Image Noise

The Use of Non-Local Means to Reduce Image Noise The Use of Non-Local Means to Reduce Image Noise By Chimba Chundu, Danny Bin, and Jackelyn Ferman ABSTRACT Digital images, such as those produced from digital cameras, suffer from random noise that is

More information

Detection, Interpolation and Cancellation Algorithms for GSM burst Removal for Forensic Audio

Detection, Interpolation and Cancellation Algorithms for GSM burst Removal for Forensic Audio >Bitzer and Rademacher (Paper Nr. 21)< 1 Detection, Interpolation and Cancellation Algorithms for GSM burst Removal for Forensic Audio Joerg Bitzer and Jan Rademacher Abstract One increasing problem for

More information

CS/NEUR125 Brains, Minds, and Machines. Due: Wednesday, February 8

CS/NEUR125 Brains, Minds, and Machines. Due: Wednesday, February 8 CS/NEUR125 Brains, Minds, and Machines Lab 2: Human Face Recognition and Holistic Processing Due: Wednesday, February 8 This lab explores our ability to recognize familiar and unfamiliar faces, and the

More information

PHOTOSHOP PUZZLE EFFECT

PHOTOSHOP PUZZLE EFFECT PHOTOSHOP PUZZLE EFFECT In this Photoshop tutorial, we re going to look at how to easily create a puzzle effect, allowing us to turn any photo into a jigsaw puzzle! Or at least, we ll be creating the illusion

More information

Lane Detection in Automotive

Lane Detection in Automotive Lane Detection in Automotive Contents Introduction... 2 Image Processing... 2 Reading an image... 3 RGB to Gray... 3 Mean and Gaussian filtering... 6 Defining our Region of Interest... 10 BirdsEyeView

More information

Additive Synthesis OBJECTIVES BACKGROUND

Additive Synthesis OBJECTIVES BACKGROUND Additive Synthesis SIGNALS & SYSTEMS IN MUSIC CREATED BY P. MEASE, 2011 OBJECTIVES In this lab, you will construct your very first synthesizer using only pure sinusoids! This will give you firsthand experience

More information

Construction of SARIMAXmodels

Construction of SARIMAXmodels SYSTEMS ANALYSIS LABORATORY Construction of SARIMAXmodels using MATLAB Mat-2.4108 Independent research projects in applied mathematics Antti Savelainen, 63220J 9/25/2009 Contents 1 Introduction...3 2 Existing

More information

CAP 5415 Computer Vision. Marshall Tappen Fall Lecture 1

CAP 5415 Computer Vision. Marshall Tappen Fall Lecture 1 CAP 5415 Computer Vision Marshall Tappen Fall 21 Lecture 1 Welcome! About Me Interested in Machine Vision and Machine Learning Happy to chat with you at almost any time May want to e-mail me first Office

More information

Chapter 4 SPEECH ENHANCEMENT

Chapter 4 SPEECH ENHANCEMENT 44 Chapter 4 SPEECH ENHANCEMENT 4.1 INTRODUCTION: Enhancement is defined as improvement in the value or Quality of something. Speech enhancement is defined as the improvement in intelligibility and/or

More information

MATLAB 6.5 Image Processing Toolbox Tutorial

MATLAB 6.5 Image Processing Toolbox Tutorial MATLAB 6.5 Image Processing Toolbox Tutorial The purpose of this tutorial is to gain familiarity with MATLAB s Image Processing Toolbox. This tutorial does not contain all of the functions available in

More information

When scanning 3 D objects, open or remove the lid of the scanner, depending on your scanner and/or preferences, either way is fine.

When scanning 3 D objects, open or remove the lid of the scanner, depending on your scanner and/or preferences, either way is fine. The first day that someone accidentally photocopied their hand while trying to copy a document it became inevitable that people would start using copiers and other equipment intended for flat surfaces

More information

MITOCW watch?v=zkcj6jrhgy8

MITOCW watch?v=zkcj6jrhgy8 MITOCW watch?v=zkcj6jrhgy8 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

Reference Manual SPECTRUM. Signal Processing for Experimental Chemistry Teaching and Research / University of Maryland

Reference Manual SPECTRUM. Signal Processing for Experimental Chemistry Teaching and Research / University of Maryland Reference Manual SPECTRUM Signal Processing for Experimental Chemistry Teaching and Research / University of Maryland Version 1.1, Dec, 1990. 1988, 1989 T. C. O Haver The File Menu New Generates synthetic

More information

Beyond Blind Averaging Analyzing Event-Related Brain Dynamics

Beyond Blind Averaging Analyzing Event-Related Brain Dynamics Beyond Blind Averaging Analyzing Event-Related Brain Dynamics Scott Makeig Swartz Center for Computational Neuroscience Institute for Neural Computation University of California San Diego La Jolla, CA

More information

ITEC 2600 Introduction to Analytical Programming. Instructor: Prof. Z. Yang Office: DB3049

ITEC 2600 Introduction to Analytical Programming. Instructor: Prof. Z. Yang Office: DB3049 ITEC 2600 Introduction to Analytical Programming Instructor: Prof. Z. Yang Office: DB3049 Lecture Eleven Monte Carlo Simulation Monte Carlo Simulation Monte Carlo simulation is a computerized mathematical

More information

Female Height. Height (inches)

Female Height. Height (inches) Math 111 Normal distribution NAME: Consider the histogram detailing female height. The mean is 6 and the standard deviation is 2.. We will use it to introduce and practice the ideas of normal distributions.

More information

Signal Processing for Digitizers

Signal Processing for Digitizers Signal Processing for Digitizers Modular digitizers allow accurate, high resolution data acquisition that can be quickly transferred to a host computer. Signal processing functions, applied in the digitizer

More information

Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Fall Semester, Introduction to EECS 2

Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Fall Semester, Introduction to EECS 2 Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Fall Semester, 2006 6.082 Introduction to EECS 2 Lab #2: Time-Frequency Analysis Goal:... 3 Instructions:... 3

More information

Your texture pattern may be slightly different, but should now resemble the sample shown here to the right.

Your texture pattern may be slightly different, but should now resemble the sample shown here to the right. YOU RE BUSTED! For this project you are going to make a statue of your bust. First you will need to have a classmate take your picture, or use the built in computer camera. The statue you re going to make

More information

(Notice that the mean doesn t have to be a whole number and isn t normally part of the original set of data.)

(Notice that the mean doesn t have to be a whole number and isn t normally part of the original set of data.) One-Variable Statistics Descriptive statistics that analyze one characteristic of one sample Where s the middle? How spread out is it? Where do different pieces of data compare? To find 1-variable statistics

More information

Blend Photos With Apply Image In Photoshop

Blend Photos With Apply Image In Photoshop Blend Photos With Apply Image In Photoshop Written by Steve Patterson. In this Photoshop tutorial, we re going to learn how easy it is to blend photostogether using Photoshop s Apply Image command to give

More information

9.1. Probability and Statistics

9.1. Probability and Statistics 9. Probability and Statistics Measured signals exhibit deterministic (predictable) and random (unpredictable) behavior. The deterministic behavior is often governed by a differential equation, while the

More information

Real Time Deconvolution of In-Vivo Ultrasound Images

Real Time Deconvolution of In-Vivo Ultrasound Images Paper presented at the IEEE International Ultrasonics Symposium, Prague, Czech Republic, 3: Real Time Deconvolution of In-Vivo Ultrasound Images Jørgen Arendt Jensen Center for Fast Ultrasound Imaging,

More information

Image analysis. CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror

Image analysis. CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror Image analysis CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror 1 Outline Images in molecular and cellular biology Reducing image noise Mean and Gaussian filters Frequency domain interpretation

More information

Digital Image Processing

Digital Image Processing Digital Image Processing Lecture # 5 Image Enhancement in Spatial Domain- I ALI JAVED Lecturer SOFTWARE ENGINEERING DEPARTMENT U.E.T TAXILA Email:: ali.javed@uettaxila.edu.pk Office Room #:: 7 Presentation

More information

BIO 365L Neurobiology Laboratory. Training Exercise 1: Introduction to the Computer Software: DataPro

BIO 365L Neurobiology Laboratory. Training Exercise 1: Introduction to the Computer Software: DataPro BIO 365L Neurobiology Laboratory Training Exercise 1: Introduction to the Computer Software: DataPro 1. Don t Panic. When you run DataPro, you will see a large number of windows, buttons, and boxes. In

More information

Study guide for Graduate Computer Vision

Study guide for Graduate Computer Vision Study guide for Graduate Computer Vision Erik G. Learned-Miller Department of Computer Science University of Massachusetts, Amherst Amherst, MA 01003 November 23, 2011 Abstract 1 1. Know Bayes rule. What

More information

Swedish College of Engineering and Technology Rahim Yar Khan

Swedish College of Engineering and Technology Rahim Yar Khan PRACTICAL WORK BOOK Telecommunication Systems and Applications (TL-424) Name: Roll No.: Batch: Semester: Department: Swedish College of Engineering and Technology Rahim Yar Khan Introduction Telecommunication

More information

Noise and Restoration of Images

Noise and Restoration of Images Noise and Restoration of Images Dr. Praveen Sankaran Department of ECE NIT Calicut February 24, 2013 Winter 2013 February 24, 2013 1 / 35 Outline 1 Noise Models 2 Restoration from Noise Degradation 3 Estimation

More information

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar Biomedical Signals Signals and Images in Medicine Dr Nabeel Anwar Noise Removal: Time Domain Techniques 1. Synchronized Averaging (covered in lecture 1) 2. Moving Average Filters (today s topic) 3. Derivative

More information

School Based Projects

School Based Projects Welcome to the Week One lesson. School Based Projects Who is this lesson for? If you're a high school, university or college student, or you're taking a well defined course, maybe you're going to your

More information

Chapter 19- Working With Nodes

Chapter 19- Working With Nodes Nodes are relatively new to Blender and open the door to new rendering and postproduction possibilities. Nodes are used as a way to add effects to your materials and renders in the final output. Nodes

More information

A Study of Slanted-Edge MTF Stability and Repeatability

A Study of Slanted-Edge MTF Stability and Repeatability A Study of Slanted-Edge MTF Stability and Repeatability Jackson K.M. Roland Imatest LLC, 2995 Wilderness Place Suite 103, Boulder, CO, USA ABSTRACT The slanted-edge method of measuring the spatial frequency

More information

Photoshop Weather Effects Rain

Photoshop Weather Effects Rain Photoshop Weather Effects Rain In this photo effects tutorial, we ll learn how to add a simple yet convincing rain effect to a photo, a great way to add mood and atmosphere, without getting your camera

More information

Grayscale and Resolution Tradeoffs in Photographic Image Quality. Joyce E. Farrell Hewlett Packard Laboratories, Palo Alto, CA

Grayscale and Resolution Tradeoffs in Photographic Image Quality. Joyce E. Farrell Hewlett Packard Laboratories, Palo Alto, CA Grayscale and Resolution Tradeoffs in Photographic Image Quality Joyce E. Farrell Hewlett Packard Laboratories, Palo Alto, CA 94304 Abstract This paper summarizes the results of a visual psychophysical

More information

CHM 152 Lab 1: Plotting with Excel updated: May 2011

CHM 152 Lab 1: Plotting with Excel updated: May 2011 CHM 152 Lab 1: Plotting with Excel updated: May 2011 Introduction In this course, many of our labs will involve plotting data. While many students are nerds already quite proficient at using Excel to plot

More information

Physics 2310 Lab #5: Thin Lenses and Concave Mirrors Dr. Michael Pierce (Univ. of Wyoming)

Physics 2310 Lab #5: Thin Lenses and Concave Mirrors Dr. Michael Pierce (Univ. of Wyoming) Physics 2310 Lab #5: Thin Lenses and Concave Mirrors Dr. Michael Pierce (Univ. of Wyoming) Purpose: The purpose of this lab is to introduce students to some of the properties of thin lenses and mirrors.

More information

Transforming Your Photographs with Photoshop

Transforming Your Photographs with Photoshop Transforming Your Photographs with Photoshop Jesús Ramirez PhotoshopTrainingChannel.com Contents Introduction 2 About the Instructor 2 Lab Project Files 2 Lab Objectives 2 Lab Description 2 Removing Distracting

More information

STATISTICAL THINKING IN THE KITCHEN: SAMPLES, POPULATIONS, SAMPLE SIZE, AND REPRESENTATIVENESS 1

STATISTICAL THINKING IN THE KITCHEN: SAMPLES, POPULATIONS, SAMPLE SIZE, AND REPRESENTATIVENESS 1 Kitchen Inquiry Series 1 Feb 2010 STATISTICAL THINKING IN THE KITCHEN: SAMPLES, POPULATIONS, SAMPLE SIZE, AND REPRESENTATIVENESS 1 K. P. Mohanan (1 Feb 2010) PART I Some of my scientist friends were meeting

More information

University of Washington Department of Electrical Engineering Computer Speech Processing EE516 Winter 2005

University of Washington Department of Electrical Engineering Computer Speech Processing EE516 Winter 2005 University of Washington Department of Electrical Engineering Computer Speech Processing EE516 Winter 2005 Lecture 5 Slides Jan 26 th, 2005 Outline of Today s Lecture Announcements Filter-bank analysis

More information

The Noise about Noise

The Noise about Noise The Noise about Noise I have found that few topics in astrophotography cause as much confusion as noise and proper exposure. In this column I will attempt to present some of the theory that goes into determining

More information

02/02/10. Image Filtering. Computer Vision CS 543 / ECE 549 University of Illinois. Derek Hoiem

02/02/10. Image Filtering. Computer Vision CS 543 / ECE 549 University of Illinois. Derek Hoiem 2/2/ Image Filtering Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem Questions about HW? Questions about class? Room change starting thursday: Everitt 63, same time Key ideas from last

More information

EE 168 Handout # Introduction to Digital Image Processing February 5, 2012 HOMEWORK 3 SOLUTIONS

EE 168 Handout # Introduction to Digital Image Processing February 5, 2012 HOMEWORK 3 SOLUTIONS EE 168 Handout # Introduction to Digital Image Processing February 5, 212 HOMEWORK 3 SOLUTIONS Problem 1 and 2: Image Stretching Using the approach from the lecture notes, an image with mean m 1 and standard

More information

EE 435/535: Error Correcting Codes Project 1, Fall 2009: Extended Hamming Code. 1 Introduction. 2 Extended Hamming Code: Encoding. 1.

EE 435/535: Error Correcting Codes Project 1, Fall 2009: Extended Hamming Code. 1 Introduction. 2 Extended Hamming Code: Encoding. 1. EE 435/535: Error Correcting Codes Project 1, Fall 2009: Extended Hamming Code Project #1 is due on Tuesday, October 6, 2009, in class. You may turn the project report in early. Late projects are accepted

More information

System Identification and CDMA Communication

System Identification and CDMA Communication System Identification and CDMA Communication A (partial) sample report by Nathan A. Goodman Abstract This (sample) report describes theory and simulations associated with a class project on system identification

More information

Electrical & Computer Engineering Technology

Electrical & Computer Engineering Technology Electrical & Computer Engineering Technology EET 419C Digital Signal Processing Laboratory Experiments by Masood Ejaz Experiment # 1 Quantization of Analog Signals and Calculation of Quantized noise Objective:

More information

Image Deblurring. This chapter describes how to deblur an image using the toolbox deblurring functions.

Image Deblurring. This chapter describes how to deblur an image using the toolbox deblurring functions. 12 Image Deblurring This chapter describes how to deblur an image using the toolbox deblurring functions. Understanding Deblurring (p. 12-2) Using the Deblurring Functions (p. 12-5) Avoiding Ringing in

More information

CoE4TN4 Image Processing. Chapter 3: Intensity Transformation and Spatial Filtering

CoE4TN4 Image Processing. Chapter 3: Intensity Transformation and Spatial Filtering CoE4TN4 Image Processing Chapter 3: Intensity Transformation and Spatial Filtering Image Enhancement Enhancement techniques: to process an image so that the result is more suitable than the original image

More information

Image Filtering. Reading Today s Lecture. Reading for Next Time. What would be the result? Some Questions from Last Lecture

Image Filtering. Reading Today s Lecture. Reading for Next Time. What would be the result? Some Questions from Last Lecture Image Filtering HCI/ComS 575X: Computational Perception Instructor: Alexander Stoytchev http://www.cs.iastate.edu/~alex/classes/2007_spring_575x/ January 24, 2007 HCI/ComS 575X: Computational Perception

More information

Analyzing Data Properties using Statistical Sampling Techniques

Analyzing Data Properties using Statistical Sampling Techniques Analyzing Data Properties using Statistical Sampling Techniques Illustrated on Scientific File Formats and Compression Features Julian M. Kunkel kunkel@dkrz.de 2016-06-21 Outline 1 Introduction 2 Exploring

More information

Clipping Masks And Type Placing An Image In Text With Photoshop

Clipping Masks And Type Placing An Image In Text With Photoshop Clipping Masks And Type Placing An Image In Text With Photoshop Written by Steve Patterson. In a previous tutorial, we learned the basics and essentials of using clipping masks in Photoshop to hide unwanted

More information

How can it be right when it feels so wrong? Outliers, diagnostics, non-constant variance

How can it be right when it feels so wrong? Outliers, diagnostics, non-constant variance How can it be right when it feels so wrong? Outliers, diagnostics, non-constant variance D. Alex Hughes November 19, 2014 D. Alex Hughes Problems? November 19, 2014 1 / 61 1 Outliers Generally Residual

More information

Data Analysis in MATLAB Lab 1: The speed limit of the nervous system (comparative conduction velocity)

Data Analysis in MATLAB Lab 1: The speed limit of the nervous system (comparative conduction velocity) Data Analysis in MATLAB Lab 1: The speed limit of the nervous system (comparative conduction velocity) Importing Data into MATLAB Change your Current Folder to the folder where your data is located. Import

More information

Efficacy of Wavelet Transform Techniques for. Denoising Polarized Target NMR Signals

Efficacy of Wavelet Transform Techniques for. Denoising Polarized Target NMR Signals Efficacy of Wavelet Transform Techniques for Denoising Polarized Target NMR Signals James Maxwell May 2, 24 Abstract Under the guidance of Dr. Donal Day, mathematical techniques known as Wavelet Transforms

More information

Introduction to Image Analysis with

Introduction to Image Analysis with Introduction to Image Analysis with PLEASE ENSURE FIJI IS INSTALLED CORRECTLY! WHAT DO WE HOPE TO ACHIEVE? Specifically, the workshop will cover the following topics: 1. Opening images with Bioformats

More information

Statistics, Probability and Noise

Statistics, Probability and Noise Statistics, Probability and Noise Claudia Feregrino-Uribe & Alicia Morales-Reyes Original material: Rene Cumplido Autumn 2015, CCC-INAOE Contents Signal and graph terminology Mean and standard deviation

More information

Image Processing for feature extraction

Image Processing for feature extraction Image Processing for feature extraction 1 Outline Rationale for image pre-processing Gray-scale transformations Geometric transformations Local preprocessing Reading: Sonka et al 5.1, 5.2, 5.3 2 Image

More information

Image Processing Tutorial Basic Concepts

Image Processing Tutorial Basic Concepts Image Processing Tutorial Basic Concepts CCDWare Publishing http://www.ccdware.com 2005 CCDWare Publishing Table of Contents Introduction... 3 Starting CCDStack... 4 Creating Calibration Frames... 5 Create

More information

fmri design efficiency

fmri design efficiency fmri design efficiency Aim: to design experiments maximising the power of detecting real effects. (That is, avoid type-ii errors, a.k.a misses ). -------------- Hard Constraints: - total duration of acquisition

More information

Experiment 1 Introduction to MATLAB and Simulink

Experiment 1 Introduction to MATLAB and Simulink Experiment 1 Introduction to MATLAB and Simulink INTRODUCTION MATLAB s Simulink is a powerful modeling tool capable of simulating complex digital communications systems under realistic conditions. It includes

More information

PixInsight Workflow. Revision 1.2 March 2017

PixInsight Workflow. Revision 1.2 March 2017 Revision 1.2 March 2017 Contents 1... 1 1.1 Calibration Workflow... 2 1.2 Create Master Calibration Frames... 3 1.2.1 Create Master Dark & Bias... 3 1.2.2 Create Master Flat... 5 1.3 Calibration... 8

More information

Remote Sensing 4113 Lab 08: Filtering and Principal Components Mar. 28, 2018

Remote Sensing 4113 Lab 08: Filtering and Principal Components Mar. 28, 2018 Remote Sensing 4113 Lab 08: Filtering and Principal Components Mar. 28, 2018 In this lab we will explore Filtering and Principal Components analysis. We will again use the Aster data of the Como Bluffs

More information

DSP First Lab 06: Digital Images: A/D and D/A

DSP First Lab 06: Digital Images: A/D and D/A DSP First Lab 06: Digital Images: A/D and D/A Pre-Lab and Warm-Up: You should read at least the Pre-Lab and Warm-up sections of this lab assignment and go over all exercises in the Pre-Lab section before

More information

Image analysis. CS/CME/BIOPHYS/BMI 279 Fall 2015 Ron Dror

Image analysis. CS/CME/BIOPHYS/BMI 279 Fall 2015 Ron Dror Image analysis CS/CME/BIOPHYS/BMI 279 Fall 2015 Ron Dror A two- dimensional image can be described as a function of two variables f(x,y). For a grayscale image, the value of f(x,y) specifies the brightness

More information

Department of Statistics and Operations Research Undergraduate Programmes

Department of Statistics and Operations Research Undergraduate Programmes Department of Statistics and Operations Research Undergraduate Programmes OPERATIONS RESEARCH YEAR LEVEL 2 INTRODUCTION TO LINEAR PROGRAMMING SSOA021 Linear Programming Model: Formulation of an LP model;

More information

Detection and Verification of Missing Components in SMD using AOI Techniques

Detection and Verification of Missing Components in SMD using AOI Techniques , pp.13-22 http://dx.doi.org/10.14257/ijcg.2016.7.2.02 Detection and Verification of Missing Components in SMD using AOI Techniques Sharat Chandra Bhardwaj Graphic Era University, India bhardwaj.sharat@gmail.com

More information

Table of contents. Vision industrielle 2002/2003. Local and semi-local smoothing. Linear noise filtering: example. Convolution: introduction

Table of contents. Vision industrielle 2002/2003. Local and semi-local smoothing. Linear noise filtering: example. Convolution: introduction Table of contents Vision industrielle 2002/2003 Session - Image Processing Département Génie Productique INSA de Lyon Christian Wolf wolf@rfv.insa-lyon.fr Introduction Motivation, human vision, history,

More information

ImagesPlus Basic Interface Operation

ImagesPlus Basic Interface Operation ImagesPlus Basic Interface Operation The basic interface operation menu options are located on the File, View, Open Images, Open Operators, and Help main menus. File Menu New The New command creates a

More information

Image analysis. CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror

Image analysis. CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror Image analysis CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror 1 Outline Images in molecular and cellular biology Reducing image noise Mean and Gaussian filters Frequency domain interpretation

More information

SGN Bachelor s Laboratory Course in Signal Processing Audio frequency band division filter ( ) Name: Student number:

SGN Bachelor s Laboratory Course in Signal Processing Audio frequency band division filter ( ) Name: Student number: TAMPERE UNIVERSITY OF TECHNOLOGY Department of Signal Processing SGN-16006 Bachelor s Laboratory Course in Signal Processing Audio frequency band division filter (2013-2014) Group number: Date: Name: Student

More information