{"id":499,"date":"2019-07-22T12:00:35","date_gmt":"2019-07-22T19:00:35","guid":{"rendered":"http:\/\/letsbuildroboticswithshadow8472.com\/?p=499"},"modified":"2019-07-22T00:09:59","modified_gmt":"2019-07-22T07:09:59","slug":"programming-a-pi-to-deter-cats-part-9","status":"publish","type":"post","link":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/2019\/07\/22\/programming-a-pi-to-deter-cats-part-9\/","title":{"rendered":"Programming a Pi to Deter Cats: Part 9"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Good Morning from my Robotics Lab! This is Shadow 8472, and today, I feel like I&#8217;m progressing in a non-linear fashion. Let&#8217;s get started! <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Last week, I cleaned up my code by moving the bits I still wanted over from one .py file to another. My goal for this week was to distinguish between objects moving in the foreground and a stationary, but adaptive background. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My progress this week doesn&#8217;t feel quite so linear. I got about half way to my stated goal on my own while working with a premade background subtraction function, and ended up getting stuck on trying to find a way to monitor my own progress. I&#8217;d like to first see my foreground, preferably in color, then I&#8217;d like to see my present background so I can hopefully understand the algorithm better.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I went into the workshop for a little help, and things really went in a lot of odd directions after that. We spent a while chasing oddball, but not quite false, leads a couple big bugs. We downloaded and installed an IDE called Spyder3. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As an aside, I would just like to say, that IDE&#8217;s are both a curse and a blessing. They are a pain to get working correctly, especially if you&#8217;re working with anything outside the core language. But they make development easier, and they are a lot easier to use than a command line for new programmers, once again provided someone who knows what they are doing is setting it up or the programmer has ample amounts of both luck and determination. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Spyder took a lot of hassle to generate a few nuggets of debug gold, and it still is misbehaving. I plan on just using it as a nicer environment for coding, but I intend to use the command line for testing unless I need a closer look at my program&#8217;s state when it fails.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One of my big breakthroughs this week was finally realizing a mismatch between a list of list of lists and a list of lists (a 3D array and a 2D array). It looks like one of those bugs I had was about an improper use of a blur function. My current understanding is that it outputs a &#8220;color&#8221; frame even if it gets a grayscale input.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I eventually arrived at a grayscale, background-subtracted image with poorly defined edges. It seems to have a hard time with my purple shirt against another background. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My goal for next week is to stabilize the background subtraction with a smooth edges algorithm, and hopefully be able to draw boxes around objects.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Final Question: did you or would you rather learn programming with an IDE or with a command line?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Good Morning from my Robotics Lab! This is Shadow 8472, and today, I feel like I&#8217;m progressing in a non-linear fashion. Let&#8217;s get started! Last week, I cleaned up my code by moving the bits I still wanted over from one .py file to another. My goal for this week was to distinguish between objects &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/2019\/07\/22\/programming-a-pi-to-deter-cats-part-9\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Programming a Pi to Deter Cats: Part 9&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-499","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/comments?post=499"}],"version-history":[{"count":2,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/499\/revisions"}],"predecessor-version":[{"id":501,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/499\/revisions\/501"}],"wp:attachment":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/media?parent=499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/categories?post=499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/tags?post=499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}