123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- #ifndef PPGRAPHCUTINCLUDE
- #define PPGRAPHCUTINCLUDE
- #include "core/image/MultiChannelImageT.h"
- #include "vislearning/cbaselib/CachedExample.h"
- #include "vislearning/baselib/Preprocess.h"
- #include "vislearning/baselib/Globals.h"
- #include "vislearning/classifier/fpclassifier/randomforest/FPCRandomForests.h"
- #include <vislearning/features/fpfeatures/VectorFeature.h>
- #include "vislearning/cbaselib/ClassNames.h"
- #include "segmentation/RSMeanShift.h"
- #include "vislearning/mrf/mrfmin/GCoptimization.h"
- namespace OBJREC
- {
- class PPGraphCut : public NICE::Persistent
- {
- protected:
-
- const NICE::Config *conf;
-
- int classno;
-
- Examples shapefeats;
-
- FPCRandomForests *rf;
- double *coocurence;
- public:
-
- PPGraphCut();
-
- PPGraphCut ( const NICE::Config *_conf );
-
- ~PPGraphCut();
-
- void setClassNo ( int _classno );
-
- void Init();
-
- void trainImage ( Examples ®ions, NICE::Matrix &mask );
-
- void trainImage ( RegionGraph ®ions );
-
- void finishPP ( ClassNames &cn );
-
- void optimizeImage ( Examples ®ions, NICE::Matrix &mask, NICE::MultiChannelImageT<double> & probabilities );
-
- void optimizeImage ( OBJREC::RegionGraph ®ions, std::vector<std::vector<double> > & probabilities );
-
- void restore ( std::istream & is, int format = 0 );
-
- void store ( std::ostream & os, int format = 0 ) const;
-
- void clear ();
- };
- }
- #endif
|