00001
00002 #ifndef VISP_TRACKER_MESSAGE_MOVINGEDGE_H
00003 #define VISP_TRACKER_MESSAGE_MOVINGEDGE_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013
00014 namespace visp_tracker
00015 {
00016 template <class ContainerAllocator>
00017 struct MovingEdge_ : public ros::Message
00018 {
00019 typedef MovingEdge_<ContainerAllocator> Type;
00020
00021 MovingEdge_()
00022 : mask_size(0)
00023 , n_mask(0)
00024 , range(0)
00025 , threshold(0.0)
00026 , mu1(0.0)
00027 , mu2(0.0)
00028 , sample_step(0)
00029 , ntotal_sample(0)
00030 , strip(0)
00031 , min_samplestep(0.0)
00032 , aberration(0.0)
00033 , init_aberration(0.0)
00034 , lambda(0.0)
00035 , first_threshold(0.0)
00036 {
00037 }
00038
00039 MovingEdge_(const ContainerAllocator& _alloc)
00040 : mask_size(0)
00041 , n_mask(0)
00042 , range(0)
00043 , threshold(0.0)
00044 , mu1(0.0)
00045 , mu2(0.0)
00046 , sample_step(0)
00047 , ntotal_sample(0)
00048 , strip(0)
00049 , min_samplestep(0.0)
00050 , aberration(0.0)
00051 , init_aberration(0.0)
00052 , lambda(0.0)
00053 , first_threshold(0.0)
00054 {
00055 }
00056
00057 typedef int64_t _mask_size_type;
00058 int64_t mask_size;
00059
00060 typedef int64_t _n_mask_type;
00061 int64_t n_mask;
00062
00063 typedef int64_t _range_type;
00064 int64_t range;
00065
00066 typedef double _threshold_type;
00067 double threshold;
00068
00069 typedef double _mu1_type;
00070 double mu1;
00071
00072 typedef double _mu2_type;
00073 double mu2;
00074
00075 typedef int64_t _sample_step_type;
00076 int64_t sample_step;
00077
00078 typedef int64_t _ntotal_sample_type;
00079 int64_t ntotal_sample;
00080
00081 typedef int64_t _strip_type;
00082 int64_t strip;
00083
00084 typedef double _min_samplestep_type;
00085 double min_samplestep;
00086
00087 typedef double _aberration_type;
00088 double aberration;
00089
00090 typedef double _init_aberration_type;
00091 double init_aberration;
00092
00093 typedef double _lambda_type;
00094 double lambda;
00095
00096 typedef double _first_threshold_type;
00097 double first_threshold;
00098
00099
00100 private:
00101 static const char* __s_getDataType_() { return "visp_tracker/MovingEdge"; }
00102 public:
00103 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00104
00105 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00106
00107 private:
00108 static const char* __s_getMD5Sum_() { return "376fefab194f3282c421288b8a099b76"; }
00109 public:
00110 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00111
00112 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00113
00114 private:
00115 static const char* __s_getMessageDefinition_() { return "# This message contains tracking parameters.\n\
00116 #\n\
00117 # These parameters determine how precise, how fast and how\n\
00118 # reliable will be the tracking.\n\
00119 #\n\
00120 # It should be tuned carefully and can be changed dynamically.\n\
00121 #\n\
00122 # For more details, see the ViSP documentation:\n\
00123 # http://www.irisa.fr/lagadic/visp/publication.html\n\
00124 \n\
00125 \n\
00126 # Moving edge parameters.\n\
00127 \n\
00128 int64 mask_size # Mask size (in pixel) used to compute the image gradient\n\
00129 # and determine the object contour.\n\
00130 # A larger mask size is better for larger images.\n\
00131 # 3 pixels is enough for 640x480 images.\n\
00132 # Increasing this value makes the tracking slower.\n\
00133 #\n\
00134 # Caution: this value cannot be changed dynamically\n\
00135 # without resetting the tracking.\n\
00136 \n\
00137 int64 n_mask # Number of masks applied to determine the object contour.\n\
00138 # Increasing this value makes the tracking slower.\n\
00139 \n\
00140 int64 range # Maximum seek distance on both sides of the reference pixel.\n\
00141 # It should match the maximum distance in pixel between\n\
00142 # the current position of the feature projection and\n\
00143 # its next position.\n\
00144 # I.e. if the object moves fast and your tracking\n\
00145 # frequency is low, this value should be increased.\n\
00146 # Increasing this value makes the tracking slower.\n\
00147 \n\
00148 float64 threshold # Value used to determine if a moving edge is valid\n\
00149 # or not.\n\
00150 \n\
00151 float64 mu1 # Minimum image contrast allowed to detect a contour.\n\
00152 float64 mu2 # Maximum image contrast allowed to detect a contour.\n\
00153 \n\
00154 int64 sample_step # Minimum distance in pixel between two\n\
00155 # discretization points.\n\
00156 # It avoids having too many discretization points when\n\
00157 # the tracked object is far away (and its projection\n\
00158 # in the image is small).\n\
00159 # Increasing this value makes the tracking *faster*.\n\
00160 \n\
00161 int64 ntotal_sample # How many discretization points are used to track the\n\
00162 # feature.\n\
00163 # Higher is better but slow down the tracking.\n\
00164 # The best value depends on your model and its distance\n\
00165 # with respect to the camera.\n\
00166 # Increasing this value makes the tracking slower.\n\
00167 \n\
00168 int64 strip # How many pixels are ignored around the borders.\n\
00169 float64 min_samplestep # Minimum allowed samplestep. Useful to specify\n\
00170 # a lower bound when the samplestep is changed\n\
00171 # dynamically.\n\
00172 # This is not done by visp_tracker currently.\n\
00173 float64 aberration # Ignored.\n\
00174 float64 init_aberration # Ignored.\n\
00175 \n\
00176 \n\
00177 # Tracker parameters.\n\
00178 \n\
00179 float64 lambda # Gain used to compute the control law.\n\
00180 float64 first_threshold # What proportion of points should be valid to\n\
00181 # acccept an initial pose.\n\
00182 # Value should be between 0 et 1.\n\
00183 \n\
00184 "; }
00185 public:
00186 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00187
00188 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00189
00190 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00191 {
00192 ros::serialization::OStream stream(write_ptr, 1000000000);
00193 ros::serialization::serialize(stream, mask_size);
00194 ros::serialization::serialize(stream, n_mask);
00195 ros::serialization::serialize(stream, range);
00196 ros::serialization::serialize(stream, threshold);
00197 ros::serialization::serialize(stream, mu1);
00198 ros::serialization::serialize(stream, mu2);
00199 ros::serialization::serialize(stream, sample_step);
00200 ros::serialization::serialize(stream, ntotal_sample);
00201 ros::serialization::serialize(stream, strip);
00202 ros::serialization::serialize(stream, min_samplestep);
00203 ros::serialization::serialize(stream, aberration);
00204 ros::serialization::serialize(stream, init_aberration);
00205 ros::serialization::serialize(stream, lambda);
00206 ros::serialization::serialize(stream, first_threshold);
00207 return stream.getData();
00208 }
00209
00210 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00211 {
00212 ros::serialization::IStream stream(read_ptr, 1000000000);
00213 ros::serialization::deserialize(stream, mask_size);
00214 ros::serialization::deserialize(stream, n_mask);
00215 ros::serialization::deserialize(stream, range);
00216 ros::serialization::deserialize(stream, threshold);
00217 ros::serialization::deserialize(stream, mu1);
00218 ros::serialization::deserialize(stream, mu2);
00219 ros::serialization::deserialize(stream, sample_step);
00220 ros::serialization::deserialize(stream, ntotal_sample);
00221 ros::serialization::deserialize(stream, strip);
00222 ros::serialization::deserialize(stream, min_samplestep);
00223 ros::serialization::deserialize(stream, aberration);
00224 ros::serialization::deserialize(stream, init_aberration);
00225 ros::serialization::deserialize(stream, lambda);
00226 ros::serialization::deserialize(stream, first_threshold);
00227 return stream.getData();
00228 }
00229
00230 ROS_DEPRECATED virtual uint32_t serializationLength() const
00231 {
00232 uint32_t size = 0;
00233 size += ros::serialization::serializationLength(mask_size);
00234 size += ros::serialization::serializationLength(n_mask);
00235 size += ros::serialization::serializationLength(range);
00236 size += ros::serialization::serializationLength(threshold);
00237 size += ros::serialization::serializationLength(mu1);
00238 size += ros::serialization::serializationLength(mu2);
00239 size += ros::serialization::serializationLength(sample_step);
00240 size += ros::serialization::serializationLength(ntotal_sample);
00241 size += ros::serialization::serializationLength(strip);
00242 size += ros::serialization::serializationLength(min_samplestep);
00243 size += ros::serialization::serializationLength(aberration);
00244 size += ros::serialization::serializationLength(init_aberration);
00245 size += ros::serialization::serializationLength(lambda);
00246 size += ros::serialization::serializationLength(first_threshold);
00247 return size;
00248 }
00249
00250 typedef boost::shared_ptr< ::visp_tracker::MovingEdge_<ContainerAllocator> > Ptr;
00251 typedef boost::shared_ptr< ::visp_tracker::MovingEdge_<ContainerAllocator> const> ConstPtr;
00252 };
00253 typedef ::visp_tracker::MovingEdge_<std::allocator<void> > MovingEdge;
00254
00255 typedef boost::shared_ptr< ::visp_tracker::MovingEdge> MovingEdgePtr;
00256 typedef boost::shared_ptr< ::visp_tracker::MovingEdge const> MovingEdgeConstPtr;
00257
00258
00259 template<typename ContainerAllocator>
00260 std::ostream& operator<<(std::ostream& s, const ::visp_tracker::MovingEdge_<ContainerAllocator> & v)
00261 {
00262 ros::message_operations::Printer< ::visp_tracker::MovingEdge_<ContainerAllocator> >::stream(s, "", v);
00263 return s;}
00264
00265 }
00266
00267 namespace ros
00268 {
00269 namespace message_traits
00270 {
00271 template<class ContainerAllocator>
00272 struct MD5Sum< ::visp_tracker::MovingEdge_<ContainerAllocator> > {
00273 static const char* value()
00274 {
00275 return "376fefab194f3282c421288b8a099b76";
00276 }
00277
00278 static const char* value(const ::visp_tracker::MovingEdge_<ContainerAllocator> &) { return value(); }
00279 static const uint64_t static_value1 = 0x376fefab194f3282ULL;
00280 static const uint64_t static_value2 = 0xc421288b8a099b76ULL;
00281 };
00282
00283 template<class ContainerAllocator>
00284 struct DataType< ::visp_tracker::MovingEdge_<ContainerAllocator> > {
00285 static const char* value()
00286 {
00287 return "visp_tracker/MovingEdge";
00288 }
00289
00290 static const char* value(const ::visp_tracker::MovingEdge_<ContainerAllocator> &) { return value(); }
00291 };
00292
00293 template<class ContainerAllocator>
00294 struct Definition< ::visp_tracker::MovingEdge_<ContainerAllocator> > {
00295 static const char* value()
00296 {
00297 return "# This message contains tracking parameters.\n\
00298 #\n\
00299 # These parameters determine how precise, how fast and how\n\
00300 # reliable will be the tracking.\n\
00301 #\n\
00302 # It should be tuned carefully and can be changed dynamically.\n\
00303 #\n\
00304 # For more details, see the ViSP documentation:\n\
00305 # http://www.irisa.fr/lagadic/visp/publication.html\n\
00306 \n\
00307 \n\
00308 # Moving edge parameters.\n\
00309 \n\
00310 int64 mask_size # Mask size (in pixel) used to compute the image gradient\n\
00311 # and determine the object contour.\n\
00312 # A larger mask size is better for larger images.\n\
00313 # 3 pixels is enough for 640x480 images.\n\
00314 # Increasing this value makes the tracking slower.\n\
00315 #\n\
00316 # Caution: this value cannot be changed dynamically\n\
00317 # without resetting the tracking.\n\
00318 \n\
00319 int64 n_mask # Number of masks applied to determine the object contour.\n\
00320 # Increasing this value makes the tracking slower.\n\
00321 \n\
00322 int64 range # Maximum seek distance on both sides of the reference pixel.\n\
00323 # It should match the maximum distance in pixel between\n\
00324 # the current position of the feature projection and\n\
00325 # its next position.\n\
00326 # I.e. if the object moves fast and your tracking\n\
00327 # frequency is low, this value should be increased.\n\
00328 # Increasing this value makes the tracking slower.\n\
00329 \n\
00330 float64 threshold # Value used to determine if a moving edge is valid\n\
00331 # or not.\n\
00332 \n\
00333 float64 mu1 # Minimum image contrast allowed to detect a contour.\n\
00334 float64 mu2 # Maximum image contrast allowed to detect a contour.\n\
00335 \n\
00336 int64 sample_step # Minimum distance in pixel between two\n\
00337 # discretization points.\n\
00338 # It avoids having too many discretization points when\n\
00339 # the tracked object is far away (and its projection\n\
00340 # in the image is small).\n\
00341 # Increasing this value makes the tracking *faster*.\n\
00342 \n\
00343 int64 ntotal_sample # How many discretization points are used to track the\n\
00344 # feature.\n\
00345 # Higher is better but slow down the tracking.\n\
00346 # The best value depends on your model and its distance\n\
00347 # with respect to the camera.\n\
00348 # Increasing this value makes the tracking slower.\n\
00349 \n\
00350 int64 strip # How many pixels are ignored around the borders.\n\
00351 float64 min_samplestep # Minimum allowed samplestep. Useful to specify\n\
00352 # a lower bound when the samplestep is changed\n\
00353 # dynamically.\n\
00354 # This is not done by visp_tracker currently.\n\
00355 float64 aberration # Ignored.\n\
00356 float64 init_aberration # Ignored.\n\
00357 \n\
00358 \n\
00359 # Tracker parameters.\n\
00360 \n\
00361 float64 lambda # Gain used to compute the control law.\n\
00362 float64 first_threshold # What proportion of points should be valid to\n\
00363 # acccept an initial pose.\n\
00364 # Value should be between 0 et 1.\n\
00365 \n\
00366 ";
00367 }
00368
00369 static const char* value(const ::visp_tracker::MovingEdge_<ContainerAllocator> &) { return value(); }
00370 };
00371
00372 template<class ContainerAllocator> struct IsFixedSize< ::visp_tracker::MovingEdge_<ContainerAllocator> > : public TrueType {};
00373 }
00374 }
00375
00376 namespace ros
00377 {
00378 namespace serialization
00379 {
00380
00381 template<class ContainerAllocator> struct Serializer< ::visp_tracker::MovingEdge_<ContainerAllocator> >
00382 {
00383 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00384 {
00385 stream.next(m.mask_size);
00386 stream.next(m.n_mask);
00387 stream.next(m.range);
00388 stream.next(m.threshold);
00389 stream.next(m.mu1);
00390 stream.next(m.mu2);
00391 stream.next(m.sample_step);
00392 stream.next(m.ntotal_sample);
00393 stream.next(m.strip);
00394 stream.next(m.min_samplestep);
00395 stream.next(m.aberration);
00396 stream.next(m.init_aberration);
00397 stream.next(m.lambda);
00398 stream.next(m.first_threshold);
00399 }
00400
00401 ROS_DECLARE_ALLINONE_SERIALIZER;
00402 };
00403 }
00404 }
00405
00406 namespace ros
00407 {
00408 namespace message_operations
00409 {
00410
00411 template<class ContainerAllocator>
00412 struct Printer< ::visp_tracker::MovingEdge_<ContainerAllocator> >
00413 {
00414 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::visp_tracker::MovingEdge_<ContainerAllocator> & v)
00415 {
00416 s << indent << "mask_size: ";
00417 Printer<int64_t>::stream(s, indent + " ", v.mask_size);
00418 s << indent << "n_mask: ";
00419 Printer<int64_t>::stream(s, indent + " ", v.n_mask);
00420 s << indent << "range: ";
00421 Printer<int64_t>::stream(s, indent + " ", v.range);
00422 s << indent << "threshold: ";
00423 Printer<double>::stream(s, indent + " ", v.threshold);
00424 s << indent << "mu1: ";
00425 Printer<double>::stream(s, indent + " ", v.mu1);
00426 s << indent << "mu2: ";
00427 Printer<double>::stream(s, indent + " ", v.mu2);
00428 s << indent << "sample_step: ";
00429 Printer<int64_t>::stream(s, indent + " ", v.sample_step);
00430 s << indent << "ntotal_sample: ";
00431 Printer<int64_t>::stream(s, indent + " ", v.ntotal_sample);
00432 s << indent << "strip: ";
00433 Printer<int64_t>::stream(s, indent + " ", v.strip);
00434 s << indent << "min_samplestep: ";
00435 Printer<double>::stream(s, indent + " ", v.min_samplestep);
00436 s << indent << "aberration: ";
00437 Printer<double>::stream(s, indent + " ", v.aberration);
00438 s << indent << "init_aberration: ";
00439 Printer<double>::stream(s, indent + " ", v.init_aberration);
00440 s << indent << "lambda: ";
00441 Printer<double>::stream(s, indent + " ", v.lambda);
00442 s << indent << "first_threshold: ";
00443 Printer<double>::stream(s, indent + " ", v.first_threshold);
00444 }
00445 };
00446
00447
00448 }
00449 }
00450
00451 #endif // VISP_TRACKER_MESSAGE_MOVINGEDGE_H
00452