Ask Your Question
0

raspicam_node and face_detector node together

asked 2018-08-14 02:39:25 -0500

Nelle gravatar image

Hi!

I seem to be confused about using face_detection in my custom bot. I have an RPi camera and want to use it to detect faces. I found one here. And I also found this neat face_detector package. Can someone please show me how this can be done? I'm running my ROS kinetic on raspbian and raspberry pi v3.

I want my camera to detect faces and at the same time, display the results using Rviz in my ros-enabled remote computer.

edit retag flag offensive close merge delete

Comments

What are you wanting to see in RVIZ? What type of information do you want to know about the detected face? 2D bounding box? 2D centre? Cropped image?

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2018-08-14 08:14:28 -0500 )edit

Can I have both 2D bounding box and 2D centre? Sorry, not very familiar with face detection though. And I have just started with ROS as well.

Nelle gravatar imageNelle ( 2018-08-14 19:26:42 -0500 )edit

Also can I make the raspicam_node show entire image stream? I mean continuously like what the face_detector does?

Nelle gravatar imageNelle ( 2018-08-14 20:05:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-08-15 02:28:10 -0500

There are two steps to get this working, getting the raspicam node up and running then getting the face detection node working.

If I remember rightly the raspicam node is a little unusual in that you have to send a start service request to it before it will publish any images. This makes sense on a Pi so you can conserve processing power when you don't need the images. When you have this node up and running and you can view the image stream on RVIZ on your remote computer then you're ready to move onto step two.

The face_detection node you linked to is designed to work with stereo cameras so it's not suitable for use with just a raspberry pi camera, however the face_detection_tracking package does work with monocular camera images and also produces the same bounding box overlay you're looking for. Running this node on your remote computer will spare the CPU of the Pi and result in a faster detection frequency.

When this node is running there will be a new image topic you can view in RVIZ that will highlight any detected faces.

Hope this gets you going in the right direction.

edit flag offensive delete link more

Comments

Thanks! One more question, how can I view the images on RViz in a remote computer? Should I just ssh into the pi? Or would ROS master/slave work?

Nelle gravatar imageNelle ( 2018-08-15 02:42:14 -0500 )edit

ROS is a fundamentally distributed system if you look at this tutorial you can see how to setup your environment variables to use a multi-computer system. When this is working, RVIZ on the remote computer can subscribe to an image topic published

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2018-08-15 05:55:32 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-08-14 02:39:25 -0500

Seen: 168 times

Last updated: Aug 15 '18