TarzaNN
TarzaNN neural network simulator
|
#include <Filter.h>
Public Member Functions | |
Filter (int w, int h) | |
Filter (QString fileName, int fileType) | |
float * | getKernel () |
void | _convolve (Matrix *input, Matrix *output) |
void | convolve (Matrix *input, Matrix *output, bool scale=true) |
void | STMconvolve (Matrix *input, GatingUnits *gu) |
void | setFromConvolveWindow (int _x1, int _y1, int _w, int _h) |
void | setPaddingType (int _type) |
int | getPaddingType () |
void | separateKernel () |
~Filter () | |
void | addOperation (const QString &opName, const QString &opValue) |
void | setParameters (paramMap params) |
void | XMLSerialize (int tabs, QTextStream *buf) |
void | adjust_l (float l1, float l2) |
QImage * | getPreviewImage () |
Static Public Member Functions | |
static void | _convolveRetinal (Matrix *input, Matrix *output, int padding, int distPixels) |
static void | destroyRetinalImageFilters () |
static void | svd (double **a, int m, int n, double w[], double **v) |
static double | pythag (double a, double b) |
static int | getType (const QString &name) |
static QString | getType (int value) |
static double | compute_skip (int input, int output, int filter) |
Public Attributes | |
float | l1_norm |
float | l2_norm |
int | env_x |
int | env_y |
int | pos_x |
int | pos_y |
int | fType |
Static Public Attributes | |
static Filter * | retinalImageFilters [1024] |
static int | retinalImageFilterNo = 0 |
static int | retinalImageFilterSize = 21 |
static QMutex | retinalMutex |
Protected Types | |
enum | { SEPARABLE_NOT_CHECKED, SEPARABLE_NO, SEPARABLE_YES } |
Protected Member Functions | |
void | find_limits (int w, int h, float sigma, float aspect, float orientation, float &h_m_x, float &h_m_y) |
Protected Attributes | |
int | separable_status |
Filter ** | separated_filters |
Filter * | nextFilter |
paramMap | initParams |
QLinkedList< FilterOperation > | operations |
Friends | |
class | UI_FilterProp |
class | UI_DesignerPropDisplay |
Filters connect feature planes. They essentially encode the structure of the receptive fields
Filter::Filter | ( | int | w, |
int | h | ||
) |
Constructor. Note that w and h must be odd.
Filter::Filter | ( | QString | fileName, |
int | fileType | ||
) |
Filter::~Filter | ( | ) |
Perform convolutions. As a preprocessing step, edges are extended and mirrored
void Filter::_convolveRetinal | ( | Matrix * | input, |
Matrix * | output, | ||
int | padding, | ||
int | distPixels | ||
) | [static] |
Convolves an input image in order to create a retinal image using gradual blurring
void Filter::addOperation | ( | const QString & | opName, |
const QString & | opValue | ||
) |
add operation
void Filter::adjust_l | ( | float | l1, |
float | l2 | ||
) |
static double Filter::compute_skip | ( | int | input, |
int | output, | ||
int | filter | ||
) | [inline, static] |
Decisions around convolutions: separable filters, down- and up-sampling, cascading filters
Not really convolution, filters are applied only inside the input
void Filter::destroyRetinalImageFilters | ( | ) | [static] |
void Filter::find_limits | ( | int | w, |
int | h, | ||
float | sigma, | ||
float | aspect, | ||
float | orientation, | ||
float & | h_m_x, | ||
float & | h_m_y | ||
) | [protected] |
float * Filter::getKernel | ( | ) |
Returns a packed array representation of the filter. If necessary, the function will create it.
int Filter::getPaddingType | ( | ) |
QImage * Filter::getPreviewImage | ( | ) |
int Filter::getType | ( | const QString & | name | ) | [static] |
QString Filter::getType | ( | int | value | ) | [static] |
double Filter::pythag | ( | double | a, |
double | b | ||
) | [static] |
void Filter::separateKernel | ( | ) |
Decide if filter is separable, and if it is, do it
void Filter::setFromConvolveWindow | ( | int | _x1, |
int | _y1, | ||
int | _w, | ||
int | _h | ||
) |
Stores the parameters of the convolve window, and sets useConvolveWindow true
void Filter::setPaddingType | ( | int | _type | ) |
Padding for convolution
void Filter::setParameters | ( | paramMap | params | ) |
void Filter::STMconvolve | ( | Matrix * | input, |
GatingUnits * | gu | ||
) |
Convolve input with filter, but don't sum, store intermediate resultys in the gating units
Convolution for Selective Tuning. Stores intermediate results in the GatingUnits. Not really convolution, filters are applied only inside the input
void Filter::svd | ( | double ** | a, |
int | m, | ||
int | n, | ||
double | w[], | ||
double ** | v | ||
) | [static] |
Perform SVD of filter
void Filter::XMLSerialize | ( | int | tabs, |
QTextStream * | buf | ||
) |
friend class UI_DesignerPropDisplay [friend] |
friend class UI_FilterProp [friend] |
int Filter::env_x |
int Filter::env_y |
int Filter::fType |
paramMap Filter::initParams [protected] |
float Filter::l1_norm |
float Filter::l2_norm |
Filter* Filter::nextFilter [protected] |
Pointer to next filter for cascading filters (e.g. DOGFilter)
QLinkedList<FilterOperation> Filter::operations [protected] |
int Filter::pos_x |
int Filter::pos_y |
int Filter::retinalImageFilterNo = 0 [static] |
Filter * Filter::retinalImageFilters [static] |
int Filter::retinalImageFilterSize = 21 [static] |
QMutex Filter::retinalMutex [static] |
int Filter::separable_status [protected] |
Separability status
Filter** Filter::separated_filters [protected] |
if the filter was separated, here are the two pieces