KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
foreground_mask.h
Go to the documentation of this file.
1 /* ======================================================================== *
2  | |
3  | Copyright (c) 2007-2010, by members of University of Arizona Computer |
4  | Vision group (the authors) including |
5  | Luca Del Pero, Andrew Predoehl. |
6  | |
7  | For use outside the University of Arizona Computer Vision group please |
8  | contact Kobus Barnard. |
9  | |
10  * ======================================================================== */
11 
12 /* $Id: l_int_matrix.h 11118 2011-11-14 16:28:44Z ksimek $ */
13 
14 #ifndef EDGE_CPP_FOREGROUND_MASK_H
15 #define EDGE_CPP_FOREGROUND_MASK_H
16 
37 #include "m_cpp/m_int_matrix.h"
38 #include <ostream>
39 #define VERY_SMALL_POSITIVE_NUMBER 1e-20
40 /* /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ /\ */
41 
42 
43 namespace kjb {
44 
46 {
47 public:
49 
50  Foreground_mask(const std::string& file_name);
51 
53  {
54 
55  }
56 
57  const Impl_type & get_c_matrix() const
58  {
59  // Test program was HERE.
60  return mask_matrix;
61  }
62 
63  void draw_foreground_image(const std::string & output_path);
64 
65  double calc_overlap_ratio(const Impl_type& predicted_mask);
66 private:
67 
68  double total_size;
69  Impl_type mask_matrix; // the mask matrix, 1 for foreground, 0 for background
70 };
71 }
72 
73 #endif
Definition: foreground_mask.h:45
Foreground_mask(const std::string &file_name)
Definition: foreground_mask.cpp:38
This class implements matrices, in the linear-algebra sense, restricted to integer-valued elements...
Definition: l_int_matrix.h:71
~Foreground_mask()
Definition: foreground_mask.h:52
double calc_overlap_ratio(const Impl_type &predicted_mask)
Definition: foreground_mask.cpp:44
void draw_foreground_image(const std::string &output_path)
Definition: foreground_mask.cpp:65
Int_matrix Impl_type
the underlying implementation
Definition: foreground_mask.h:48
const Impl_type & get_c_matrix() const
Definition: foreground_mask.h:57