CvSourcePlane Class Reference

The class represents the source image as a plane in the network. More...

#include <cvsourceplane.h>

Inheritance diagram for CvSourcePlane:

Inheritance graph
[legend]
Collaboration diagram for CvSourcePlane:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CvSourcePlane (std::string id, CvSize fmapsz)
 Constructor.
virtual ~CvSourcePlane ()
 Destructor.
virtual CvMat * fprop ()
 Dummy Forward propagation.
virtual std::string toString ()
 Produces string representation of the source plane.
int connto (std::vector< CvGenericPlane * > &pplane)
 Connect the plane to the parent planes.
int connchild (CvGenericPlane *cplane)
 Connect the plane back to child.
int disconn ()
 Disconnect the plane completely.
virtual int setweight (std::vector< double > &weights)
 Explicitly set the weights for the plane's neuron.
CvMat * getfmap ()
 Get a pointer to plane's feature map.
int setfmap (CvArr *source)
 Explicitly set values for plane's feature map.
std::string getid ()
 Get plane's text id.

Protected Attributes

std::string m_id
 Plane string id.
std::vector< CvGenericPlane * > m_pplane
 Links to parents (for fprop).
std::vector< CvGenericPlane * > m_cplane
 Links to childs (for bprop).
std::vector< CvMat * > m_pfmap
 Cached pointers to parents feature maps (for fprop).
std::vector< double > m_delta
 Deltas (will be used for bprop).
CvMat * m_fmap
 Container of feature map for this plane.
CvSize m_fmapsz
 Size of feature map.
CvSize m_neurosz
 Neuron window.
std::vector< double > m_weight
 Container for weights of plane's neuron.
int m_connected
 Flag specifying whether we are already connected to parents or not.

Detailed Description

The class represents the source image as a plane in the network.

The class is essentially a data abstraction representing image source as a dummy plane.

Each plane object represents one neuron (not a layer!). The feature map of the source plane represents just a source image

Definition at line 55 of file cvsourceplane.h.


Constructor & Destructor Documentation

CvSourcePlane::CvSourcePlane ( std::string  id,
CvSize  fmapsz 
)

Constructor.

Constructor creates a new source plane with specified name and of specified size.

Parameters:
id name of the plane
fmapsz size of the featuremap for this plane. For source planes, it is just a size of image, since source plane is just an abstraction.

Definition at line 57 of file cvsourceplane.cpp.

CvSourcePlane::~CvSourcePlane (  )  [virtual]

Destructor.

Definition at line 62 of file cvsourceplane.cpp.


Member Function Documentation

CvMat * CvSourcePlane::fprop (  )  [virtual]

Dummy Forward propagation.

Returns:
Pointer to plane's featuremap

Implements CvGenericPlane.

Definition at line 73 of file cvsourceplane.cpp.

References CvGenericPlane::m_fmap.

string CvSourcePlane::toString (  )  [virtual]

Produces string representation of the source plane.

The method produces an XML representation of the complete information about the source plane. The only useful information about source plane is its name and its size. Weights and connections (to parents) are not used. The representation does NOT include current state of the plane such as its feature map. The method is mainly used by the CvConvNet object.

Returns:
string containing XML description of the plane

Implements CvGenericPlane.

Definition at line 88 of file cvsourceplane.cpp.

References CvGenericPlane::m_fmapsz, and CvGenericPlane::m_id.

int CvGenericPlane::connto ( std::vector< CvGenericPlane * > &  pplane  )  [inherited]

Connect the plane to the parent planes.

The method connects the plane to the given parent planes It also notifies each parent plane that this plane is their child plane (will be used for bprop)

Parameters:
pplane parent planes
Returns:
status

Definition at line 98 of file cvgenericplane.cpp.

References CvGenericPlane::getfmap(), CvGenericPlane::m_connected, CvGenericPlane::m_pfmap, and CvGenericPlane::m_pplane.

int CvGenericPlane::connchild ( CvGenericPlane cplane  )  [inherited]

Connect the plane back to child.

The method connects the plane to its child. It is used only by connto() method in order to notify a parent that it is being connected by a child. After all connto() are done, each plane will have a list of parents as well as list of its childs.

Definition at line 123 of file cvgenericplane.cpp.

References CvGenericPlane::m_cplane.

int CvGenericPlane::disconn (  )  [inherited]

Disconnect the plane completely.

The method disconnects the plane from all planes

Returns:
status

Definition at line 134 of file cvgenericplane.cpp.

References CvGenericPlane::m_connected, CvGenericPlane::m_cplane, CvGenericPlane::m_pfmap, and CvGenericPlane::m_pplane.

int CvGenericPlane::setweight ( std::vector< double > &  weights  )  [virtual, inherited]

Explicitly set the weights for the plane's neuron.

The method explicitly sets the weights of the neuron

Reimplemented in CvConvolutionPlane, CvMaxPlane, CvRBFPlane, and CvSubSamplingPlane.

Definition at line 175 of file cvgenericplane.cpp.

References CvGenericPlane::m_connected, and CvGenericPlane::m_weight.

Referenced by CvSubSamplingPlane::setweight(), CvRBFPlane::setweight(), and CvConvolutionPlane::setweight().

CvMat * CvGenericPlane::getfmap (  )  [inherited]

Get a pointer to plane's feature map.

Returns:
pointer to feature map of the plane

Definition at line 168 of file cvgenericplane.cpp.

References CvGenericPlane::m_fmap.

Referenced by CvGenericPlane::connto().

