Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
jsk_perception
skeletonization.h
Go to the documentation of this file.
1
// -*- mode: c++ -*-
2
/*********************************************************************
3
* Software License Agreement (BSD License)
4
*
5
* Copyright (c) 2015, JSK Lab
6
* All rights reserved.
7
*
8
* Redistribution and use in source and binary forms, with or without
9
* modification, are permitted provided that the following conditions
10
* are met:
11
*
12
* * Redistributions of source code must retain the above copyright
13
* notice, this list of conditions and the following disclaimer.
14
* * Redistributions in binary form must reproduce the above
15
* copyright notice, this list of conditions and the following
16
* disclaimer in the documentation and/o2r other materials provided
17
* with the distribution.
18
* * Neither the name of the JSK Lab nor the names of its
19
* contributors may be used to endorse or promote products derived
20
* from this software without specific prior written permission.
21
*
22
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
* POSSIBILITY OF SUCH DAMAGE.
34
*********************************************************************/
35
36
#ifndef JSK_PERCEPTION_SKELETONIZATION_H
37
#define JSK_PERCEPTION_SKELETONIZATION_H
38
39
// ROS Header Directives
40
#include <
ros/ros.h
>
41
#include <
ros/console.h
>
42
43
#include <
jsk_topic_tools/diagnostic_nodelet.h
>
44
#include <sensor_msgs/Image.h>
45
#include <
cv_bridge/cv_bridge.h
>
46
#include <
sensor_msgs/image_encodings.h
>
47
48
// OpenCV Header Directives
49
#include <opencv2/imgproc/imgproc.hpp>
50
#include <opencv2/highgui/highgui.hpp>
51
52
#include <omp.h>
53
54
namespace
jsk_perception
55
{
56
class
Skeletonization
:
public
jsk_topic_tools::DiagnosticNodelet
57
{
58
public
:
59
Skeletonization
():
DiagnosticNodelet
(
"Skeletonization"
),
60
num_threads_
(1) {}
61
virtual
void
imageCallback
(
const
sensor_msgs::Image::ConstPtr&);
62
virtual
void
skeletonization
(cv::Mat &);
63
64
protected
:
65
virtual
void
onInit
();
66
virtual
void
subscribe
();
67
virtual
void
unsubscribe
();
68
virtual
void
iterativeThinning
(cv::Mat&,
int
);
69
70
boost::mutex
mutex_
;
71
ros::Subscriber
sub_
;
72
ros::Publisher
pub_image_
;
73
74
private
:
75
enum
{
EVEN
,
ODD
};
76
int
num_threads_
;
77
};
78
}
79
80
#endif // JSK_PERCEPTION_SKELETONIZATION_H
81
jsk_perception::Skeletonization::pub_image_
ros::Publisher pub_image_
Definition:
skeletonization.h:72
jsk_perception::Skeletonization::unsubscribe
virtual void unsubscribe()
Definition:
skeletonization_nodelet.cpp:57
jsk_perception::Skeletonization::onInit
virtual void onInit()
Definition:
skeletonization_nodelet.cpp:41
jsk_perception::Skeletonization::imageCallback
virtual void imageCallback(const sensor_msgs::Image::ConstPtr &)
Definition:
skeletonization_nodelet.cpp:63
jsk_perception::Skeletonization::iterativeThinning
virtual void iterativeThinning(cv::Mat &, int)
Definition:
skeletonization_nodelet.cpp:107
jsk_perception::Skeletonization::subscribe
virtual void subscribe()
Definition:
skeletonization_nodelet.cpp:50
diagnostic_nodelet.h
jsk_perception::Skeletonization::sub_
ros::Subscriber sub_
Definition:
skeletonization.h:71
jsk_topic_tools::DiagnosticNodelet::DiagnosticNodelet
DiagnosticNodelet(const std::string &name)
cv_bridge.h
ros::Subscriber
jsk_perception::Skeletonization::num_threads_
int num_threads_
Definition:
skeletonization.h:76
jsk_perception::Skeletonization
Definition:
skeletonization.h:56
jsk_perception
Definition:
add_mask_image.h:48
ros.h
jsk_perception::Skeletonization::skeletonization
virtual void skeletonization(cv::Mat &)
Definition:
skeletonization_nodelet.cpp:84
jsk_perception::Skeletonization::Skeletonization
Skeletonization()
Definition:
skeletonization.h:59
console.h
image_encodings.h
ros::Publisher
jsk_perception::Skeletonization::ODD
Definition:
skeletonization.h:75
jsk_perception::Skeletonization::EVEN
Definition:
skeletonization.h:75
jsk_perception::Skeletonization::mutex_
boost::mutex mutex_
Definition:
skeletonization.h:70
jsk_topic_tools::DiagnosticNodelet
jsk_perception
Author(s): Manabu Saito, Ryohei Ueda
autogenerated on Mon May 3 2021 03:03:27