Testing the different components of the enveloppe

Motion Clouds: testing components of the envelope

In [1]:
import numpy as np
np.set_printoptions(precision=3, suppress=True)
In [2]:
import MotionClouds as mc
fx, fy, ft = mc.get_grids(mc.N_X, mc.N_Y, mc.N_frame)
#mc.recompute = True
mc.notebook = True
help(mc.envelope_gabor)
Help on function envelope_gabor in module MotionClouds:

envelope_gabor(fx, fy, ft, V_X=1.0, V_Y=0.0, B_V=0.5, sf_0=0.125, B_sf=0.1, loggabor=True, theta=0.0, B_theta=0.19634954084936207, alpha=0.0, **kwargs)
    Returns the Motion Cloud kernel, that is the product of:
        * a speed envelope
        * an orientation envelope
        * an orientation envelope

Testing the speed

Here the link to the test page for the component Speed

In [3]:
fx, fy, ft = mc.get_grids(mc.N_X, mc.N_Y, mc.N_frame)
name = 'speed'
z = mc.envelope_speed(fx, fy, ft)
mc.figures(z, name)
mc.in_show_video(name)

Exploring the orientation component of the envelope around a grating.

Here the link to the test page for the orientation component

In [4]:
fx, fy, ft = mc.get_grids(mc.N_X, mc.N_Y, mc.N_frame)
name = 'grating'
z = mc.envelope_gabor(fx, fy, ft)
mc.figures(z, name)
mc.in_show_video(name)

Here the link to the test page for the component Radial

In [5]:
B_theta = np.pi/8.
fx, fy, ft = mc.get_grids(mc.N_X, mc.N_Y, mc.N_frame)
name = 'radial'
mc.figures_MC(fx, fy, ft, name, B_theta=B_theta)
verbose = False
mc.in_show_video(name)

Testing the color

In some circonstances, it is desirable to create a texture with a different "color" than that of natural images (that is where the envelope is in 1/f).

Here the link to the test page for the component Color

In [6]:
name = 'color'
fx, fy, ft = mc.get_grids(mc.N_X, mc.N_Y, mc.N_frame)
z = mc.envelope_color(fx, fy, ft, alpha=1.)
mc.figures(z, name)
mc.in_show_video(name)