Go to the documentation of this file.00001 #include "mfpf_draw_pose_cross.h"
00002
00003
00004
00005
00006
00007 #include <mbl/mbl_draw_line.h>
00008 #include <vgl/vgl_point_2d.h>
00009
00010
00011
00012 void mfpf_draw_pose_cross(vimt_image_2d_of<vxl_byte>& image,
00013 const mfpf_pose& pose,
00014 double ru, double rv,
00015 vxl_byte value,unsigned width)
00016 {
00017 const vimt_transform_2d& w2im = image.world2im();
00018 vgl_point_2d<double> p1=pose.p()-ru*pose.u(), p2=pose.p()+ru*pose.u();
00019 vgl_point_2d<double> p3=pose.p()-rv*pose.v(), p4=pose.p()+rv*pose.v();
00020 mbl_draw_line(image.image(),w2im(p1),w2im(p2),value,width);
00021 mbl_draw_line(image.image(),w2im(p3),w2im(p4),value,width);
00022 }
00023
00024
00025
00026 void mfpf_draw_pose_cross(vimt_image_2d_of<vxl_byte>& image,
00027 const mfpf_pose& pose,
00028 double ru, double rv,
00029 vxl_byte r, vxl_byte g, vxl_byte b)
00030 {
00031 const vimt_transform_2d& w2im = image.world2im();
00032 vgl_point_2d<double> p1=pose.p()-ru*pose.u(), p2=pose.p()+ru*pose.u();
00033 vgl_point_2d<double> p3=pose.p()-rv*pose.v(), p4=pose.p()+rv*pose.v();
00034 mbl_draw_line(image.image(),w2im(p1),w2im(p2),r,g,b);
00035 mbl_draw_line(image.image(),w2im(p3),w2im(p4),r,g,b);
00036 }
00037