Smile detection using OpenCV + Designing a ROS node

An implementation of smile detection using OpenCV, cv_bridge, ROS and Python is available in full at the bottom of this post.

I’ve been developing in ROS for awhile now, and I’ve settled into a pattern for creating nodes that I find works really well for me. It has three components:

  1. Create a single class that encapsulates the entirety of what the node is supposed to do
  2. All subscriber callbacks are restricted to saving the content of the message to a member variable to hold until ready to be processed
  3. Have a run function in the code that is the main ROS loop, and calls the update functions to process data

Functionally, it looks like this:
(I’m using FaceFinder as an example)


[Read more…]

How Far I’ll Go

Moana was a great movie, and I liked how it had a really compelling hero’s journey with a main female character that didn’t fall in love with anyone! Also the music is amazing, so here’s a small tribute to my favorite song in it.

On reflection, the message in the song is a pretty positive one. During my work at Amazon Robotics, we’re always told to “Think Big” and have a “Bias for Action”. In other words, staying in the shallows where results are always known will also cause you to develop code/products that are squarely inside the box. Sometimes it takes a big failure in order to see possible paths for improvement in ways one couldn’t have otherwise known. Well, of course impulsively jumping into the ocean like Moana on her first voyage is a bad idea–but we’re all smarter than that. 😉