项目作者: cnuahs

项目描述 :
A Matlab class for generating motion clouds (spatio-temporal random textures).
高级语言: MATLAB
项目地址: git://github.com/cnuahs/motion-clouds.git
创建时间: 2018-12-27T12:29:23Z
项目社区:https://github.com/cnuahs/motion-clouds

开源协议:GNU General Public License v2.0

下载


motion-clouds

A Matlab implementation of Laurent Perrinet’s (INT - CNRS) motion cloud spatio-temporal random textures.

Motion clouds are a class of random phase textures. Here they are implemented as dense mixtures of localized drifting gratings with random positions.

For a formal description see:

Sanz Leon et al., Motion clouds: model-based stimulus synthesis of
natural-like random textures for the study of motion perception
.
J. Neurophysiol. 107:3217-3226, 2012.

For Laurent Perrinet’s Python implementation see:

https://github.com/NeuralEnsemble/MotionClouds.git

Example usage:

  1. import motionclouds.*
  2. m = motioncloud(256,256,120); % 256 x 256 texels, 120 frames
  3. % override default parameters
  4. m.th = pi/3; % mean orientation (radians)
  5. [m.Vx,m.Vy] = pol2cart(m.th,1.0); % mean horiz. and vert. speed
  6. m.sf = 32/m.Nx; % mean spatial frequency (32 cycles per frame)
  7. m.alpha = 1.0; % 1/f noise spectral density
  8. m.contrast = 0.12; % contrast energy
  9. m.method = 'ENERGY';
  10. % generate the spatio-temporal image sequence
  11. s = m.getSequence();
  12. % preview it...
  13. figure; colormap(gray(256));
  14. for ii = 1:m.Nt % loop over frames
  15. imagesc(s(:,:,ii); axis image
  16. delay(0.020);
  17. end

The example above produces a spatio-temporal texture, the first 5 frames of which look something like:
example motion cloud