123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- namespace OBJREC
- {
- /** tools for semantic segmentation */
- class SemSegTools
- {
- protected:
- public:
- /**
- * @brief produce an image with segmentation result as overlay
- * @param orig original input image
- * @param segment segmentation result
- * @param result overlay image
- */
- static void segmentToOverlay (
- const NICE::Image * orig,
- const NICE::ColorImage & segment,
- NICE::ColorImage & result );
-
- static void updateConfusionMatrix (
- const NICE::ImageT<int> & img,
- const NICE::ImageT<int> & gt,
- NICE::Matrix & M,
- const std::set<int> & forbiddenClasses,
- std::map<int,int> & classMapping );
-
- static void computeClassificationStatistics (
- NICE::Matrix & confMat,
- const OBJREC::ClassNames & classNames,
- const std::set<int> & forbiddenClasses,
- std::map<int,int> & classMappingInv );
-
- static void computeResourceStatistics (
- NICE::ResourceStatistics & rs );
-
- static void saveResultsToImageFile (
- const NICE::Config * conf,
- const std::string & section,
- const NICE::ColorImage & orig,
- const NICE::ColorImage & gtruth,
- const NICE::ColorImage & segment,
- const std::string & file,
- std::string & outStr );
-
- static void getDepthVector (
- const LabeledSet *Files,
- std::vector<int> & depthVec,
- const bool run3dseg );
-
- static void collectTrainingExamples (
- const NICE::Config * conf,
- const std::string & section,
- const LabeledSet & train,
- const ClassNames & cn,
- Examples & examples,
- std::vector<CachedExample *> & imgexamples,
- const bool run3Dseg = false );
- };
- }
|