From: Dominic L. <ma...@us...> - 2005-04-12 20:09:20
|
Update of /cvsroot/robotflow/RobotFlow/Vision/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28735/include Modified Files: ColorHistExtraction.h MeanShiftTracker.h VisualFeatureDesc.h VisualFeaturesExtraction.h VisualHistogramDesc.h VisualROI.h VisualTarget.h VisualTargetManager.h VisualTracker.h Log Message: fixed namespace problems Index: VisualFeaturesExtraction.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/VisualFeaturesExtraction.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VisualFeaturesExtraction.h 12 Apr 2005 19:38:34 -0000 1.2 --- VisualFeaturesExtraction.h 12 Apr 2005 20:09:06 -0000 1.3 *************** *** 29,33 **** template <class FeatBaseType> ! class VisualFeaturesExtraction : public BufferedNode { public: --- 29,33 ---- template <class FeatBaseType> ! class VisualFeaturesExtraction : public FD::BufferedNode { public: *************** *** 37,41 **** } ! VisualFeaturesExtraction(string nodeName, ParameterSet params) : BufferedNode(nodeName, params) { --- 37,41 ---- } ! VisualFeaturesExtraction(std::string nodeName, FD::ParameterSet params) : BufferedNode(nodeName, params) { *************** *** 49,58 **** // Default routine to print a VisualFeaturesExtraction object to an output stream ! virtual void printOn(ostream &out) const = 0; // Default routine to read a VisualFeaturesExtraction object from an input stream ! virtual void readFrom(istream &in) = 0; ! virtual void calculate(int output_id, int count, Buffer &out) = 0; virtual void ExtractFeatures(IplImage *i_frame, VisualROI *i_roi) = 0; --- 49,58 ---- // Default routine to print a VisualFeaturesExtraction object to an output stream ! virtual void printOn(std::ostream &out) const = 0; // Default routine to read a VisualFeaturesExtraction object from an input stream ! virtual void readFrom(std::istream &in) = 0; ! virtual void calculate(int output_id, int count, FD::Buffer &out) = 0; virtual void ExtractFeatures(IplImage *i_frame, VisualROI *i_roi) = 0; Index: MeanShiftTracker.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/MeanShiftTracker.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MeanShiftTracker.h 12 Apr 2005 19:38:34 -0000 1.2 --- MeanShiftTracker.h 12 Apr 2005 20:09:05 -0000 1.3 *************** *** 30,52 **** MeanShiftTracker(int i_maxNumMSIter, double i_minMSDistEpsilon); ! MeanShiftTracker(string nodeName, ParameterSet params); virtual ~MeanShiftTracker(); // Default routine to print a MeanShiftTracker object to an output stream ! void printOn(ostream &out) const { ! throw new GeneralException("Exception in MeanShiftTracker::printOn: method not yet implemented.",__FILE__,__LINE__); } // Default routine to read a MeanShiftTracker object from an input stream ! void readFrom(istream &in) { ! throw new GeneralException("Exception in MeanShiftTracker::printOn: method not yet implemented.",__FILE__,__LINE__); } ! virtual void request(int output_id, const ParameterSet &req); ! void calculate(int output_id, int count, Buffer &out); private: --- 30,52 ---- MeanShiftTracker(int i_maxNumMSIter, double i_minMSDistEpsilon); ! MeanShiftTracker(std::string nodeName, FD::ParameterSet params); virtual ~MeanShiftTracker(); // Default routine to print a MeanShiftTracker object to an output stream ! void printOn(std::ostream &out) const { ! throw new FD::GeneralException("Exception in MeanShiftTracker::printOn: method not yet implemented.",__FILE__,__LINE__); } // Default routine to read a MeanShiftTracker object from an input stream ! void readFrom(std::istream &in) { ! throw new FD::GeneralException("Exception in MeanShiftTracker::printOn: method not yet implemented.",__FILE__,__LINE__); } ! virtual void request(int output_id, const FD::ParameterSet &req); ! void calculate(int output_id, int count, FD::Buffer &out); private: Index: VisualTarget.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/VisualTarget.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VisualTarget.h 12 Apr 2005 19:38:34 -0000 1.2 --- VisualTarget.h 12 Apr 2005 20:09:06 -0000 1.3 *************** *** 30,34 **** template <class FeatBaseType> ! class VisualTarget : public Object { public: --- 30,34 ---- template <class FeatBaseType> ! class VisualTarget : public FD::Object { public: *************** *** 42,46 **** VisualTarget(int i_id, VisualROI *i_roi, ! Vector<VisualFeatureDesc<FeatBaseType> *> *i_targetDesc) : m_valid(true), m_id(i_id), m_activeAge(0), m_passiveAge(0), m_curDescIdx(0), m_roi(NULL), m_targetDesc(NULL), m_cueWeights(NULL), --- 42,46 ---- VisualTarget(int i_id, VisualROI *i_roi, ! FD::Vector<VisualFeatureDesc<FeatBaseType> *> *i_targetDesc) : m_valid(true), m_id(i_id), m_activeAge(0), m_passiveAge(0), m_curDescIdx(0), m_roi(NULL), m_targetDesc(NULL), m_cueWeights(NULL), *************** *** 49,53 **** m_roi = new VisualROI(*i_roi); m_numDesc = i_targetDesc->size(); ! m_targetDesc = new Vector<VisualFeatureDesc<FeatBaseType> *>(m_numDesc); for (int i=0; i<m_numDesc; i++) { --- 49,53 ---- m_roi = new VisualROI(*i_roi); m_numDesc = i_targetDesc->size(); ! m_targetDesc = new FD::Vector<VisualFeatureDesc<FeatBaseType> *>(m_numDesc); for (int i=0; i<m_numDesc; i++) { *************** *** 95,100 **** } } ! catch (BaseException *e) { ! throw e->add(new GeneralException("Exception caught in VisualTarget::VisualTarget:",__FILE__,__LINE__)); } } --- 95,100 ---- } } ! catch (FD::BaseException *e) { ! throw e->add(new FD::GeneralException("Exception caught in VisualTarget::VisualTarget:",__FILE__,__LINE__)); } } *************** *** 151,180 **** return *this; } ! catch (BaseException *e) { ! throw e->add(new GeneralException("Exception caught in VisualTarget::operator=:",__FILE__,__LINE__)); } } // Default routine to print a VisualTarget object to an output stream ! void printOn(ostream &out) const { ! throw new GeneralException("Exception in VisualTarget::printOn: method not yet implemented.",__FILE__,__LINE__); } // Default routine to read a VisualTarget object from an input stream ! void readFrom(istream &in) { ! throw new GeneralException("Exception in VisualTarget::readFrom: method not yet implemented.",__FILE__,__LINE__); } ! void Adapt(Vector<VisualFeatureDesc<FeatBaseType> *> *i_desc, double i_rate) { if (m_numDesc != i_desc->size()) { ! throw new GeneralException("Exception in VisualTarget::Adapt: input descriptor vector size differs from current object's vector.",__FILE__,__LINE__); } for (int i=0; i<m_numDesc; i++) { if ((*m_targetDesc)[i]->GetType() != (*i_desc)[i]->GetType()) { ! throw new GeneralException("Exception in VisualTarget::Adapt: features descriptor must have the same type.",__FILE__,__LINE__); } --- 151,180 ---- return *this; } ! catch (FD::BaseException *e) { ! throw e->add(new FD::GeneralException("Exception caught in VisualTarget::operator=:",__FILE__,__LINE__)); } } // Default routine to print a VisualTarget object to an output stream ! void printOn(std::ostream &out) const { ! throw new FD::GeneralException("Exception in VisualTarget::printOn: method not yet implemented.",__FILE__,__LINE__); } // Default routine to read a VisualTarget object from an input stream ! void readFrom(std::istream &in) { ! throw new FD::GeneralException("Exception in VisualTarget::readFrom: method not yet implemented.",__FILE__,__LINE__); } ! void Adapt(FD::Vector<VisualFeatureDesc<FeatBaseType> *> *i_desc, double i_rate) { if (m_numDesc != i_desc->size()) { ! throw new FD::GeneralException("Exception in VisualTarget::Adapt: input descriptor vector size differs from current object's vector.",__FILE__,__LINE__); } for (int i=0; i<m_numDesc; i++) { if ((*m_targetDesc)[i]->GetType() != (*i_desc)[i]->GetType()) { ! throw new FD::GeneralException("Exception in VisualTarget::Adapt: features descriptor must have the same type.",__FILE__,__LINE__); } *************** *** 183,195 **** } ! void Adapt(Vector<VisualFeatureDesc<FeatBaseType> *> *i_desc, double *i_rate) { if (m_numDesc != i_desc->size()) { ! throw new GeneralException("Exception in VisualTarget::Adapt: input descriptor vector size differs from current object's vector.",__FILE__,__LINE__); } for (int i=0; i<m_numDesc; i++) { if ((*m_targetDesc)[i]->GetType() != (*i_desc)[i]->GetType()) { ! throw new GeneralException("Exception in VisualTarget::Adapt: features descriptor must have the same type.",__FILE__,__LINE__); } --- 183,195 ---- } ! void Adapt(FD::Vector<VisualFeatureDesc<FeatBaseType> *> *i_desc, double *i_rate) { if (m_numDesc != i_desc->size()) { ! throw new FD::GeneralException("Exception in VisualTarget::Adapt: input descriptor vector size differs from current object's vector.",__FILE__,__LINE__); } for (int i=0; i<m_numDesc; i++) { if ((*m_targetDesc)[i]->GetType() != (*i_desc)[i]->GetType()) { ! throw new FD::GeneralException("Exception in VisualTarget::Adapt: features descriptor must have the same type.",__FILE__,__LINE__); } *************** *** 198,205 **** } ! double Similarity(Vector<VisualFeatureDesc<FeatBaseType> *> *i_desc) { if (m_numDesc != i_desc->size()) { ! throw new GeneralException("Exception in VisualTarget::Similarity: input descriptor vector size differs from current object's vector.",__FILE__,__LINE__); } --- 198,205 ---- } ! double Similarity(FD::Vector<VisualFeatureDesc<FeatBaseType> *> *i_desc) { if (m_numDesc != i_desc->size()) { ! throw new FD::GeneralException("Exception in VisualTarget::Similarity: input descriptor vector size differs from current object's vector.",__FILE__,__LINE__); } *************** *** 208,212 **** for (int i=0; i<m_numDesc; i++) { if ((*m_targetDesc)[i]->GetType() != (*i_desc)[i]->GetType()) { ! throw new GeneralException("Exception in VisualTarget::Similarity: features descriptor must have the same type.",__FILE__,__LINE__); } --- 208,212 ---- for (int i=0; i<m_numDesc; i++) { if ((*m_targetDesc)[i]->GetType() != (*i_desc)[i]->GetType()) { ! throw new FD::GeneralException("Exception in VisualTarget::Similarity: features descriptor must have the same type.",__FILE__,__LINE__); } *************** *** 217,224 **** } ! double SimilarityWCueAdapt(Vector<VisualFeatureDesc<FeatBaseType> *> *i_desc, double i_rate) { if (m_numDesc != i_desc->size()) { ! throw new GeneralException("Exception in VisualTarget::SimilarityWCueAdapt: input descriptor vector size differs from current object's vector.",__FILE__,__LINE__); } --- 217,224 ---- } ! double SimilarityWCueAdapt(FD::Vector<VisualFeatureDesc<FeatBaseType> *> *i_desc, double i_rate) { if (m_numDesc != i_desc->size()) { ! throw new FD::GeneralException("Exception in VisualTarget::SimilarityWCueAdapt: input descriptor vector size differs from current object's vector.",__FILE__,__LINE__); } *************** *** 228,232 **** for (i=0; i<m_numDesc; i++) { if ((*m_targetDesc)[i]->GetType() != (*i_desc)[i]->GetType()) { ! throw new GeneralException("Exception in VisualTarget::SimilarityWCueAdapt: features descriptor must have the same type.",__FILE__,__LINE__); } --- 228,232 ---- for (i=0; i<m_numDesc; i++) { if ((*m_targetDesc)[i]->GetType() != (*i_desc)[i]->GetType()) { ! throw new FD::GeneralException("Exception in VisualTarget::SimilarityWCueAdapt: features descriptor must have the same type.",__FILE__,__LINE__); } *************** *** 253,257 **** sumCueSimInv = 1.0/sumCueSim; if (sumCueSimInv == 0.0) { ! throw new GeneralException("Exception in VisualTarget::SimilarityWCueAdapt: cannot have a target with all cue weights are zero.",__FILE__,__LINE__); } for (i=0; i<m_numDesc; i++) { --- 253,257 ---- sumCueSimInv = 1.0/sumCueSim; if (sumCueSimInv == 0.0) { ! throw new FD::GeneralException("Exception in VisualTarget::SimilarityWCueAdapt: cannot have a target with all cue weights are zero.",__FILE__,__LINE__); } for (i=0; i<m_numDesc; i++) { *************** *** 327,338 **** } ! Vector<VisualFeatureDesc<FeatBaseType> *> *GetDescriptorsVec() { return m_targetDesc; } ! const Vector<VisualFeatureDesc<FeatBaseType> *> *GetCstDescriptorsVec() const { ! return (const Vector<VisualFeatureDesc<FeatBaseType> *> *)m_targetDesc; } --- 327,338 ---- } ! FD::Vector<VisualFeatureDesc<FeatBaseType> *> *GetDescriptorsVec() { return m_targetDesc; } ! const FD::Vector<VisualFeatureDesc<FeatBaseType> *> *GetCstDescriptorsVec() const { ! return (const FD::Vector<VisualFeatureDesc<FeatBaseType> *> *)m_targetDesc; } *************** *** 340,344 **** { if (i_idx >= m_numDesc) { ! throw new GeneralException("Exception in VisualTarget::GetDescriptor: descriptor index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } --- 340,344 ---- { if (i_idx >= m_numDesc) { ! throw new FD::GeneralException("Exception in VisualTarget::GetDescriptor: descriptor index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } *************** *** 349,353 **** { if (i_idx >= m_numDesc) { ! throw new GeneralException("Exception in VisualTarget::GetCstDescriptor: descriptor index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } --- 349,353 ---- { if (i_idx >= m_numDesc) { ! throw new FD::GeneralException("Exception in VisualTarget::GetCstDescriptor: descriptor index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } *************** *** 368,372 **** { if (i_idx >= m_numDesc) { ! throw new GeneralException("Exception in VisualTarget::GetCueWeight: index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } --- 368,372 ---- { if (i_idx >= m_numDesc) { ! throw new FD::GeneralException("Exception in VisualTarget::GetCueWeight: index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } *************** *** 427,431 **** // Reset vector size m_numDesc = i_numDesc; ! m_targetDesc = new Vector<VisualFeatureDesc<FeatBaseType> *>(m_numDesc); m_cueWeights = new double[m_numDesc]; m_tmpCueProb = new double[m_numDesc]; --- 427,431 ---- // Reset vector size m_numDesc = i_numDesc; ! m_targetDesc = new FD::Vector<VisualFeatureDesc<FeatBaseType> *>(m_numDesc); m_cueWeights = new double[m_numDesc]; m_tmpCueProb = new double[m_numDesc]; *************** *** 436,440 **** { if (i_idx >= m_numDesc) { ! throw new GeneralException("Exception in VisualTarget::SetCurDescIdx: descriptor index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } --- 436,440 ---- { if (i_idx >= m_numDesc) { ! throw new FD::GeneralException("Exception in VisualTarget::SetCurDescIdx: descriptor index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } *************** *** 442,446 **** } ! void SetDescriptorsVec(Vector<VisualFeatureDesc<FeatBaseType> *> *i_descVec) { // Reset the number of descriptors --- 442,446 ---- } ! void SetDescriptorsVec(FD::Vector<VisualFeatureDesc<FeatBaseType> *> *i_descVec) { // Reset the number of descriptors *************** *** 455,459 **** { if (i_idx >= m_numDesc) { ! throw new GeneralException("Exception in VisualTarget::SetDescriptor: descriptor index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } --- 455,459 ---- { if (i_idx >= m_numDesc) { ! throw new FD::GeneralException("Exception in VisualTarget::SetDescriptor: descriptor index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } *************** *** 480,484 **** { if (i_idx >= m_numDesc) { ! throw new GeneralException("Exception in VisualTarget::SetCueWeight: index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } --- 480,484 ---- { if (i_idx >= m_numDesc) { ! throw new FD::GeneralException("Exception in VisualTarget::SetCueWeight: index is greater than the actual number of descriptors in current vector.",__FILE__,__LINE__); } *************** *** 494,498 **** int m_numDesc; int m_curDescIdx; ! Vector<VisualFeatureDesc<FeatBaseType> *> *m_targetDesc; double *m_cueWeights; double *m_tmpCueProb; --- 494,498 ---- int m_numDesc; int m_curDescIdx; ! FD::Vector<VisualFeatureDesc<FeatBaseType> *> *m_targetDesc; double *m_cueWeights; double *m_tmpCueProb; Index: VisualHistogramDesc.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/VisualHistogramDesc.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VisualHistogramDesc.h 12 Apr 2005 19:38:34 -0000 1.2 --- VisualHistogramDesc.h 12 Apr 2005 20:09:06 -0000 1.3 *************** *** 65,69 **** VisualHistogramDesc(e_VISUALHIST_similarityType i_simType, bool i_normFlag, unsigned int i_numDimensions, ! const Vector<int> *i_numBins) : VisualFeatureDesc<BinType>(e_VISUALDESCRIPTOR_histogram), m_simType(i_simType), --- 65,69 ---- VisualHistogramDesc(e_VISUALHIST_similarityType i_simType, bool i_normFlag, unsigned int i_numDimensions, ! const FD::Vector<int> *i_numBins) : VisualFeatureDesc<BinType>(e_VISUALDESCRIPTOR_histogram), m_simType(i_simType), *************** *** 229,233 **** } else if (ch != '<') { ! throw new GeneralException ("VisualHistogramDesc::readFrom : Parse error: '<' expected",__FILE__,__LINE__); } --- 229,233 ---- } else if (ch != '<') { ! throw new FD::GeneralException ("VisualHistogramDesc::readFrom : Parse error: '<' expected",__FILE__,__LINE__); } *************** *** 241,245 **** if (m_numDimensions < 1) { ! throw new GeneralException ("VisualHistogramDesc::readFrom : invalid number of dimensions",__FILE__,__LINE__); } } --- 241,245 ---- if (m_numDimensions < 1) { ! throw new FD::GeneralException ("VisualHistogramDesc::readFrom : invalid number of dimensions",__FILE__,__LINE__); } } *************** *** 248,252 **** if (m_totalBins < 1) { ! throw new GeneralException ("VisualHistogramDesc::readFrom : invalid total number of bins",__FILE__,__LINE__); } } --- 248,252 ---- if (m_totalBins < 1) { ! throw new FD::GeneralException ("VisualHistogramDesc::readFrom : invalid total number of bins",__FILE__,__LINE__); } } *************** *** 296,309 **** } else { ! throw new GeneralException ("VisualHistogramDesc::readFrom : Unknown argument: " + tag,__FILE__,__LINE__); } if (!in) { ! throw new GeneralException ("VisualHistogramDesc::readFrom : Parse error trying to build " + tag,__FILE__,__LINE__); } in >> tag; if (tag != ">") { ! throw new GeneralException ("VisualHistogramDesc::readFrom : Parse error: '>' expected ",__FILE__,__LINE__); } } --- 296,309 ---- } else { ! throw new FD::GeneralException ("VisualHistogramDesc::readFrom : Unknown argument: " + tag,__FILE__,__LINE__); } if (!in) { ! throw new FD::GeneralException ("VisualHistogramDesc::readFrom : Parse error trying to build " + tag,__FILE__,__LINE__); } in >> tag; if (tag != ">") { ! throw new FD::GeneralException ("VisualHistogramDesc::readFrom : Parse error: '>' expected ",__FILE__,__LINE__); } } *************** *** 314,318 **** try { if (m_totalBins != i_size ) { ! throw new GeneralException ("VisualHistogramDesc::Similarity : number of histogram bins differs from current descriptor",__FILE__,__LINE__); } --- 314,318 ---- try { if (m_totalBins != i_size ) { ! throw new FD::GeneralException ("VisualHistogramDesc::Similarity : number of histogram bins differs from current descriptor",__FILE__,__LINE__); } *************** *** 320,325 **** return (this->*m_similarityFct)(i_candidate); } ! catch (BaseException *e) { ! throw e->add(new GeneralException("Exception caught in VisualHistogramDesc::Similarity:",__FILE__,__LINE__)); } } --- 320,325 ---- return (this->*m_similarityFct)(i_candidate); } ! catch (FD::BaseException *e) { ! throw e->add(new FD::GeneralException("Exception caught in VisualHistogramDesc::Similarity:",__FILE__,__LINE__)); } } *************** *** 329,337 **** try { if (m_totalBins != i_size ) { ! throw new GeneralException ("VisualHistogramDesc::Adapt : number of histogram bins differs from current descriptor",__FILE__,__LINE__); } if (i_rate < 0.0 || i_rate > 1.0) { ! throw new GeneralException ("VisualHistogramDesc::Adapt : adaptation rate must be in the interval [0.0,1.0]",__FILE__,__LINE__); } --- 329,337 ---- try { if (m_totalBins != i_size ) { ! throw new FD::GeneralException ("VisualHistogramDesc::Adapt : number of histogram bins differs from current descriptor",__FILE__,__LINE__); } if (i_rate < 0.0 || i_rate > 1.0) { ! throw new FD::GeneralException ("VisualHistogramDesc::Adapt : adaptation rate must be in the interval [0.0,1.0]",__FILE__,__LINE__); } *************** *** 349,354 **** (this->*m_adaptFct)(i_candidate, i_rate); } ! catch (BaseException *e) { ! throw e->add(new GeneralException("Exception caught in VisualHistogramDesc::Adapt:",__FILE__,__LINE__)); } } --- 349,354 ---- (this->*m_adaptFct)(i_candidate, i_rate); } ! catch (FD::BaseException *e) { ! throw e->add(new FD::GeneralException("Exception caught in VisualHistogramDesc::Adapt:",__FILE__,__LINE__)); } } *************** *** 358,362 **** { if (!m_bins) { ! throw new GeneralException ("VisualHistogramDesc::ComputeHistStd : histogram bins must be initialized.",__FILE__,__LINE__); } --- 358,362 ---- { if (!m_bins) { ! throw new FD::GeneralException ("VisualHistogramDesc::ComputeHistStd : histogram bins must be initialized.",__FILE__,__LINE__); } *************** *** 442,446 **** if (indx < 0 || indx >= m_totalBins) { ! throw new GeneralException ("VisualHistogramDesc::ComputeHistStd : invalid histogram bin index",__FILE__,__LINE__); } --- 442,446 ---- if (indx < 0 || indx >= m_totalBins) { ! throw new FD::GeneralException ("VisualHistogramDesc::ComputeHistStd : invalid histogram bin index",__FILE__,__LINE__); } *************** *** 468,472 **** { if (!m_bins) { ! throw new GeneralException ("VisualHistogramDesc::ComputeKernelWeightedHist : histogram bins must be initialized.",__FILE__,__LINE__); } --- 468,472 ---- { if (!m_bins) { ! throw new FD::GeneralException ("VisualHistogramDesc::ComputeKernelWeightedHist : histogram bins must be initialized.",__FILE__,__LINE__); } *************** *** 555,559 **** if (indx < 0 || indx >= m_totalBins) { ! throw new GeneralException ("VisualHistogramDesc::ComputeKernelWeightedHist : invalid histogram bin index",__FILE__,__LINE__); } --- 555,559 ---- if (indx < 0 || indx >= m_totalBins) { ! throw new FD::GeneralException ("VisualHistogramDesc::ComputeKernelWeightedHist : invalid histogram bin index",__FILE__,__LINE__); } *************** *** 589,596 **** void ComputeMSLocation(const FeatType* i_featMap, FeatType i_maxValPlusOne, BinType i_binIncScale, int i_width, int i_height, const VisualROI *i_roi, ! const BinType *i_refBins, double i_cueWeight, Vector<double> *o_msLoc) { if (!m_bins) { ! throw new GeneralException ("VisualHistogramDesc::ComputeMSLocation : histogram bins must be initialized.",__FILE__,__LINE__); } --- 589,596 ---- void ComputeMSLocation(const FeatType* i_featMap, FeatType i_maxValPlusOne, BinType i_binIncScale, int i_width, int i_height, const VisualROI *i_roi, ! const BinType *i_refBins, double i_cueWeight, FD::Vector<double> *o_msLoc) { if (!m_bins) { ! throw new FD::GeneralException ("VisualHistogramDesc::ComputeMSLocation : histogram bins must be initialized.",__FILE__,__LINE__); } *************** *** 664,668 **** if (indx < 0 || indx >= m_totalBins) { ! throw new GeneralException ("VisualHistogramDesc::ComputeMSLocation : invalid histogram bin index",__FILE__,__LINE__); } --- 664,668 ---- if (indx < 0 || indx >= m_totalBins) { ! throw new FD::GeneralException ("VisualHistogramDesc::ComputeMSLocation : invalid histogram bin index",__FILE__,__LINE__); } *************** *** 787,791 **** { if (m_totalBins != i_size ) { ! throw new GeneralException ("VisualHistogramDesc::SetFeatures : number of histogram bins differs from current descriptor",__FILE__,__LINE__); } --- 787,791 ---- { if (m_totalBins != i_size ) { ! throw new FD::GeneralException ("VisualHistogramDesc::SetFeatures : number of histogram bins differs from current descriptor",__FILE__,__LINE__); } *************** *** 824,829 **** return sqrt(1.0-BhattacharyyaCoeff(i_candidateBins)); } ! catch (BaseException *e) { ! throw e->add(new GeneralException("Exception caught in VisualHistogramDesc::BhattacharyyaDist:",__FILE__,__LINE__)); } } --- 824,829 ---- return sqrt(1.0-BhattacharyyaCoeff(i_candidateBins)); } ! catch (FD::BaseException *e) { ! throw e->add(new FD::GeneralException("Exception caught in VisualHistogramDesc::BhattacharyyaDist:",__FILE__,__LINE__)); } } Index: VisualROI.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/VisualROI.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VisualROI.h 12 Apr 2005 19:38:34 -0000 1.2 --- VisualROI.h 12 Apr 2005 20:09:06 -0000 1.3 *************** *** 33,37 **** } e_VISUALROI_type; ! class VisualROI : public Object { public: --- 33,37 ---- } e_VISUALROI_type; ! class VisualROI : public FD::Object { public: *************** *** 48,55 **** // Default routine to print a VisualROI object to an output stream ! void printOn(ostream &out) const; // Default routine to read a VisualROI object from an input stream ! void readFrom(istream &in); void DrawROI(IplImage *io_frame, const unsigned char *i_color) const; --- 48,55 ---- // Default routine to print a VisualROI object to an output stream ! void printOn(std::ostream &out) const; // Default routine to read a VisualROI object from an input stream ! void readFrom(std::istream &in); void DrawROI(IplImage *io_frame, const unsigned char *i_color) const; Index: VisualFeatureDesc.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/VisualFeatureDesc.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VisualFeatureDesc.h 12 Apr 2005 19:38:34 -0000 1.2 --- VisualFeatureDesc.h 12 Apr 2005 20:09:05 -0000 1.3 *************** *** 38,42 **** // template <class FeatBaseType> ! class VisualFeatureDesc : public Object { friend std::ostream &operator<<(std::ostream &o_out, const VisualFeatureDesc<FeatBaseType> &i_ref) --- 38,42 ---- // template <class FeatBaseType> ! class VisualFeatureDesc : public FD::Object { friend std::ostream &operator<<(std::ostream &o_out, const VisualFeatureDesc<FeatBaseType> &i_ref) *************** *** 47,52 **** return o_out; } ! catch (BaseException *e) { ! throw e->add(new GeneralException("Exception in VisualFeatureDesc::operator<<:",__FILE__,__LINE__)); } } --- 47,52 ---- return o_out; } ! catch (FD::BaseException *e) { ! throw e->add(new FD::GeneralException("Exception in VisualFeatureDesc::operator<<:",__FILE__,__LINE__)); } } *************** *** 59,64 **** return i_in; } ! catch (BaseException *e) { ! throw e->add(new GeneralException("Exception in VisualFeatureDesc::operator>>:",__FILE__,__LINE__)); } } --- 59,64 ---- return i_in; } ! catch (FD::BaseException *e) { ! throw e->add(new FD::GeneralException("Exception in VisualFeatureDesc::operator>>:",__FILE__,__LINE__)); } } *************** *** 106,110 **** virtual void printOn(std::ostream &out) const { ! throw new GeneralException("Exception in VisualFeatureDesc::printOn: cannot use base class routine.",__FILE__,__LINE__); } --- 106,110 ---- virtual void printOn(std::ostream &out) const { ! throw new FD::GeneralException("Exception in VisualFeatureDesc::printOn: cannot use base class routine.",__FILE__,__LINE__); } *************** *** 112,141 **** virtual void readFrom(std::istream &in) { ! throw new GeneralException("Exception in VisualFeatureDesc::readFrom: cannot use base class routine.",__FILE__,__LINE__); } virtual double Similarity(const FeatBaseType *i_candidate, unsigned int i_size) const { ! throw new GeneralException("Exception in VisualFeatureDesc::Similarity: cannot use base class routine.",__FILE__,__LINE__); } virtual void Adapt(const FeatBaseType *i_candidate, unsigned int i_size, double i_rate) { ! throw new GeneralException("Exception in VisualFeatureDesc::Adapt: cannot use base class routine.",__FILE__,__LINE__); } virtual unsigned int GetSize() const { ! throw new GeneralException("Exception in VisualFeatureDesc::GetSize: cannot use base class routine.",__FILE__,__LINE__); } virtual FeatBaseType *GetFeatures() { ! throw new GeneralException("Exception in VisualFeatureDesc::GetFeatures: cannot use base class routine.",__FILE__,__LINE__); } virtual const FeatBaseType *GetCstFeatures() const { ! throw new GeneralException("Exception in VisualFeatureDesc::GetCstFeatures: cannot use base class routine.",__FILE__,__LINE__); } --- 112,141 ---- virtual void readFrom(std::istream &in) { ! throw new FD::GeneralException("Exception in VisualFeatureDesc::readFrom: cannot use base class routine.",__FILE__,__LINE__); } virtual double Similarity(const FeatBaseType *i_candidate, unsigned int i_size) const { ! throw new FD::GeneralException("Exception in VisualFeatureDesc::Similarity: cannot use base class routine.",__FILE__,__LINE__); } virtual void Adapt(const FeatBaseType *i_candidate, unsigned int i_size, double i_rate) { ! throw new FD::GeneralException("Exception in VisualFeatureDesc::Adapt: cannot use base class routine.",__FILE__,__LINE__); } virtual unsigned int GetSize() const { ! throw new FD::GeneralException("Exception in VisualFeatureDesc::GetSize: cannot use base class routine.",__FILE__,__LINE__); } virtual FeatBaseType *GetFeatures() { ! throw new FD::GeneralException("Exception in VisualFeatureDesc::GetFeatures: cannot use base class routine.",__FILE__,__LINE__); } virtual const FeatBaseType *GetCstFeatures() const { ! throw new FD::GeneralException("Exception in VisualFeatureDesc::GetCstFeatures: cannot use base class routine.",__FILE__,__LINE__); } *************** *** 149,158 **** virtual void SetSize(unsigned int i_size) { ! throw new GeneralException("Exception in VisualFeatureDesc::SetSize: cannot use base class routine.",__FILE__,__LINE__); } virtual void SetFeatures(const FeatBaseType *i_ref, unsigned int i_size) { ! throw new GeneralException("Exception in VisualFeatureDesc::SetFeatures: cannot use base class routine.",__FILE__,__LINE__); } --- 149,158 ---- virtual void SetSize(unsigned int i_size) { ! throw new FD::GeneralException("Exception in VisualFeatureDesc::SetSize: cannot use base class routine.",__FILE__,__LINE__); } virtual void SetFeatures(const FeatBaseType *i_ref, unsigned int i_size) { ! throw new FD::GeneralException("Exception in VisualFeatureDesc::SetFeatures: cannot use base class routine.",__FILE__,__LINE__); } Index: VisualTargetManager.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/VisualTargetManager.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VisualTargetManager.h 12 Apr 2005 19:38:34 -0000 1.2 --- VisualTargetManager.h 12 Apr 2005 20:09:06 -0000 1.3 *************** *** 29,57 **** namespace RobotFlow { ! class VisualTargetManager : public BufferedNode { ! friend class BufferedNode; public: VisualTargetManager(); ! VisualTargetManager(string nodeName, ParameterSet params); virtual ~VisualTargetManager(); // Default routine to print a VisualTargetManager object to an output stream ! void printOn(ostream &out) const { ! throw new GeneralException("Exception in VisualTargetManager::printOn: method not yet implemented.",__FILE__,__LINE__); } // Default routine to read a VisualTargetManager object from an input stream ! void readFrom(istream &in) { ! throw new GeneralException("Exception in VisualTargetManager::printOn: method not yet implemented.",__FILE__,__LINE__); } ! virtual void request(int output_id, const ParameterSet &req); ! void calculate(int output_id, int count, Buffer &out); private: --- 29,57 ---- namespace RobotFlow { ! class VisualTargetManager : public FD::BufferedNode { ! friend class FD::BufferedNode; public: VisualTargetManager(); ! VisualTargetManager(std::string nodeName, FD::ParameterSet params); virtual ~VisualTargetManager(); // Default routine to print a VisualTargetManager object to an output stream ! void printOn(std::ostream &out) const { ! throw new FD::GeneralException("Exception in VisualTargetManager::printOn: method not yet implemented.",__FILE__,__LINE__); } // Default routine to read a VisualTargetManager object from an input stream ! void readFrom(std::istream &in) { ! throw new FD::GeneralException("Exception in VisualTargetManager::printOn: method not yet implemented.",__FILE__,__LINE__); } ! virtual void request(int output_id, const FD::ParameterSet &req); ! void calculate(int output_id, int count, FD::Buffer &out); private: *************** *** 91,95 **** VisualTarget<double> *m_target; ! RCPtr<VisualTarget<double> > m_refTarget; //RCPtr<VisualROI> m_refROI; --- 91,95 ---- VisualTarget<double> *m_target; ! FD::RCPtr<VisualTarget<double> > m_refTarget; //RCPtr<VisualROI> m_refROI; Index: VisualTracker.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/VisualTracker.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VisualTracker.h 12 Apr 2005 19:38:34 -0000 1.2 --- VisualTracker.h 12 Apr 2005 20:09:06 -0000 1.3 *************** *** 29,33 **** namespace RobotFlow { ! class VisualTracker : public BufferedNode { public: --- 29,33 ---- namespace RobotFlow { ! class VisualTracker : public FD::BufferedNode { public: *************** *** 37,41 **** } ! VisualTracker(string nodeName, ParameterSet params) : BufferedNode(nodeName, params) { --- 37,41 ---- } ! VisualTracker(std::string nodeName, FD::ParameterSet params) : BufferedNode(nodeName, params) { *************** *** 49,58 **** // Default routine to print a VisualTracker object to an output stream ! virtual void printOn(ostream &out) const = 0; // Default routine to read a VisualTracker object from an input stream ! virtual void readFrom(istream &in) = 0; ! virtual void calculate(int output_id, int count, Buffer &out) = 0; //virtual void TrackTarget() = 0; --- 49,58 ---- // Default routine to print a VisualTracker object to an output stream ! virtual void printOn(std::ostream &out) const = 0; // Default routine to read a VisualTracker object from an input stream ! virtual void readFrom(std::istream &in) = 0; ! virtual void calculate(int output_id, int count, FD::Buffer &out) = 0; //virtual void TrackTarget() = 0; Index: ColorHistExtraction.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Vision/include/ColorHistExtraction.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ColorHistExtraction.h 12 Apr 2005 19:38:34 -0000 1.2 --- ColorHistExtraction.h 12 Apr 2005 20:09:04 -0000 1.3 *************** *** 40,44 **** // ColorHistExtraction(int i_width, int i_height, ! int i_numChannels, const Vector<int> *i_numBins); // --- 40,44 ---- // ColorHistExtraction(int i_width, int i_height, ! int i_numChannels, const FD::Vector<int> *i_numBins); // *************** *** 50,59 **** // BufferedNode constructor // ! ColorHistExtraction(string nodeName, ParameterSet params); // // Constructor using input stream // ! ColorHistExtraction(istream &in) { readFrom(in); --- 50,59 ---- // BufferedNode constructor // ! ColorHistExtraction(std::string nodeName, FD::ParameterSet params); // // Constructor using input stream // ! ColorHistExtraction(std::istream &in) { readFrom(in); *************** *** 63,80 **** // Default routine to print a ColorHistExtraction object to an output stream ! void printOn(ostream &out) const { ! throw new GeneralException("Exception in ColorHistExtraction::printOn: method not yet implemented.",__FILE__,__LINE__); } // Default routine to read a ColorHistExtraction object from an input stream ! void readFrom(istream &in) { ! throw new GeneralException("Exception in ColorHistExtraction::readFrom: method not yet implemented.",__FILE__,__LINE__); } ! virtual void request(int output_id, const ParameterSet &req); ! void calculate(int output_id, int count, Buffer &out); void ExtractFeatures(VisualROI *i_roi); --- 63,80 ---- // Default routine to print a ColorHistExtraction object to an output stream ! void printOn(std::ostream &out) const { ! throw new FD::GeneralException("Exception in ColorHistExtraction::printOn: method not yet implemented.",__FILE__,__LINE__); } // Default routine to read a ColorHistExtraction object from an input stream ! void readFrom(std::istream &in) { ! throw new FD::GeneralException("Exception in ColorHistExtraction::readFrom: method not yet implemented.",__FILE__,__LINE__); } ! virtual void request(int output_id, const FD::ParameterSet &req); ! void calculate(int output_id, int count, FD::Buffer &out); void ExtractFeatures(VisualROI *i_roi); *************** *** 83,87 **** void EstimateMSLocation(const VisualTarget<double> *i_targetRef, ! int i_descIdx, Vector<double> *o_msLocVec); VisualFeatureDesc<double> *GetDescriptor() --- 83,87 ---- void EstimateMSLocation(const VisualTarget<double> *i_targetRef, ! int i_descIdx, FD::Vector<double> *o_msLocVec); VisualFeatureDesc<double> *GetDescriptor() *************** *** 96,100 **** private: ! void Initialize(const Vector<int> *i_numBins); private: --- 96,100 ---- private: ! void Initialize(const FD::Vector<int> *i_numBins); private: |