{"id":181,"date":"2012-12-26T14:04:43","date_gmt":"2012-12-26T19:04:43","guid":{"rendered":"https:\/\/peterabeles.com\/blog\/?p=181"},"modified":"2012-12-26T21:29:54","modified_gmt":"2012-12-27T02:29:54","slug":"rovio-to-3d-stereo-point-clouds","status":"publish","type":"post","link":"https:\/\/peterabeles.com\/blog\/?p=181","title":{"rendered":"Rovio to 3D Stereo Point Clouds"},"content":{"rendered":"<div id=\"attachment_184\" style=\"width: 330px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/rovio_disparity.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-184\" class=\"size-full wp-image-184\" title=\"Disparity Image\" alt=\"rovio_disparity\" src=\"https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/rovio_disparity.jpg\" width=\"320\" height=\"240\" srcset=\"https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/rovio_disparity.jpg 320w, https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/rovio_disparity-300x225.jpg 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a><p id=\"caption-attachment-184\" class=\"wp-caption-text\">This disparity image was created using a single Rovio robot by taking pictures from two different locations.<\/p><\/div>\n<p>I&#8217;m a bit late to the game of Rovio hacking, but here I am experimenting with using a Rovio I bought two years ago.\u00a0 The Rovio by Wowwee is a remote control car that has a camera mounted on it that can be controlled over wireless web based interface.\u00a0 When it was discontinued, the existing stock was liquidated in a fire sale, where they were sold for around $100 each.\u00a0 You can still buy them now, for about $400, on Amazon. Keep in mind you might need to buy a new battery and power supply.<\/p>\n<p><center><a href=\"http:\/\/www.amazon.com\/gp\/product\/B001CQLGD6\/ref=as_li_ss_tl?ie=UTF8&amp;tag=boofcv-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B001CQLGD6\">WowWee Rovio Wi-Fi Enabled Robotic WebCam<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border: none !important; margin: 0px !important;\" alt=\"\" src=\"http:\/\/www.assoc-amazon.com\/e\/ir?t=boofcv-20&amp;l=as2&amp;o=1&amp;a=B001CQLGD6\" width=\"1\" height=\"1\" border=\"0\" \/><\/center><center><\/p>\n<div id=\"attachment_199\" style=\"width: 102px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/peterabeles.com\/blog\/?attachment_id=199\" rel=\"attachment wp-att-199\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-199\" class=\"size-full wp-image-199\" alt=\"Picture of a Rovio\" src=\"https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/thumb_sq.gif\" width=\"92\" height=\"92\" \/><\/a><p id=\"caption-attachment-199\" class=\"wp-caption-text\">Picture of a Rovio<\/p><\/div>\n<p><\/center>One of the things that makes Rovio so great, and more than a simple toy, is that it can move in any direction! Which means, that unlike your standard remote control car, it can move sideways. This is exactly what you need if you want to do stereo vision and create a point cloud.<\/p>\n<p>The figure to the left shows a disparity image created using a single Rovio by driving it a few inches to the right.\u00a0 In this disparity image warmer colors are closer and cooler colors are farther away.\u00a0 See below for the input images.\u00a0 From this disparity image you can create a point cloud, which can then be used for making 3D models or obstacle detection.\u00a0 This process is entirely automated using <a href=\"http:\/\/boofcv.org\">BoofCV<\/a> and the source code is available online on my Rovio Github project:<\/p>\n<p><center><a href=\"https:\/\/github.com\/lessthanoptimal\/rovio\">https:\/\/github.com\/lessthanoptimal\/rovio<\/a><\/center>So how does this work?\u00a0 Well a full explanation would be quite detailed.\u00a0 The image processing code is for the most part cut and pasted from examples on BoofCV&#8217;s website.\u00a0 A list of relevant example is found below:<\/p>\n<ul>\n<li><a href=\"http:\/\/boofcv.org\/index.php?title=Example_Detect_Describe_Interface\">Detecting Interest Points<\/a><\/li>\n<li><a href=\"http:\/\/boofcv.org\/index.php?title=Example_Associate_Interest_Points\">Associating Interest Points<\/a><\/li>\n<li><a href=\"http:\/\/boofcv.org\/index.php?title=Example_Stereo_Single_Camera\">Dense Stereo from Single Camera<\/a><\/li>\n<\/ul>\n<h2>\u00a0Initial Setup<\/h2>\n<p>You will need to do the following once so that your camera is calibrated and that the software knows your robots parameters.<\/p>\n<ol>\n<li>Checkout source code from Github<\/li>\n<li>Calibrate the camera.\n<ol>\n<li>Look at this first <a href=\"http:\/\/boofcv.org\/index.php?title=Example_Calibrate_Planar_Mono\">BoofCV Camera Calibration<\/a><\/li>\n<li>Collect images in 640&#215;480 using ManualControlApp by pressing &#8216;m&#8217;<\/li>\n<li>Select good images, run calibration app.\u00a0 Pixel error should be around 0.3<\/li>\n<\/ol>\n<\/li>\n<li>Get your robots MAC address using ManualControlApp by pressing &#8216;a&#8217;<\/li>\n<li>Create directory for your robot in robots.\u00a0 Place intrinsic.xml and file &#8220;mac&#8221; with the MAC address.\u00a0 See existing examples<\/li>\n<\/ol>\n<h2>Creating Point Cloud<\/h2>\n<p>Once you have done all of that all you need to do now is place the Rovio in a well lit room in front of something with lots of texture and run AutoPointCloudApp.\u00a0 That app will automatically figure out which robot it is controlling, loading calibration, collect and image, move the robot, and collect another image.\u00a0 The two images are then processed and the results displayed.\u00a0 Don&#8217;t forget to change the IP address in the main() function of AutoPointCloudApp.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_183\" style=\"width: 670px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/rovio_associated.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-183\" class=\"size-full wp-image-183\" alt=\"rovio_associated\" src=\"https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/rovio_associated.jpg\" width=\"660\" height=\"240\" srcset=\"https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/rovio_associated.jpg 660w, https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/rovio_associated-300x109.jpg 300w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/a><p id=\"caption-attachment-183\" class=\"wp-caption-text\">Associated points between the two views using SURF features.<\/p><\/div>\n<div id=\"attachment_185\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/rovio_rectification.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-185\" class=\"size-full wp-image-185 \" title=\"Rectified Images\" alt=\"rovio_rectification\" src=\"https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/rovio_rectification.jpg\" width=\"640\" height=\"240\" srcset=\"https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/rovio_rectification.jpg 640w, https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/rovio_rectification-300x112.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><p id=\"caption-attachment-185\" class=\"wp-caption-text\">Rectified Stereo Images from Rovio<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_182\" style=\"width: 243px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/rovio_3d_topview.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-182\" class=\"size-full wp-image-182\" alt=\"rovio_3d_topview\" src=\"https:\/\/peterabeles.com\/blog\/wp-content\/uploads\/2012\/12\/rovio_3d_topview.jpg\" width=\"233\" height=\"264\" \/><\/a><p id=\"caption-attachment-182\" class=\"wp-caption-text\">Synthetic top view created using 3D points computed from the disparity image.<\/p><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m a bit late to the game of Rovio hacking, but here I am experimenting with using a Rovio I bought two years ago.\u00a0 The Rovio by Wowwee is a remote control car that has a camera mounted on it that can be controlled over wireless web based interface.\u00a0 When it was discontinued, the existing [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-181","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/peterabeles.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peterabeles.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peterabeles.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peterabeles.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/peterabeles.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=181"}],"version-history":[{"count":10,"href":"https:\/\/peterabeles.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/181\/revisions"}],"predecessor-version":[{"id":200,"href":"https:\/\/peterabeles.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/181\/revisions\/200"}],"wp:attachment":[{"href":"https:\/\/peterabeles.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peterabeles.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peterabeles.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}