Index: src/facedetect.cpp
===================================================================
--- src/facedetect.cpp	(revision 1012)
+++ src/facedetect.cpp	(working copy)
@@ -29,7 +29,7 @@
 #include "sensor_msgs/Image.h"
 #include "image_transport/image_transport.h"
 #include "face_detector_mono/RectArray.h"
-#include "cv_bridge/CvBridge.h"
+#include "cv_bridge/cv_bridge.h"
 
 //yarp
 //#define YARP
@@ -120,11 +120,13 @@
 
   void image_callback(const sensor_msgs::ImageConstPtr& msg_ptr)
   {
+    cv_bridge::CvImagePtr cv_ptr;
     try
     {
-      image_ = bridge_.imgMsgToCv(msg_ptr, "bgr8");
+      cv_ptr = cv_bridge::toCvCopy(msg_ptr, "bgr8");
+      image_ = cv_ptr->image;
     }
-    catch (sensor_msgs::CvBridgeException error)
+    catch (cv_bridge::Exception error)
     {
       ROS_ERROR("error");
     }
@@ -265,7 +267,6 @@
   image_transport::ImageTransport it_;
   image_transport::Subscriber image_sub_;
   ros::Publisher face_pub_;
-  sensor_msgs::CvBridge bridge_;
 };
 
 int main(int argc, char** argv)
