Code Monkey home page Code Monkey logo

motion_energy_matlab's Introduction

gallantlab/motion_energy_matlab

motion energy model motion_energy_matlab is a software library to calculate motion or static energy features of visual stimuli (movies or images).

QUICKSTART/USAGE

The main functions accept movie/image stimulus inputs and return the energy feature outputs. To test the code, you can use one of two methods. Either (1) use the sample data we have provided (click here to download). You should save the file somewhere on your Matlab path as 'nishimoto_2011_val_1min_uint8.mat'. Or (2) prepare your own set of movie frames in a 4D array of [X x Y x Color x Time]. For now, the code only supports square images (it may run for rectangular images, but the filters may be stretched and may give unexpected results). If you choose (2), you will need to change a line in ComputeMotionEnergy.m

Then run ComputeMotionEnergy.m in MATLAB (under demo/ folder):

>> ComputeMotionEnergy;

The code allows flexible specifications of filter array parameters, such as the highest spatial frequency, the number of directions of motion, the number of scales of filters, etc. Image pre-processing and post-processing parameters (such as how to handle color channels) can be specified as well. Default values can be specified for all parameters. For example, if you want to load a default parameter set and then only specify the highest spatial and temporal frequency:

>> gparams = preprocWavelets_grid_GetMetaParams(2); % load the default parameter set 2 (as in Nishimoto et al., 2011)
>> gparams.sfmax = 24; % the highest frequency is set to 24 cycles/image
>> gparams.tfmax = 6; % the highest temporal frequency is set to 6 cycles/time window
>> [S_gab, gparams] = preprocWavelets_grid(S_lum, gparams); % calculate the energy features of luminance pattern S_lum

For more details, please type β€˜help [filename]’ (e.g.,):

>> help preprocWavelets_grid

REQUIREMENTS

  • MATLAB
  • Image Processing toolbox (for color conversion)

REFERENCES

The original motion energy model was proposed by Watson and Ahumada (1985) and Adelson and Bergen (1985). The codes were written by Shinji Nishimoto (Nishimoto et al., 2011; Nishimoto and Gallant 2011) and edited and commented by Mark Lescroart.

motion_energy_matlab's People

Contributors

marklescroart avatar shinjinishimoto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.