int CvGenericPlane::setfmap ( CvArr *  source  )  [inherited]

Explicitly set values for plane's feature map.

The method explicitly sets the values of plane's feature map. It just copies feature map given in the input parameter to the plane's own storage.

Parameters:
source feature map to be copied from (CvMat or IplImage)
Returns:
status

Definition at line 150 of file cvgenericplane.cpp.

References CvGenericPlane::m_fmap.

string CvGenericPlane::getid (  )  [inherited]

Get plane's text id.

Returns:
string id of the plane

Definition at line 187 of file cvgenericplane.cpp.

References CvGenericPlane::m_id.

Referenced by CvRBFPlane::toString(), CvMaxPlane::toString(), and CvConvolutionPlane::toString().


Member Data Documentation

std::string CvGenericPlane::m_id [protected, inherited]

Plane string id.

Definition at line 99 of file cvgenericplane.h.

Referenced by CvGenericPlane::CvGenericPlane(), CvGenericPlane::getid(), CvSubSamplingPlane::toString(), toString(), CvRBFPlane::toString(), CvMaxPlane::toString(), and CvConvolutionPlane::toString().

std::vector<CvGenericPlane *> CvGenericPlane::m_pplane [protected, inherited]

Links to parents (for fprop).

Definition at line 100 of file cvgenericplane.h.

Referenced by CvGenericPlane::connto(), CvGenericPlane::CvGenericPlane(), CvGenericPlane::disconn(), CvSubSamplingPlane::fprop(), CvRBFPlane::fprop(), CvMaxPlane::fprop(), CvConvolutionPlane::fprop(), CvRBFPlane::setweight(), CvConvolutionPlane::setweight(), CvSubSamplingPlane::toString(), CvRBFPlane::toString(), CvMaxPlane::toString(), and CvConvolutionPlane::toString().

std::vector<CvGenericPlane *> CvGenericPlane::m_cplane [protected, inherited]

Links to childs (for bprop).

Definition at line 101 of file cvgenericplane.h.

Referenced by CvGenericPlane::connchild(), and CvGenericPlane::disconn().

std::vector<CvMat *> CvGenericPlane::m_pfmap [protected, inherited]

Cached pointers to parents feature maps (for fprop).

Definition at line 102 of file cvgenericplane.h.

Referenced by CvGenericPlane::connto(), CvGenericPlane::disconn(), CvSubSamplingPlane::fprop(), CvRBFPlane::fprop(), CvMaxPlane::fprop(), and CvConvolutionPlane::fprop().

std::vector<double> CvGenericPlane::m_delta [protected, inherited]

Deltas (will be used for bprop).

Definition at line 103 of file cvgenericplane.h.

CvMat* CvGenericPlane::m_fmap [protected, inherited]

Container of feature map for this plane.

Definition at line 105 of file cvgenericplane.h.

Referenced by CvGenericPlane::CvGenericPlane(), CvSubSamplingPlane::fprop(), fprop(), CvRBFPlane::fprop(), CvMaxPlane::fprop(), CvConvolutionPlane::fprop(), CvGenericPlane::getfmap(), CvGenericPlane::setfmap(), and CvGenericPlane::~CvGenericPlane().

CvSize CvGenericPlane::m_fmapsz [protected, inherited]

Size of feature map.

Definition at line 106 of file cvgenericplane.h.

Referenced by CvGenericPlane::CvGenericPlane(), CvSubSamplingPlane::fprop(), CvRBFPlane::fprop(), CvConvolutionPlane::fprop(), CvSubSamplingPlane::toString(), toString(), CvRBFPlane::toString(), and CvConvolutionPlane::toString().

CvSize CvGenericPlane::m_neurosz [protected, inherited]

Neuron window.

Definition at line 107 of file cvgenericplane.h.

Referenced by CvGenericPlane::CvGenericPlane(), CvSubSamplingPlane::fprop(), CvRBFPlane::fprop(), CvConvolutionPlane::fprop(), CvRBFPlane::setweight(), CvConvolutionPlane::setweight(), CvSubSamplingPlane::toString(), CvRBFPlane::toString(), and CvConvolutionPlane::toString().

std::vector<double> CvGenericPlane::m_weight [protected, inherited]

Container for weights of plane's neuron.

Definition at line 109 of file cvgenericplane.h.

Referenced by CvConvolutionPlane::CvConvolutionPlane(), CvGenericPlane::CvGenericPlane(), CvMaxPlane::CvMaxPlane(), CvRBFPlane::CvRBFPlane(), CvSubSamplingPlane::CvSubSamplingPlane(), CvSubSamplingPlane::fprop(), CvRBFPlane::fprop(), CvConvolutionPlane::fprop(), CvGenericPlane::setweight(), CvSubSamplingPlane::toString(), CvRBFPlane::toString(), and CvConvolutionPlane::toString().

int CvGenericPlane::m_connected [protected, inherited]

Flag specifying whether we are already connected to parents or not.

Definition at line 110 of file cvgenericplane.h.

Referenced by CvGenericPlane::connto(), CvGenericPlane::CvGenericPlane(), CvGenericPlane::disconn(), CvSubSamplingPlane::fprop(), CvRBFPlane::fprop(), CvMaxPlane::fprop(), CvConvolutionPlane::fprop(), and CvGenericPlane::setweight().


The documentation for this class was generated from the following files:
Generated on Fri Aug 3 16:17:34 2007 for ConvNet by  doxygen 1.5.0