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}
}
%load_ext autoreload
%autoreload 2
import numpy as np
np.set_printoptions(precision=3, suppress=True)
import MotionClouds as mc
mc.figpath = '../files/2015-03-26_the-vancouver-set'
import os
# set some custom size:
fx, fy, ft = mc.get_grids(200, 128, mc.N_frame)
finding a good initial parameter¶
The "vanilla" version of the Motion Cloud:
name = 'vancouver'
mc.figures_MC(fx, fy, ft, name, figpath=mc.figpath)
mc.in_show_video(name, figpath=mc.figpath)
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.
name = 'vancouver-fog'
mc.figures_MC(fx, fy, ft, name, B_sf=.3, B_theta=10., figpath=mc.figpath)
mc.in_show_video(name, figpath=mc.figpath)
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'
):
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(mc.figpath, name), vext='.mat') # saves that movie into MATLAB format
#mc.anim_save(mov, os.path.join(mc.figpath, name), vext='.h5') # saves that movie into HDF5 format
Now you may directly download that file from this link.
parameterizing the set¶
Now that we got a good fog, we may want to try out different speeds:
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., figpath=mc.figpath)
mc.in_show_video(name_, figpath=mc.figpath)
Obviously, a speed of $4$ seems to introduce aliasing. That effect is expected and should be avoided.