{"id":383,"date":"2007-09-26T00:26:19","date_gmt":"2007-09-26T07:26:19","guid":{"rendered":"http:\/\/www.elbeno.com\/blog\/?p=383"},"modified":"2007-09-26T00:34:22","modified_gmt":"2007-09-26T07:34:22","slug":"upc-scanning","status":"publish","type":"post","link":"https:\/\/www.elbeno.com\/blog\/?p=383","title":{"rendered":"UPC scanning"},"content":{"rendered":"<p>Well, I&#8217;ve finished with the easy bit. I&#8217;ve written code to grab a frame from the webcam and do a bit of postprocessing. The postprocessing looks like a good step towards making barcode recognition easier. I&#8217;m only working on this at nights so far, so I figure coping with the poor lighting I have in my study bodes well for the future.<\/p>\n<p>Here&#8217;s a webcam grab:<br \/>\n<a href=\"http:\/\/www.flickr.com\/photos\/88319047@N00\/1441867120\/\" title=\"Photo Sharing\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/farm2.static.flickr.com\/1335\/1441867120_4cb0a13bba_o.png\" alt=\"barcode_colour\" height=\"350\" width=\"380\" \/><\/a><br \/>\nHere&#8217;s the same grab, converted to greyscale:<br \/>\n<a href=\"http:\/\/www.flickr.com\/photos\/88319047@N00\/1441867132\/\" title=\"Photo Sharing\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/farm2.static.flickr.com\/1065\/1441867132_611d83b3eb_o.png\" alt=\"barcode_grey\" height=\"350\" width=\"380\" \/><\/a><br \/>\nHere&#8217;s the same grab, with the output range normalized (and the colour histogram biased by about 20 to get rid of the low frequency colours at the extrema):<br \/>\n<a href=\"http:\/\/www.flickr.com\/photos\/88319047@N00\/1441867136\/\" title=\"Photo Sharing\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/farm2.static.flickr.com\/1429\/1441867136_30f4e059cb_o.png\" alt=\"barcode_greypostprocess\" height=\"350\" width=\"380\" \/><\/a><br \/>\nNote: these images are cropped from larger images, so if you look at the histogram you probably won&#8217;t see the same thing I&#8217;m seeing.<\/p>\n<p>Now for the hard part: writing the code to recognise the barcode.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, I&#8217;ve finished with the easy bit. I&#8217;ve written code to grab a frame from the webcam and do a bit of postprocessing. The postprocessing looks like a good step towards making barcode recognition easier. I&#8217;m only working on this at nights so far, so I figure coping with the&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-383","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=383"}],"version-history":[{"count":0,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/383\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}