title: Subscribe ROS Image and CameraInfo sensor.msgs format
body: <p>I am trying to subscribe to CameraInfo and Image of format sensor_msgs.msg and use its data for further image processing. Here are few lines of code that I am starting with:</p>
  
  <pre><code>from sensor_msgs.msg import CameraInfo, Image
  from cv_bridge import CvBridge, CvBridgeError
  import cv2
  
  if __name__ == '__main__':
      rospy.init_node('node_name')
      while ~rospy.is_shutdown():
          sub_cam_info = rospy.Subscriber('/camera/rgb/raw_camera_info', CameraInfo)
          sub_rgb = rospy.Subscriber('/camera/rgb/raw_image_color', Image)
  </code></pre>
  
  <p>From here I want to extract header and data information from 'sub_cam_info' and 'sub_rgb'. Something like this:</p>
  
  <pre><code>camera_info_K = sub_cam_info.K
  camera_info_dist_model = sub_cam_info.distortion_model
  rgb_image = CvBridge().imgmsg_to_cv2(sub_rgb, encoding="rgb8")
  </code></pre>
  
  <p>And then use this data for image undistortion:-</p>
  
  <pre><code>rgb_undist = cv2.undistort(rgb_img.data, camera_info_K, camera_info_dist_model)
  </code></pre>
  
  <p>Mainly I need help in second part, i.e., extraction of parameters from CameraInfo and Image messages. However, if someone can help me to sort out body of this whole code! I am already through making up my own CameraInfo and RGB messages, using them for undistortion and publishing on ROS by, but now I want to get them from another ROS module and work with them.</p>