Friday, October 11, 2013

Sweet and tasty approach to OpenCV and MinnowBoard

PC-esque cheap hardware is booming, and there seems to be no limit to the cool apps you can create on boards like Beaglebone, Rasperry Pi, or Minnowboard.

This obvious trend has had our attention for a long time now, plus we've got some customer cases going with the basic idea of migrating from expensive legacy systems to cheap off-the-shelf processing boards with huge capabilities in a meak form-factor.

Recently, some of our clients have expressed their interest in imaging systems, so we decided to whip up a small demo involving our "Ixonos BSP" small-footprint Linux distro and the industry standard OpenCV imaging library.

In this demo we used the MinnowBoard, Intel's small and low cost board which is based on Atom processor. The camera we used is a basic USB webcam from Logitech. Pictures below:

The Minnowboard with webcam watching candy drops

The camera setup allows the system to see some candy drops in this rather trivial pattern recognition demonstrator. The system acquires image rasters of the scene using v4l2 and OpenCV. Circle shaped patterns are detected using opencv function "HoughCircles", based on Hough Circle Transform. Code snippet below demonstrates simple circle detection using HoughCircles:
//circle detection
vector<vec3f> circles;
HoughCircles(detected_edges, circles, CV_HOUGH_GRADIENT,
             1, minSizeThreshold,  lowThreshold, lowThreshold/2,
             minSizeThreshold, minSizeThreshold + minSizeThreshold / 2);

printf("total circle count: %d\n",  circles.size());
After detecting all the circles, they are categorized according to color and statistics are printed to the screen.

Candy drops detected
Another picture below illustrates a situation with some more candy drops.
More candy drops detected

Ilkka Aulomaa, SW Engineer - Ixonos
Kalle Lampila, SW Engineer - Ixonos


  1. The Hough transform is a pretty CPU-intensive operation. I wonder if it could be moved to the GPU(?)

  2. I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people.
    Mason Soiza

  3. "MinnowBoard" is a robotics and computer vision demo by Scott Garman which uses the MinnowBoard and OpenCV to recognize and pick up an object.
    From us, you can get the Best Interior Painting Services in Washington DC and surrounding areas.

  4. Thank you for sharing. I found a lot of interesting information here. Really good post, very grateful and I hope you will write many more posts like this.I am a student.I want to advise a useful resource that will help you in your studies.

  5. I read this interesting article. I admire your efforts in writing this essay. I just wanted to express my gratitude for taking the time to offer your ideas and knowledge on this subject.
    CPS Lawyer near me
    Online solicitation of a minor

  6. This comment has been removed by the author.

  7. This Blog reminds me of my school project when I was working on OpenCV project and my friend was writing Taxation Thesis Writing Services in New York we both were very inthouestic that days