ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

shravan's profile - activity

2019-11-10 21:02:03 -0500 received badge  Taxonomist
2016-06-02 15:35:24 -0500 received badge  Famous Question (source)
2015-05-29 04:36:12 -0500 received badge  Famous Question (source)
2015-04-30 06:27:01 -0500 received badge  Famous Question (source)
2015-03-09 17:31:32 -0500 received badge  Notable Question (source)
2015-03-02 18:07:19 -0500 received badge  Famous Question (source)
2015-01-14 06:40:48 -0500 received badge  Notable Question (source)
2014-12-21 21:33:02 -0500 received badge  Popular Question (source)
2014-12-19 22:37:54 -0500 asked a question Is it possible to extract gray scale images using image_view?

I have ros messages which contains imaged data of type 16UC1. But image_view seems to extract image of type RGB8 only. Is it possible to make it convert 8UC1 and 16UC1 types?

2014-12-19 01:01:32 -0500 received badge  Popular Question (source)
2014-12-18 11:46:07 -0500 commented answer Is it possible to convert depth messages as Ipl image using CvBridge

@Wolf . Sorry for that, it is my mistake .I have corrected it .Now have a look

2014-12-18 05:31:03 -0500 commented answer Is it possible to convert depth messages as Ipl image using CvBridge

@Wolf i have added my code. When I try this out I get an image but it is distorted . I guess Opencv does not take 16 bit images. Is there any possibility write images of 16bit type

2014-12-17 12:34:30 -0500 commented answer Is it possible to convert depth messages as Ipl image using CvBridge

And I used Opencv python for this conversion

2014-12-17 12:32:12 -0500 commented answer Is it possible to convert depth messages as Ipl image using CvBridge

@Wolf Thanks for the suggestion.It helped me to convert depth messages to opencv images but after saving it shows me a black image. When i Googled ,it told me that 32FC1 images cannot be stored and I am not sure how to convert it into a 8bit or 16 bit data to store it. Is it possible to do it

2014-12-17 01:05:43 -0500 received badge  Enthusiast
2014-12-16 23:00:07 -0500 asked a question Is it possible to convert depth messages as Ipl image using CvBridge

I could convert RGB messages in to picture but says that the "[32FC1] is not a color format. but [mono8] is. The conversion does not make sense". Is there anything else i should be doing?

my code

import roslib
from matplotlib import pyplot as plt
roslib.load_manifest('beginner_tutorials')
import sys
import rospy
import cv2
from std_msgs.msg import String
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
import numpy as np
i=0
np.set_printoptions(threshold='nan')
def callback(data):
 try:
        cv_image = CvBridge().imgmsg_to_cv2(data, "32FC1")
 except CvBridgeError, e:
        print e 
 global i
 cv_image1 = np.array(cv_image, dtype=np.float)
 cv2.normalize(cv_image1, cv_image1, 0, 1, cv2.NORM_MINMAX)
 cv_image1=cv_image1*2**16

 cv2.imwrite("im"+str(i)+".jpg")
     i+=1

def video():

rospy.init_node('video', anonymous=True)

im=rospy.Subscriber('/camera/depth_registered/image_rect', Image, callback)

rospy.spin()
if __name__ == '__main__':
   video()
2014-12-16 11:26:04 -0500 received badge  Editor (source)
2014-12-16 06:23:00 -0500 commented answer Error: "Unable to convert 32FC1 image to bgr8" while extracting rbg(d?) data from a bag

@tianb03 I am also trying to convert bagfiles containing raw depth and rgb data and face the same problem when trying to convert raw depth to images. But I don't understand where and how to execute the code you have given and what the node should contain. I am new to ROS. So please explain it to me

2014-12-15 04:59:11 -0500 received badge  Notable Question (source)
2014-12-14 09:59:24 -0500 received badge  Popular Question (source)
2014-12-13 14:32:22 -0500 asked a question How to extract depth data from rosbags(contains depth and RGB data) as picture frames

I have a Bagfile containing Raw depth and RGB data. I converted the RGB data into images using the tutorial http://wiki.ros.org/rosbag/Tutorials/... But when I used the same for converting raw depth to images, I get an error stating " cannot convert 32FC1 to RGB8". This is my launch file:

<launch>
 <node pkg="rosbag" type="play" name="rosbag" args="-d 2 $(find image_view)/test.bag"/>
 <node name="extract" pkg="image_view" type="extract_images" respawn="false" output="screen" cwd="ROS_HOME">
   <remap from="image" to="/camera/depth_registered/image_rect"/>
 </node>

</launch>

I went through Google for various suggestions given to do the same but I being a beginner find most of the solution vague or misleading and I end up confusing myself.

I need to know whether my approach was right or should I do something else? If so what should I do exactly.Please help me through this

2014-12-13 14:15:49 -0500 marked best answer Bagfile (containing depth and RGB data) to picture frames

When I convert a bagfile (containing depth and RGB data) to picture frames, I get different number of picture frames each time I launch the code given in the tutorial given below and the subsequent video I compile is totally wayward.

http://wiki.ros.org/rosbag/Tutorials/...

Please guide me through this

2014-12-13 14:15:49 -0500 received badge  Supporter (source)