maybe the image_saver node that comes with image_view will let you do this. Not sure what you use rgbdslam for.