ncs_server.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Intel Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef MOVIDIUS_NCS_IMAGE_NCS_SERVER_H
18 #define MOVIDIUS_NCS_IMAGE_NCS_SERVER_H
19 
20 #include <string>
21 #include <vector>
22 
23 #include <ros/ros.h>
24 
25 #include <object_msgs/ClassifyObject.h>
26 #include <object_msgs/DetectObject.h>
27 #include "movidius_ncs_lib/ncs.h"
29 
31 {
32 class NCSServer
33 {
34 public:
35  explicit NCSServer(ros::NodeHandle& nh);
36 
37 private:
38  void getParameters();
39  void init();
40 
41  bool cbDetectObject(object_msgs::DetectObject::Request& request, object_msgs::DetectObject::Response& response);
42  bool cbClassifyObject(object_msgs::ClassifyObject::Request& request, object_msgs::ClassifyObject::Response& response);
43 
45 
46  std::shared_ptr<movidius_ncs_lib::NCSManager> ncs_manager_handle_;
48 
52  std::string cnn_type_;
53  std::string graph_file_path_;
54  std::string category_file_path_;
56  std::vector<float> mean_;
57  float scale_;
58  int top_n_;
59 };
60 } // namespace movidius_ncs_image
61 
62 #endif // MOVIDIUS_NCS_IMAGE_NCS_SERVER_H
ros::ServiceServer service_
Definition: ncs_server.h:44
std::shared_ptr< movidius_ncs_lib::NCSManager > ncs_manager_handle_
Definition: ncs_server.h:46
bool cbDetectObject(object_msgs::DetectObject::Request &request, object_msgs::DetectObject::Response &response)
Definition: ncs_server.cpp:236
NCSServer(ros::NodeHandle &nh)
Definition: ncs_server.cpp:36
std::vector< float > mean_
Definition: ncs_server.h:56
bool cbClassifyObject(object_msgs::ClassifyObject::Request &request, object_msgs::ClassifyObject::Response &response)
Definition: ncs_server.cpp:213


movidius_ncs_image
Author(s): Xiaojun Huang
autogenerated on Mon Jun 10 2019 14:11:26