#include <sdet_mrf_bp.h>

Public Member Functions | |
| sdet_mrf_bp (unsigned ni, unsigned nj, unsigned n_labels) | |
| simple constructor for testing. | |
| sdet_mrf_bp (vil_image_resource_sptr obs_labels, unsigned n_labels, float discontinuity_cost, float truncation_cost, float kappa, float lambda) | |
| constructor with observed labels provided by resc. | |
| sdet_mrf_bp (vil_image_view< float > const &obs_labels, unsigned n_labels, float discontinuity_cost, float truncation_cost, float kappa, float lambda) | |
| constructor with observed labels view. | |
| sdet_mrf_bp (vil_image_resource_sptr obs_labels, vil_image_resource_sptr var, unsigned n_labels, float discontinuity_cost, float truncation_cost, float kappa, float lambda) | |
| constructor with observed labels and variance resources. | |
| sdet_mrf_bp (vil_image_view< float > const &obs_labels, vil_image_view< float > const &var, unsigned n_labels, float discontinuity_cost, float truncation_cost, float kappa, float lambda) | |
| constructor with observed label and variance views. | |
| void | set_discontinuity_cost (float discontinuity_cost) |
| limit cost at a discontinuity. | |
| void | set_truncation_cost (float truncation_cost) |
| truncation of data cost. | |
| void | set_lambda (float lambda) |
| contribution of data to cost. | |
| void | set_kappa (float kappa) |
| the contribution of neighbor label difference to cost. | |
| unsigned | image_to_index (unsigned i, unsigned j) |
| transform from image coordinates to node indices. | |
| void | index_to_image (unsigned p, unsigned &i, unsigned &j) |
| transform from node indices to image coordinates. | |
| unsigned | ni () const |
| mrf dimension (columns). | |
| unsigned | nj () const |
| mrf dimension (rows). | |
| sdet_mrf_site_bp_sptr | site (unsigned i, unsigned j) |
| retrieve a site by image index. | |
| sdet_mrf_site_bp_sptr | site (unsigned p) |
| retrieve a site by linear index. | |
| vcl_vector< float > | prior_message (unsigned i, unsigned j, unsigned n) |
| get the contents of a prior message buffer. | |
| void | set_prior_message (unsigned i, unsigned j, unsigned n, vcl_vector< float > const &msg) |
| set the contents of a prior message buffer. | |
| void | send_messages_optimized () |
| all sites send messages to current buffer of neighbors, using an O(n_labels) algorithm based on the lower envelope | |
| void | clear () |
| clear messages from all sites. | |
| void | print_prior_messages () |
| all sites print the contents of the prior buffers. | |
| void | print_belief_vectors () |
| all sites print their belief vector. | |
| vil_image_resource_sptr | belief_image () |
| output. | |
| void | ref () |
| void | unref () |
| int | get_references () const |
| bool | is_referenced () const |
Protected Member Functions | |
| sdet_mrf_bp () | |
Protected Attributes | |
| unsigned | ni_ |
| unsigned | nj_ |
| unsigned | n_labels_ |
| float | discontinuity_cost_ |
| float | truncation_cost_ |
| float | kappa_ |
| float | lambda_ |
| float | min_ |
| float | max_ |
| vbl_array_2d < sdet_mrf_site_bp_sptr > | sites_ |
Definition at line 22 of file sdet_mrf_bp.h.
| sdet_mrf_bp::sdet_mrf_bp | ( | unsigned | ni, |
| unsigned | nj, | ||
| unsigned | n_labels | ||
| ) |
simple constructor for testing.
Definition at line 72 of file sdet_mrf_bp.cxx.
| sdet_mrf_bp::sdet_mrf_bp | ( | vil_image_resource_sptr | obs_labels, |
| unsigned | n_labels, | ||
| float | discontinuity_cost, | ||
| float | truncation_cost, | ||
| float | kappa, | ||
| float | lambda | ||
| ) |
constructor with observed labels provided by resc.
In this case the data cost is just
Definition at line 83 of file sdet_mrf_bp.cxx.
| sdet_mrf_bp::sdet_mrf_bp | ( | vil_image_view< float > const & | obs_labels, |
| unsigned | n_labels, | ||
| float | discontinuity_cost, | ||
| float | truncation_cost, | ||
| float | kappa, | ||
| float | lambda | ||
| ) |
constructor with observed labels view.
Definition at line 108 of file sdet_mrf_bp.cxx.
| sdet_mrf_bp::sdet_mrf_bp | ( | vil_image_resource_sptr | obs_labels, |
| vil_image_resource_sptr | var, | ||
| unsigned | n_labels, | ||
| float | discontinuity_cost, | ||
| float | truncation_cost, | ||
| float | kappa, | ||
| float | lambda | ||
| ) |
constructor with observed labels and variance resources.
Definition at line 157 of file sdet_mrf_bp.cxx.
| sdet_mrf_bp::sdet_mrf_bp | ( | vil_image_view< float > const & | obs_labels, |
| vil_image_view< float > const & | var, | ||
| unsigned | n_labels, | ||
| float | discontinuity_cost, | ||
| float | truncation_cost, | ||
| float | kappa, | ||
| float | lambda | ||
| ) |
constructor with observed label and variance views.
Definition at line 130 of file sdet_mrf_bp.cxx.
| sdet_mrf_bp::sdet_mrf_bp | ( | ) | [protected] |
| vil_image_resource_sptr sdet_mrf_bp::belief_image | ( | ) |
output.
Definition at line 275 of file sdet_mrf_bp.cxx.
| void sdet_mrf_bp::clear | ( | ) |
clear messages from all sites.
Definition at line 301 of file sdet_mrf_bp.cxx.
| unsigned sdet_mrf_bp::image_to_index | ( | unsigned | i, |
| unsigned | j | ||
| ) | [inline] |
transform from image coordinates to node indices.
Definition at line 66 of file sdet_mrf_bp.h.
| void sdet_mrf_bp::index_to_image | ( | unsigned | p, |
| unsigned & | i, | ||
| unsigned & | j | ||
| ) | [inline] |
transform from node indices to image coordinates.
Definition at line 69 of file sdet_mrf_bp.h.
| unsigned sdet_mrf_bp::ni | ( | ) | const [inline] |
mrf dimension (columns).
Definition at line 73 of file sdet_mrf_bp.h.
| unsigned sdet_mrf_bp::nj | ( | ) | const [inline] |
mrf dimension (rows).
Definition at line 75 of file sdet_mrf_bp.h.
| void sdet_mrf_bp::print_belief_vectors | ( | ) |
all sites print their belief vector.
Definition at line 265 of file sdet_mrf_bp.cxx.
| void sdet_mrf_bp::print_prior_messages | ( | ) |
all sites print the contents of the prior buffers.
Definition at line 250 of file sdet_mrf_bp.cxx.
| vcl_vector< float > sdet_mrf_bp::prior_message | ( | unsigned | i, |
| unsigned | j, | ||
| unsigned | n | ||
| ) |
get the contents of a prior message buffer.
Definition at line 295 of file sdet_mrf_bp.cxx.
| void sdet_mrf_bp::send_messages_optimized | ( | ) |
all sites send messages to current buffer of neighbors, using an O(n_labels) algorithm based on the lower envelope
Definition at line 186 of file sdet_mrf_bp.cxx.
| void sdet_mrf_bp::set_discontinuity_cost | ( | float | discontinuity_cost | ) | [inline] |
limit cost at a discontinuity.
Definition at line 52 of file sdet_mrf_bp.h.
| void sdet_mrf_bp::set_kappa | ( | float | kappa | ) | [inline] |
the contribution of neighbor label difference to cost.
Definition at line 63 of file sdet_mrf_bp.h.
| void sdet_mrf_bp::set_lambda | ( | float | lambda | ) | [inline] |
contribution of data to cost.
Definition at line 60 of file sdet_mrf_bp.h.
| void sdet_mrf_bp::set_prior_message | ( | unsigned | i, |
| unsigned | j, | ||
| unsigned | n, | ||
| vcl_vector< float > const & | msg | ||
| ) |
set the contents of a prior message buffer.
Definition at line 244 of file sdet_mrf_bp.cxx.
| void sdet_mrf_bp::set_truncation_cost | ( | float | truncation_cost | ) | [inline] |
truncation of data cost.
Definition at line 56 of file sdet_mrf_bp.h.
| sdet_mrf_site_bp_sptr sdet_mrf_bp::site | ( | unsigned | i, |
| unsigned | j | ||
| ) | [inline] |
retrieve a site by image index.
Definition at line 78 of file sdet_mrf_bp.h.
| sdet_mrf_site_bp_sptr sdet_mrf_bp::site | ( | unsigned | p | ) | [inline] |
retrieve a site by linear index.
Definition at line 81 of file sdet_mrf_bp.h.
float sdet_mrf_bp::discontinuity_cost_ [protected] |
Definition at line 113 of file sdet_mrf_bp.h.
float sdet_mrf_bp::kappa_ [protected] |
Definition at line 115 of file sdet_mrf_bp.h.
float sdet_mrf_bp::lambda_ [protected] |
Definition at line 116 of file sdet_mrf_bp.h.
float sdet_mrf_bp::max_ [protected] |
Definition at line 118 of file sdet_mrf_bp.h.
float sdet_mrf_bp::min_ [protected] |
Definition at line 117 of file sdet_mrf_bp.h.
unsigned sdet_mrf_bp::n_labels_ [protected] |
Definition at line 112 of file sdet_mrf_bp.h.
unsigned sdet_mrf_bp::ni_ [protected] |
Definition at line 110 of file sdet_mrf_bp.h.
unsigned sdet_mrf_bp::nj_ [protected] |
Definition at line 111 of file sdet_mrf_bp.h.
vbl_array_2d<sdet_mrf_site_bp_sptr> sdet_mrf_bp::sites_ [protected] |
Definition at line 120 of file sdet_mrf_bp.h.
float sdet_mrf_bp::truncation_cost_ [protected] |
Definition at line 114 of file sdet_mrf_bp.h.
1.7.5.1