Ask Your Question

GXY's profile - activity

2019-09-19 11:54:42 -0500 marked best answer example for setting destination width and height and getting updated camera info when using image_proc/resize

Hey, could someone please give me a concrete example about how to use the resize() function via command line?

This link seems to be promising, but it doesn't show how to set destination width and height and how to get updated camera info.

This link is also similar, but I don't understand which .h file it's about and why is a header file useful.

In the video tutorial I didn't find anything useful either.

I was expecting that I can specify the destination width and height via command line and also get the updated camera info. Thanks in advance!

2019-09-19 11:54:38 -0500 received badge  Popular Question (source)
2019-09-19 11:54:22 -0500 marked best answer subscribe sensor_message/Image without opencv

I would like to print(or just read) the content(i.e. the 'data' field) of a ROS topic of type "sensor_message/Image", but without OpenCV(for performance consideration). Here is a snippet of some naive codes that I've tried:

#!/usr/bin/env python
PKG = 'numpy_tutorial'
import roslib; roslib.load_manifest(PKG)
import rospy 
from sensor_msgs.msg import Image 

def callback(Image):
    print (Image.data)

def listener():
    rospy.init_node('listener')
    rospy.Subscriber('/camera/color/image_raw', Image, callback)
    rospy.spin()

if __name__ == '__main__':
    listener()

But it just prints some unreadable characters in console, I anticipated that it's not just 'print(Image.data)', but how can I do it correctly in python? besides, my ultimate goal is to transform 'data' to numpy array format.

Many thanks in advance!

2019-09-19 11:54:22 -0500 received badge  Scholar (source)
2019-09-10 12:18:14 -0500 commented answer subscribe sensor_message/Image without opencv

Sorry, may I also ask how to accept an answer here?

2019-09-10 11:41:00 -0500 asked a question example for setting destination width and height and getting updated camera info when using image_proc/resize

example for setting destination width and height and getting updated camera info when using image_proc/resize Hey, could

2019-09-10 11:34:05 -0500 received badge  Enthusiast
2019-09-07 13:29:48 -0500 commented answer subscribe sensor_message/Image without opencv

thanks, it worked

2019-09-02 03:45:17 -0500 received badge  Popular Question (source)
2019-08-31 09:53:14 -0500 commented question Read image in main loop instead of imageCallback ?

what if I am using python? python has no equivalent version of spinOnce() as described here:https://answers.ros.org/ques

2019-08-31 06:00:09 -0500 asked a question subscribe sensor_message/Image without opencv

subscribe sensor_message/Image without opencv I would like to print(or just read) the content(i.e. the 'data' field) of

2019-01-27 23:38:09 -0500 received badge  Famous Question (source)
2018-12-02 23:32:27 -0500 received badge  Notable Question (source)
2018-10-02 02:36:34 -0500 received badge  Popular Question (source)
2018-08-11 13:44:03 -0500 asked a question pass string parameter from command line using rosrun

pass string parameter from command line using rosrun In OpenCV, it's common that a program takes a command line paramete