saliencyDetectionRudinac.h
Go to the documentation of this file.
00001 //===================================================================================
00002 // Name        : saliencyDetectionRudinac.h
00003 // Author      : Joris van de Weem, joris.vdweem@gmail.com
00004 // Version     : 1.0
00005 // Copyright   : Copyright (c) 2010 LGPL
00006 // Description : C++ implementation of "Maja Rudinac, Pieter P. Jonker. 
00007 //                              "Saliency Detection and Object Localization in Indoor Environments". 
00008 //                              ICPR'2010. pp.404~407                                                                                     
00009 //===================================================================================
00010 
00011 #ifndef _SALIENCYMAPRUDINAC_H_INCLUDED_
00012 #define _SALIENCYMAPRUDINAC_H_INCLUDED_
00013 
00014 // ROS
00015 #include <ros/ros.h>
00016 #include "image_transport/image_transport.h"
00017 #include <cv_bridge/cv_bridge.h>
00018 #include <sensor_msgs/image_encodings.h>
00019 #include <sensor_msgs/fill_image.h>
00020 #include <geometry_msgs/Point.h>
00021 
00022 // OpenCV
00023 #include "cv.h"
00024 #include "opencv2/highgui/highgui.hpp"
00025 
00026 using namespace cv;
00027 using namespace std;
00028 namespace enc = sensor_msgs::image_encodings;
00029 
00030 class saliencyMapRudinac
00031 {
00032 protected:
00033         ros::NodeHandle nh_;
00034         ros::Publisher point_pub_;
00035         image_transport::ImageTransport it_;
00036         image_transport::Subscriber     image_sub_;
00037         image_transport::Publisher              saliencymap_pub_;
00038 
00039 
00040 public:
00041         saliencyMapRudinac() : nh_("~"), it_(nh_)
00042         {
00043                 image_sub_ = it_.subscribe("/rgbimage_in", 1, &saliencyMapRudinac::imageCB, this);
00044                 saliencymap_pub_= it_.advertise("/saliency/image", 1);
00045                 point_pub_ = nh_.advertise<geometry_msgs::Point>("/saliency/salientpoint", 1);
00046         }
00047 
00048         ~saliencyMapRudinac()
00049         {
00050                 nh_.shutdown();
00051         }
00052 
00053         void imageCB(const sensor_msgs::ImageConstPtr& msg_ptr);
00054         void calculateSaliencyMap(const Mat* src, Mat* dst);
00055 
00056 private:
00057         Mat r,g,b,RG,BY,I;
00058         void createChannels(const Mat* src);
00059         void createSaliencyMap(const Mat src, Mat* dst);
00060 };
00061 #endif


saliency_detection
Author(s): Joris van de Weem
autogenerated on Sun Jan 5 2014 11:07:22