#include <kernelfactory.h>
Definition at line 22 of file kernelfactory.h.
Public Types | |
typedef InternalNeuralRegion::WeightMatrix | KernelMatrix |
Type to use for a generated kernel. | |
typedef double(* | kernel_fnPtr )(double x_sq, double sig_sq) |
Concrete type to use for a kernel function pointer. | |
enum | BlurTypes { Blur_SquareAverage, Blur_CircularAverage, Blur_Gaussian, Blur_DoG, Blur_LoG, Blur_GoD, Blur_DoGGoD, Blur_PGM, Blur_SquareRandom, Blur_CircularRandom } |
Possible values for a blur_type. | |
Public Methods | |
KernelMatrix | create (int index, double world_size_scale, StringArgs arglist) |
Update the kernel matrices for each eye. | |
KernelMatrix | create (kernel_fnPtr fnptr, double radius, double max_radius, string &errors, bool circular=true, bool normalize=true) |
Convenient wrapper for RadialFunction's version. | |
void | register_params_and_commands (void) |
Call before using any of the parameters and commands in this class. | |
Public Attributes | |
const BlurTypes | max_blur_type |
Highest index defined in BlurTypes. |
|
Update the kernel matrices for each eye. This is currently not as cleanly implemented as input_define or input_define_generator (i.e., no hierarchy of subclasses) but that added complexity probably isn't worth it since the base implementation (the blurring kernel passed to retina.h) is itself very general. So this is basically just a virtual constructor for such a kernel. The default width of each matrix was chosen empirically for each type, based upon plots of the kernel at small radii (approximately 1-6). For the values chosen, the function was nearly zero to the naked eye (if it tended towards zero, of course). The given index is used for DoGGoD, to determine which type to use. Some types may return an empty kernel (0 x 0), usually to indicate an error, so that possibility must be checked before using the kernel. Definition at line 234 of file kernelfactory.c. References KernelMatrix, StringArgs::next(), pgm_read(), and mat::sum(). Referenced by KernelFactoryWrapper::operator()(). |