Go to the documentation of this file.00001 #include "mfpf_draw_pose_lines.h"
00002
00003
00004
00005
00006
00007 #include <mbl/mbl_draw_line.h>
00008 #include <vgl/vgl_point_2d.h>
00009
00010
00011 void mfpf_draw_pose_lines(vimt_image_2d_of<vxl_byte>& image,
00012 const mfpf_pose& pose,
00013 const vcl_vector<vgl_point_2d<double> >& ref_pts,
00014 vxl_byte value,
00015 unsigned width)
00016 {
00017 const vimt_transform_2d& w2im = image.world2im();
00018 vgl_point_2d<double> p = w2im(pose(ref_pts[0]));
00019 for (unsigned i=1;i<ref_pts.size();++i)
00020 {
00021 vgl_point_2d<double> q = w2im(pose(ref_pts[i]));
00022 mbl_draw_line(image.image(),p,q,value,width);
00023 p=q;
00024 }
00025 }
00026
00027
00028 void mfpf_draw_pose_lines(vimt_image_2d_of<vxl_byte>& image,
00029 const mfpf_pose& pose,
00030 const vcl_vector<vgl_point_2d<double> >& ref_pts,
00031 vxl_byte r, vxl_byte g, vxl_byte b,
00032 unsigned width)
00033 {
00034 const vimt_transform_2d& w2im = image.world2im();
00035 vgl_point_2d<double> p = w2im(pose(ref_pts[0]));
00036 for (unsigned i=1;i<ref_pts.size();++i)
00037 {
00038 vgl_point_2d<double> q = w2im(pose(ref_pts[i]));
00039 mbl_draw_line(image.image(),p,q,r,width);
00040 mbl_draw_line(image.image(),p,q,g,width);
00041 mbl_draw_line(image.image(),p,q,b,width);
00042 p=q;
00043 }
00044 }
00045