61 return (ratio - ratio.
mean()).fro_norm();
64 #define implement_converters(U,V) \ 65 vnl_matrix<U> make_matrix_ ## U(vnl_matrix<V> const& M) \ 67 unsigned m = M.rows(); \ 68 unsigned n = M.columns(); \ 69 vnl_matrix<U> ret(m, n); \ 70 for (unsigned i = 0; i < m; ++i) \ 71 for (unsigned j = 0; j < n; ++j) \ 72 ret(i,j) = static_cast<U>(M(i,j)); \ 76 vnl_vector<U> make_vector_ ## U(vnl_vector<V> const& v) \ 78 unsigned n = v.size(); \ 79 vnl_vector<U> ret(n); \ 80 for (unsigned i = 0; i < n; ++i) \ 81 ret[i] = static_cast<U>(v[i]); \ 91 return make_matrix_double(M);
96 return make_matrix_float(M);
101 return make_vector_double(M);
106 return make_vector_float(M);
static double homg_diff(vnl_matrix< double > const &A, vnl_matrix< double > const &B)
Return fro_norm( (A .
#define implement_converters(U, V)
size_t size() const
Return the length, number of elements, dimension of this vector.
static vnl_matrix< float > d2f(vnl_matrix< double > const &)
A collection of Matrix operations.
vnl_matrix & set_column(unsigned i, T const *v)
Set the elements of the i'th column to v[i] (No bounds checking).
static vnl_matrix< double > cat(vnl_matrix< double > const &A, vnl_matrix< double > const &B)
Laminating.
T mean() const
Return mean of all matrix elements.
VNL_EXPORT m element_quotient(m const &, m const &)
unsigned int rows() const
Return the number of rows.
static vnl_matrix< double > vcat(vnl_matrix< double > const &A, vnl_matrix< double > const &B)
A collection of vnl_matrix operations, provided as static methods.
vnl_matrix< T > & update(vnl_matrix< T > const &, unsigned top=0, unsigned left=0)
Set values of this matrix to those of M, starting at [top,left].
unsigned int columns() const
Return the number of columns.
static vnl_matrix< double > f2d(vnl_matrix< float > const &)
Conversions.