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

How to use laptop integrated camera to capture image?

asked 2013-02-01 01:35:27 -0500

Bala gravatar image

I'm new to ROS. I just want to capture an image with the Laptop camera and use it for object recognition. Can anyone please guide me on this?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2013-02-01 02:09:56 -0500

dornhege gravatar image

updated 2013-02-01 02:11:05 -0500

Basically you just need a ROS driver for you laptop camera. Fortunately there are some generic drivers like gscam or uvc_camera that you could try.

edit flag offensive delete link more

Comments

The driver rosnode publishes images (sensor_msgs/Image messages) on a particular topic, and then the code that you write subscribes to this topic to "capture" the image and perform whatever processing is needed to recognize the object.

SL Remy gravatar image SL Remy  ( 2013-02-01 02:23:45 -0500 )edit

can you suggest how to write a subscriber and a publisher for capturing image from laptop camera?

Prashant Kumar gravatar image Prashant Kumar  ( 2015-06-24 14:38:53 -0500 )edit

Hi there, the two listed packages include the publishers (you'd just need to point to the right device..). As far as the subscriber/client goes, take a look at http://wiki.ros.org/cv_bridge

SL Remy gravatar image SL Remy  ( 2015-08-19 23:57:21 -0500 )edit
3

answered 2018-11-17 21:05:28 -0500

Sparkle Eyes gravatar image

updated 2018-11-17 21:05:46 -0500

I'm late to the party but just to help others who stumbled upon this page: use usb_cam works just as well on my laptop.

Use sudo apt-get to install usb_cam. Then you can test it with roslaunch usb_cam usb_cam-test.launch

https://answers.ros.org/question/2597...

edit flag offensive delete link more

Comments

Use sudo apt-get to install usb_cam.

I don't believe that will work: the Debian pkgs always use dashes instead of underscores, and you're missing the name of the ROS distribution in that command.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-18 04:40:12 -0500 )edit

Thanks for pointing this out. I just meant the user can use apt-get to install the package, not referring to the specific grammar.

Sparkle Eyes gravatar image Sparkle Eyes  ( 2018-11-18 11:01:35 -0500 )edit

This doesn't work out in my case.

Ankit_Jaiswal gravatar image Ankit_Jaiswal  ( 2019-06-29 10:10:54 -0500 )edit

Hey, as he didn't clearly specified which command to use for installing usb-cam package, use, sudo apt-get install ros-kinetic-usb-cam to install it successfully!

SanketKhadse gravatar image SanketKhadse  ( 2020-03-06 06:58:56 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-02-01 01:35:27 -0500

Seen: 5,713 times

Last updated: Nov 17 '18