Home | Trees | Indices | Help |
---|
|
This module contains code from Nicolas Pinto. Added to PyVision by David Bolme
Pinto N, Cox DD, DiCarlo JJ (2008) Why is Real-World Visual Object Recognition Hard? PLoS Computational Biology 4(1): e27 doi:10.1371/journal.pcbi.0040027
Created on May 29, 2011
Author: bolme
|
|||
V1Processing | |||
MinMaxError |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
V1LIKE_PARAMS_A =
|
|||
V1LIKE_FEATURES_A =
|
|||
fft_cache =
|
|||
filt_l = None
|
|||
__package__ =
|
|||
n = 18
|
|||
o = 15
|
|
Fast Euclidean Norm (L2) This version should be faster than numpy.linalg.norm if the dot function uses blas. Inputs: x -- numpy array Output: L2 norm from 1d representation of x |
Generate a gabor 2d array Inputs: gw -- width of the gaussian envelope gh -- height of the gaussian envelope gx0 -- x indice of center of the gaussian envelope gy0 -- y indice of center of the gaussian envelope wfreq -- frequency of the 2d wave worient -- orientation of the 2d wave wphase -- phase of the 2d wave shape -- shape tuple (height, width) Outputs: gabor -- 2d gabor with zero-mean and unit-variance |
Simple 3d array resampling Inputs: src -- a ndimensional array (dim>2) outshape -- fixed output shape for the first 2 dimensions Outputs: hout -- resulting n-dimensional array |
V1LIKE Pooling Boxcar Low-pass filter featuremap-wise Inputs: hin -- a 3-dimensional array (width X height X n_channels) lsum_ksize -- kernel size of the local sum ex: 17 outshape -- fixed output shape (2d slices) order -- XXX Outputs: hout -- resulting 3-dimensional array |
V1LIKE linear filtering Perform separable convolutions on an image with a set of filters Inputs: hin -- input image (a 2-dimensional array) filterbank -- TODO list of tuples with 1d filters (row, col) used to perform separable convolution use_cache -- Boolean, use internal fft_cache (works _well_ if the input shapes don't vary much, otherwise you'll blow away the memory) Outputs: hout -- a 3-dimensional array with outputs of the filters (width X height X n_filters) |
Return a Gabor filterbank (generate it if needed) Inputs: params -- filters parameters (dict) Outputs: filt_l -- filterbank (list) |
V1LIKE local normalization Each pixel in the input image is divisively normalized by the L2 norm of the pixels in a local neighborhood around it, and the result of this division is placed in the output image. Inputs: hin -- a 3-dimensional array (width X height X rgb) kshape -- kernel shape (tuple) ex: (3,3) for a 3x3 normalization neighborhood threshold -- magnitude threshold, if the vector's length is below it doesn't get resized ex: 1. Outputs: hout -- a normalized 3-dimensional array (width X height X rgb) |
Applies a simple V1-like model and generates a feature vector from its outputs. Inputs: arr -- image's array params -- representation parameters (dict) featsel -- features to include to the vector (dict) Outputs: fvector -- corresponding feature vector |
|
V1LIKE_PARAMS_A
|
V1LIKE_FEATURES_A
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Apr 21 14:31:58 2015 | http://epydoc.sourceforge.net |