{"id":178,"date":"2023-03-26T03:25:16","date_gmt":"2023-03-26T03:25:16","guid":{"rendered":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/?p=178"},"modified":"2023-03-26T03:25:16","modified_gmt":"2023-03-26T03:25:16","slug":"lees-status-report-for-3-25-2023","status":"publish","type":"post","link":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/2023\/03\/26\/lees-status-report-for-3-25-2023\/","title":{"rendered":"Lee\u2019s Status Report for 3\/25\/2023"},"content":{"rendered":"<p><strong><span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">What<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">did<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">you<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">personally<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">accomplish<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">this<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">week<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">on<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">the<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">project?<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">Give<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">files<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">or<\/span> <\/strong><br class=\"textLayer--absolute\" role=\"presentation\" \/><strong><span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">photos<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">that<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">demonstrate<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">your<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">progress.<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">Prove<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">to<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">the<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">reader<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">that<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">you<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">put<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">sufficient\u00a0<\/span><span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">effort<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">into<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">the<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">project<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">over<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">the<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">course<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">of<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">the<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">week<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">(12+<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">hours).<\/span><\/strong><\/p>\n<p>This past week I worked on the CV code to segment out both black and white keys. I made several changes to my code and I will go through them here:<\/p>\n<ol>\n<li>Resize the image to make things consistent (used some factor so that every image would have the same number of pixels while keeping the same aspect ratio).<\/li>\n<li>Add a gray border to the image to help with thresholding. Can&#8217;t be black nor white because then the border would be thresholded with either the white or black keys which we don&#8217;t want<\/li>\n<li>Do the grayscale, blurring, and edge detection. Then do binary thresholding on the edge detection. This gives us areas dividing all keys to the borders seen here:<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-185\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-3.png\" alt=\"\" width=\"1900\" height=\"479\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-3.png 1900w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-3-300x76.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-3-768x194.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-3-1024x258.png 1024w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/li>\n<li>Then we do segmentation on the image so that each of the white spaces are assigned enumerated labels. I used the cv.connectedComponentsWithStats function for this task. These labels were converted by me to greyscale values between 0 and 255 normalized with an even distribution. The output image has layers of shades of gray each value essentially representing a segmented region for each piano key or as I define them as &#8220;sectors&#8221;:<img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-184\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-1.png\" alt=\"\" width=\"1898\" height=\"481\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-1.png 1898w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-1-300x76.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-1-768x195.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-1-1024x260.png 1024w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/li>\n<li>I then used a mouse cursor window function called cv.setMouseCallback that allows me to create a window for the image where my mouse can read information on the 2D matrix. By getting its value I can find it&#8217;s respective sector information for that segmented region from a list I created to store that information. When the user hovers over a key, the enumerated number of that sector will show up.\u00a0 Here is some of my code below and the terminal output showing this:<\/li>\n<\/ol>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-183\" src=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-2.png\" alt=\"\" width=\"1516\" height=\"964\" srcset=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-2.png 1516w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-2-300x191.png 300w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-2-768x488.png 768w, http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-content\/uploads\/sites\/233\/2023\/03\/lee-status-report-3-25-2-1024x651.png 1024w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p>Per last week, last Monday I ordered the phone mount that i decided to go with. It has arrived to the ECE corridor so I can try it out this coming Monday.<\/p>\n<p>Lastly, I worked on finishing the ethics assignment this week too. This includes having the task 3 discussion with my team in addition to going to the ethics lecture for task 4.<\/p>\n<p><strong><span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">&#8220;<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">Is<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">your<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">progress<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">on<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">schedule<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">or<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">behind?<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">If<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">you<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">are<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">behind,<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">what<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">actions<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">will<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">be\u00a0<\/span><span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">taken<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">to<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">catch<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">up<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">to<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">the<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">project<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">schedule?<\/span><\/strong><\/p>\n<p>My progress is on schedule. I need to do some small adjusting for the image sizes to make that more test images are more consistent. I will test this with the new phone holder stand to start testing with real images with the ring light to make further adjustments there.<\/p>\n<p><strong><span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">&#8220;<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">What<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">deliver<\/span><span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">ables<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">do<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">you<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">hope<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">to<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">complete<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">in<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">the<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">next<\/span> <span class=\"textLayer--absolute\" dir=\"ltr\" role=\"presentation\">week?<\/span> <\/strong><\/p>\n<p>By next week according to the schedule, I plan on incorporating the hands in there. How I will do that is essentially have a picture shot of the piano with no fingers on it to have it as a background. Then the colored tips of the gloves will hover over a piano key, the CV will easily be able to tell that the colored region overlapping with a segmented region. So it will be able to determine which piano key the finger is over then.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What did you personally accomplish this week on the project? Give files or photos that demonstrate your progress. Prove to the reader that you put sufficient\u00a0effort into the project over the course of the week (12+ hours). This past week I worked on the CV code to segment out both black and white keys. I &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/2023\/03\/26\/lees-status-report-for-3-25-2023\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Lee\u2019s Status Report for 3\/25\/2023&#8221;<\/span><\/a><\/p>\n","protected":false},"author":738,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[9],"_links":{"self":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-json\/wp\/v2\/posts\/178"}],"collection":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-json\/wp\/v2\/users\/738"}],"replies":[{"embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-json\/wp\/v2\/comments?post=178"}],"version-history":[{"count":4,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-json\/wp\/v2\/posts\/178\/revisions"}],"predecessor-version":[{"id":186,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-json\/wp\/v2\/posts\/178\/revisions\/186"}],"wp:attachment":[{"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-json\/wp\/v2\/media?parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-json\/wp\/v2\/categories?post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/course.ece.cmu.edu\/~ece500\/projects\/s23-teamb6\/wp-json\/wp\/v2\/tags?post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}