2 #ifndef vgl_io_h_matrix_2d_hxx_ 3 #define vgl_io_h_matrix_2d_hxx_ 9 #include <vsl/vsl_binary_io.h> 15 static const short io_version_no = 1;
33 T xx,xy,xt,yx,yy,yt,tx,ty,tt;
37 v.set(0,0,xx);
v.set(0,1,xy);
v.set(0,2,xt);
38 v.set(1,0,yx);
v.set(1,1,yy);
v.set(1,2,yt);
39 v.set(2,0,tx);
v.set(2,0,ty);
v.set(2,2,tt);
42 std::cerr <<
"I/O ERROR: vgl_h_matrix_2d::b_read(vsl_b_istream&)\n" 43 <<
" Unknown version number "<< version <<
'\n';
44 bfs.is().clear(std::ios::badbit);
50 #define VGL_IO_H_MATRIX_2D_INSTANTIATE(T) \ 51 template void vsl_b_read(vsl_b_istream &, vgl_h_matrix_2d<T >&); \ 52 template void vsl_b_write(vsl_b_ostream &, const vgl_h_matrix_2d<T >&) 54 #endif // vgl_io_h_matrix_2d_hxx_ A class to hold a plane-to-plane projective transformation matrix and to perform common operations us...
vnl_matrix_fixed< T, 3, 3 > const & get_matrix() const
Return the 3x3 homography matrix.
void vsl_b_write(vsl_b_ostream &bfs, const vgl_h_matrix_2d< T > &t)
Binary save vgl_h_matrix_2d to stream.
contains functions vsl_b_write, vsl_b_read and vsl_print_summary
void vsl_b_read(vsl_b_istream &bfs, vgl_h_matrix_2d< T > &v)
Binary load vgl_h_matrix_2d from stream.