Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 475

Export bag of CompressedImage to disk without decoding

$
0
0
I have a bag of compressed images (*/camera/image/compressed*). I wrote a Python script which reads the bagfile using the Python API and writes JPEGs to disk in this way: cv_img = bridge.compressed_imgmsg_to_cv2(msg, desired_encoding="passthrough") cv2.imwrite(file_name, cv_img) However, the image quality is not that great. I looked at the source and the `compressed_imgmsg_to_cv2` function calls `cv2.imdecode`. So, essentially, I'm compressing the image twice. Is there a way around this using *cvbridge*? Should I just use PNG instead?

Viewing all articles
Browse latest Browse all 475

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>