Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

cv_bridge.core.CvBridgeError: [8UC4] is not a color format. but [bgr8] is. The conversion does not make sense

# This is what worked for me to be able to write gray image on disk
...
cv_img = bridge.imgmsg_to_cv2(msg, desired_encoding="8UC4") # desired_encoding="passthrough"
cv2.imwrite(os.path.join(args.output_dir, "frame%06i.png" % count), cv_img[:,:,0])
...
 
PREVIOUS NEXT
Tagged: #color #The #conversion #sense
ADD COMMENT
Topic
Name
2+8 =