Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !pip3 install gnupg
- import roslib
- import rospy
- import jupyros as jr
- import rosbag
- import cv2
- from cv_bridge import CvBridge
- from sensor_msgs.msg import Image, CompressedImage
- import matplotlib.pyplot as plt
- import numpy as np
- bridge = CvBridge()
- with rosbag.Bag('images.bag', 'r') as image_bag:
- for topic, image_message, t in image_bag.read_messages():
- cv_image = bridge.imgmsg_to_cv2(image_message, "bgr8")
- cv2.imshow("image", cv_image)
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement