# The Vancouver set

I have heard Vancouver can get foggy and cloudy in the winter. Here, I will provide some examples of realistic simulations of it...

This stimulation was used in the following poster presented at VSS:


@article{Kreyenmeier2016,
author = {Kreyenmeier, Philipp and Fooken, Jolande and Spering, Miriam},
doi = {10.1167/16.12.457},
issn = {1534-7362},
journal = {Journal of Vision},
month = {sep},
number = {12},
pages = {457},
publisher = {The Association for Research in Vision and Ophthalmology},
title = {{Similar effects of visual context dynamics on eye and hand movements}},
url = {http://jov.arvojournals.org/article.aspx?doi=10.1167/16.12.457},
volume = {16},
year = {2016}
}
In [1]:
%load_ext autoreload
import numpy as np
np.set_printoptions(precision=3, suppress=True)
import MotionClouds as mc
import os
# set some custom size:
fx, fy, ft = mc.get_grids(200, 128, mc.N_frame)
#!rm ../files/vancouver*


### finding a good initial parameter¶

The "vanilla" version of the Motion Cloud:

In [2]:
name = 'vancouver'
mc.figures_MC(fx, fy, ft, name)
mc.in_show_video(name)


To create a fog, the spatial frenquency should be less precise, so its sufficient to make the bandwidth large. The units are absolute (relative to the Nyquist frequency). So, a value of 1 is already big. Also, (except if it rains?) we can similarly assume a large bandwidth for the orientation.

In [3]:
name = 'vancouver-fog'
mc.figures_MC(fx, fy, ft, name, B_sf=.3, B_theta=10.)
mc.in_show_video(name)


It is easy to save that file in another format like the matlab binary format (use vext='.mat) or using the more universal HDF5 format (use vext='.h5'):

In [4]:
env = mc.envelope_gabor(fx, fy, ft, B_sf=.3, B_theta=10.) # makes an envelope in Fourier space
mov = mc.random_cloud(env) # transforms the envelope into a movie
mc.anim_save(mov, os.path.join('../files', name), vext='.mat') # saves that movie into MATLAB format
#mc.anim_save(mov, os.path.join('../files', name), vext='.h5') # saves that movie into HDF5 format


### parameterizing the set¶

Now that we got a good fog, we may want to try out different speeds:

In [5]:
for V_X in [-1.0, -0.5, 0.0, 0.1, 0.5, 1.0, 4.0]:
name_ = name + '-V_X-' + str(V_X).replace('.', '_')
mc.figures_MC(fx, fy, ft, name_, V_X=V_X, B_sf=1., B_theta=10.)
mc.in_show_video(name_)


Obviously, a speed of $4$ seems to introduce aliasing. That effect is expected and should be avoided.