{"id":124,"date":"2022-03-12T19:14:11","date_gmt":"2022-03-13T00:14:11","guid":{"rendered":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/?p=124"},"modified":"2022-03-12T19:14:11","modified_gmt":"2022-03-13T00:14:11","slug":"keatons-status-report-3-12","status":"publish","type":"post","link":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/2022\/03\/12\/keatons-status-report-3-12\/","title":{"rendered":"Keaton&#8217;s Status Report 3\/12"},"content":{"rendered":"<p>During break, I managed to make some progress, but not as much as I ideally should have. I made progress in two area\u2019s, the first being pixel diff localization, and the second being camera setup\/image comparison.<\/p>\n<p>Using just subtraction for the pixel diff didn\u2019t really work, due to very minor changes in lighting conditions. To resolve this, I used a slightly more involved method that I got from stack overflow. I calculated the Structural Similarity Index, located contours, and got the bounds from them worked pretty well:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-125\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-content\/uploads\/sites\/187\/2022\/03\/Screen-Shot-2022-03-12-at-2.27.12-PM-300x168.png\" alt=\"\" width=\"300\" height=\"168\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-content\/uploads\/sites\/187\/2022\/03\/Screen-Shot-2022-03-12-at-2.27.12-PM-300x168.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-content\/uploads\/sites\/187\/2022\/03\/Screen-Shot-2022-03-12-at-2.27.12-PM-768x431.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-content\/uploads\/sites\/187\/2022\/03\/Screen-Shot-2022-03-12-at-2.27.12-PM-1024x574.png 1024w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-content\/uploads\/sites\/187\/2022\/03\/Screen-Shot-2022-03-12-at-2.27.12-PM.png 1918w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>I initially figured that the largest contour region will likely always be the object we are looking for, but this proved to be false (the shadow was bigger both in the example with my hand and the example with the applesauce farther down), so we may need some overhead lighting to prevent that from happening. Overall, I\u2019m pretty happy with the localization code itself, with the correct lighting, it\u2019ll work fine.<\/p>\n<p>The actual setup stuff was a mixed bag. I made a <em>exceptionally<\/em> high tech setup for the camera apparatus, shown below:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-126\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-content\/uploads\/sites\/187\/2022\/03\/2A1C8A84-F948-472C-92B8-16D38F01C7B2-300x225.jpeg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-content\/uploads\/sites\/187\/2022\/03\/2A1C8A84-F948-472C-92B8-16D38F01C7B2-300x225.jpeg 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-content\/uploads\/sites\/187\/2022\/03\/2A1C8A84-F948-472C-92B8-16D38F01C7B2-768x576.jpeg 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-content\/uploads\/sites\/187\/2022\/03\/2A1C8A84-F948-472C-92B8-16D38F01C7B2-1024x768.jpeg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>As you can see, it\u2019s the camera module, sticky putty\u2019d to an empty hand sanitizer bottle, with some velcro strips attached. There are equivalently spaced velcro strips on the ceiling of my cabinet, so I can attach\/rotate the angle of the camera as needed. This worked fairly well for the camera itself, but I had to manually hold the RPI in place, which led to a bit of shifting\/jiggling, which screwed the pixel diff. The RPI belongs to Harry, I didn\u2019t want to attach the velcro strips (which are really hard to remove and leave a lot of sticky gunk behind) without his permission. I also wasn\u2019t certain that the velcro strips would hold the weight of the RPI, and I didn\u2019t want to break something that wasn\u2019t mine. Despite this, I had one decent photo of the applesauce where the pixel diff worked pretty well (omitting some changes in the RPI\/background outside of the cabinet, and the shadow)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-127\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-content\/uploads\/sites\/187\/2022\/03\/Screen-Shot-2022-03-12-at-6.21.55-PM-300x226.png\" alt=\"\" width=\"300\" height=\"226\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-content\/uploads\/sites\/187\/2022\/03\/Screen-Shot-2022-03-12-at-6.21.55-PM-300x226.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-content\/uploads\/sites\/187\/2022\/03\/Screen-Shot-2022-03-12-at-6.21.55-PM-768x578.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-content\/uploads\/sites\/187\/2022\/03\/Screen-Shot-2022-03-12-at-6.21.55-PM-1024x770.png 1024w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-content\/uploads\/sites\/187\/2022\/03\/Screen-Shot-2022-03-12-at-6.21.55-PM.png 2042w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>I manually cropped the image, and did a quick pairwise comparison using only the applesauce image, and the results were REALLY bad. We got at 5 matches (on shredded cheese), out of several hundreds of possible features. So, it seems that we\u2019ll likely need to enforce either facing the products so that the label is directly towards the camera, or we\u2019ll have to move the camera to be on the door, and prevent the user from placing large objects in front of smaller ones.<\/p>\n<p>To summarize, while I made a fair bit of progress, I think that I&#8217;m still behind where I probably should be at this point in time. Thankfully, I think that most of the blockers are just some design stuff about how to handle label visibility, the code that was used to do the initial algorithm comparison was fairly easy to extend now that I know what I&#8217;m doing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>During break, I managed to make some progress, but not as much as I ideally should have. I made progress in two area\u2019s, the first being pixel diff localization, and the second being camera setup\/image comparison. Using just subtraction for the pixel diff didn\u2019t really work, due to very minor changes in lighting conditions. To &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/2022\/03\/12\/keatons-status-report-3-12\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Keaton&#8217;s Status Report 3\/12&#8221;<\/span><\/a><\/p>\n","protected":false},"author":592,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,8],"tags":[],"_links":{"self":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-json\/wp\/v2\/posts\/124"}],"collection":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-json\/wp\/v2\/users\/592"}],"replies":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-json\/wp\/v2\/comments?post=124"}],"version-history":[{"count":1,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-json\/wp\/v2\/posts\/124\/revisions"}],"predecessor-version":[{"id":128,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-json\/wp\/v2\/posts\/124\/revisions\/128"}],"wp:attachment":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-json\/wp\/v2\/media?parent=124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-json\/wp\/v2\/categories?post=124"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s22-teamb6\/wp-json\/wp\/v2\/tags?post=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}