flow_velocity_thresholding.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2017, JSK Lab
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/o2r other materials provided
16  * with the distribution.
17  * * Neither the name of the JSK Lab nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 
36 #ifndef JSK_PERCEPTION_FLOW_VELOCITY_THRESHOLDING_H_
37 #define JSK_PERCEPTION_FLOW_VELOCITY_THRESHOLDING_H_
38 
44 #include <sensor_msgs/CameraInfo.h>
45 #include <opencv_apps/FlowArrayStamped.h>
46 #include <dynamic_reconfigure/server.h>
47 #include "jsk_perception/FlowVelocityThresholdingConfig.h"
48 
49 namespace jsk_perception
50 {
52  {
53  public:
54  FlowVelocityThresholding(): DiagnosticNodelet("FlowVelocityThresholding") {}
55  typedef jsk_perception::FlowVelocityThresholdingConfig Config;
57  opencv_apps::FlowArrayStamped,
58  sensor_msgs::CameraInfo > ApproximateSyncPolicy;
60  opencv_apps::FlowArrayStamped,
61  sensor_msgs::CameraInfo > SyncPolicy;
62  protected:
63  virtual void onInit();
64  virtual void configCallback(Config &config, uint32_t level);
65  virtual void subscribe();
66  virtual void unsubscribe();
67  virtual void callback(
68  const opencv_apps::FlowArrayStamped::ConstPtr& flows_msg);
69  virtual void callback(
70  const opencv_apps::FlowArrayStamped::ConstPtr& flows_msg,
71  const sensor_msgs::CameraInfo::ConstPtr& info_msg);
72  virtual void process(
73  const opencv_apps::FlowArrayStamped::ConstPtr& flows_msg,
74  const int image_height,
75  const int image_width);
76 
83  double threshold_;
84 
85  boost::mutex mutex_;
92  private:
93  };
94 } // namespace jsk_perception
95 
96 #endif // JSK_PERCEPTION_FLOW_VELOCITY_THRESHOLDING_H_
boost::shared_ptr< message_filters::Synchronizer< SyncPolicy > > sync_
message_filters::sync_policies::ExactTime< opencv_apps::FlowArrayStamped, sensor_msgs::CameraInfo > SyncPolicy
jsk_perception::FlowVelocityThresholdingConfig Config
message_filters::Subscriber< opencv_apps::FlowArrayStamped > sub_flow_
virtual void configCallback(Config &config, uint32_t level)
DiagnosticNodelet(const std::string &name)
boost::shared_ptr< message_filters::Synchronizer< ApproximateSyncPolicy > > async_
message_filters::sync_policies::ApproximateTime< opencv_apps::FlowArrayStamped, sensor_msgs::CameraInfo > ApproximateSyncPolicy
virtual void callback(const opencv_apps::FlowArrayStamped::ConstPtr &flows_msg)
virtual void process(const opencv_apps::FlowArrayStamped::ConstPtr &flows_msg, const int image_height, const int image_width)
boost::shared_ptr< dynamic_reconfigure::Server< Config > > srv_
message_filters::Subscriber< sensor_msgs::CameraInfo > sub_info_


jsk_perception
Author(s): Manabu Saito, Ryohei Ueda
autogenerated on Mon May 3 2021 03:03:27