A background-foreground mask to detect boundaries or ribbons or corners. More...
#include <bbgm_features.h>
Public Member Functions | |
bbgm_mask_feature () | |
bbgm_mask_feature (brip_rect_mask::mask_id mid, brip_rect_mask::ang_id aid) | |
void | set_prob (brip_rect_mask::mask_id mid, brip_rect_mask::ang_id aid, float p) |
set the probability value if the input probability is higher. | |
void | force_prob (float p) |
set the probability value unconditionally. | |
brip_rect_mask::mask_id | mask_id () const |
the mask id corresponding to current probability. | |
brip_rect_mask::ang_id | ang_id () const |
the angle id for the current mask id. | |
unsigned | ni () const |
unsigned | nj () const |
float | operator() () const |
probability for the current template mask and angle. | |
unsigned | id () const |
mask id. | |
vcl_vector< vgl_point_2d < unsigned short > > | pixels (unsigned i, unsigned j) |
pixels corresponding to + elements of the mask centered on (i, j). | |
virtual vcl_string | is_a () const |
Return a string name. | |
virtual bbgm_mask_feature * | clone () const |
short | version () const |
Return IO version number. | |
virtual void | b_write (vsl_b_ostream &os) const |
Binary save self to stream. | |
virtual void | b_read (vsl_b_istream &is) |
Binary load self from stream. | |
Protected Attributes | |
unsigned | id_ |
unsigned char | mid_ |
unsigned char | aid_ |
float | p_ |
Static Protected Attributes | |
static unsigned | uid_ = 0 |
A background-foreground mask to detect boundaries or ribbons or corners.
Definition at line 29 of file bbgm_features.h.
bbgm_mask_feature::bbgm_mask_feature | ( | ) | [inline] |
Definition at line 32 of file bbgm_features.h.
bbgm_mask_feature::bbgm_mask_feature | ( | brip_rect_mask::mask_id | mid, |
brip_rect_mask::ang_id | aid | ||
) | [inline] |
Definition at line 37 of file bbgm_features.h.
brip_rect_mask::ang_id bbgm_mask_feature::ang_id | ( | ) | const [inline] |
the angle id for the current mask id.
Definition at line 59 of file bbgm_features.h.
void bbgm_mask_feature::b_read | ( | vsl_b_istream & | is | ) | [virtual] |
Binary load self from stream.
Definition at line 96 of file bbgm_features.cxx.
void bbgm_mask_feature::b_write | ( | vsl_b_ostream & | os | ) | const [virtual] |
Binary save self to stream.
Definition at line 86 of file bbgm_features.cxx.
bbgm_mask_feature * bbgm_mask_feature::clone | ( | ) | const [virtual] |
Definition at line 70 of file bbgm_features.cxx.
void bbgm_mask_feature::force_prob | ( | float | p | ) | [inline] |
set the probability value unconditionally.
Definition at line 52 of file bbgm_features.h.
unsigned bbgm_mask_feature::id | ( | ) | const [inline] |
mask id.
Definition at line 70 of file bbgm_features.h.
vcl_string bbgm_mask_feature::is_a | ( | ) | const [virtual] |
Return a string name.
Definition at line 64 of file bbgm_features.cxx.
brip_rect_mask::mask_id bbgm_mask_feature::mask_id | ( | ) | const [inline] |
the mask id corresponding to current probability.
Definition at line 55 of file bbgm_features.h.
unsigned bbgm_mask_feature::ni | ( | ) | const |
Definition at line 17 of file bbgm_features.cxx.
unsigned bbgm_mask_feature::nj | ( | ) | const |
Definition at line 26 of file bbgm_features.cxx.
float bbgm_mask_feature::operator() | ( | ) | const [inline] |
probability for the current template mask and angle.
Definition at line 67 of file bbgm_features.h.
vcl_vector< vgl_point_2d< unsigned short > > bbgm_mask_feature::pixels | ( | unsigned | i, |
unsigned | j | ||
) |
pixels corresponding to + elements of the mask centered on (i, j).
Definition at line 36 of file bbgm_features.cxx.
void bbgm_mask_feature::set_prob | ( | brip_rect_mask::mask_id | mid, |
brip_rect_mask::ang_id | aid, | ||
float | p | ||
) | [inline] |
set the probability value if the input probability is higher.
Definition at line 42 of file bbgm_features.h.
short bbgm_mask_feature::version | ( | ) | const |
Return IO version number.
Return IO version number;.
Definition at line 78 of file bbgm_features.cxx.
unsigned char bbgm_mask_feature::aid_ [protected] |
Definition at line 98 of file bbgm_features.h.
unsigned bbgm_mask_feature::id_ [protected] |
Definition at line 96 of file bbgm_features.h.
unsigned char bbgm_mask_feature::mid_ [protected] |
Definition at line 97 of file bbgm_features.h.
float bbgm_mask_feature::p_ [protected] |
Definition at line 99 of file bbgm_features.h.
unsigned bbgm_mask_feature::uid_ = 0 [static, protected] |
Definition at line 95 of file bbgm_features.h.