{"id":879,"date":"2016-08-29T06:02:11","date_gmt":"2016-08-29T04:02:11","guid":{"rendered":"https:\/\/www.kurokesu.com\/main\/?p=879"},"modified":"2016-09-01T20:22:22","modified_gmt":"2016-09-01T18:22:22","slug":"long-range-license-plate-recognition","status":"publish","type":"post","link":"https:\/\/www.kurokesu.com\/main\/2016\/08\/29\/long-range-license-plate-recognition\/","title":{"rendered":"Long range license plate recognition"},"content":{"rendered":"<p style=\"text-align: justify;\"><a href=\"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/IMG_9936_3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-895 size-medium\" src=\"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/IMG_9936_3-300x197.jpg\" alt=\"IMG_9936_3\" width=\"300\" height=\"197\" srcset=\"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/IMG_9936_3-300x197.jpg 300w, https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/IMG_9936_3-768x505.jpg 768w, https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/IMG_9936_3-1024x673.jpg 1024w, https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/IMG_9936_3.jpg 1500w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>Automatic license\/number plate recognition (ALPR \/ ANPR) is a specialized kind of optical character (OCR). Target applications might include automatic car parking control, electronic toll collection, neighborhood watch, vehicle tracking and such.<\/p>\n<p style=\"text-align: justify;\">Concerns about these systems have centered on privacy fears of government tracking citizens&#8217; movements. Critics have described it as a form of mass surveillance. Nice let&#8217;s try!<\/p>\n<p style=\"text-align: justify;\">As I have few telephoto lenses, selected one with has highest MTF. In this case sharpness won over focal length. My trusty <a href=\"http:\/\/www.kurokesu.com\/shop\/cameras\/CAMUSB1\">Kurokesu C1<\/a> USB camera has pixel size of 2&#215;2\u00b5m so sharpness will help achieving better results.<\/p>\n<h3>Gear<\/h3>\n<ul>\n<li style=\"text-align: justify;\"><a href=\"http:\/\/www.kurokesu.com\/shop\/cameras\/CAMUSB1\">Kurokesu C1 USB web camera<\/a><\/li>\n<li style=\"text-align: justify;\">Sigma 70-300 telephoto lens<\/li>\n<li style=\"text-align: justify;\">EOS to C-mount adapter<\/li>\n<li style=\"text-align: justify;\">5mm adapter ring C-mount to CS-mount<\/li>\n<li style=\"text-align: justify;\">Tripod<\/li>\n<li style=\"text-align: justify;\">Computer<\/li>\n<\/ul>\n<p>Packed all items and headed to nearest bridge to hunt for traffic.\u00a0View at angle at 300mm is in a range of degree. It was windy outside, so had to lower tripod to most stable position but shakiness was not eliminated completely.<\/p>\n<div id=\"attachment_885\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/map1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-885\" class=\"wp-image-885\" src=\"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/map1-1024x440.jpg\" alt=\"map1\" width=\"600\" height=\"258\" srcset=\"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/map1-1024x440.jpg 1024w, https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/map1-300x129.jpg 300w, https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/map1-768x330.jpg 768w, https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/map1.jpg 1642w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-885\" class=\"wp-caption-text\">Distance to target vehicles is about 460m, width of the road is ~7m.<\/p><\/div>\n<div id=\"attachment_886\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/IMG_9929_r.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-886\" class=\"wp-image-886\" src=\"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/IMG_9929_r-1024x625.jpg\" alt=\"IMG_9929_r\" width=\"600\" height=\"366\" srcset=\"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/IMG_9929_r-1024x625.jpg 1024w, https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/IMG_9929_r-300x183.jpg 300w, https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/IMG_9929_r-768x468.jpg 768w, https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/IMG_9929_r.jpg 1500w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-886\" class=\"wp-caption-text\">Field &#8220;workstation&#8221; setup.<\/p><\/div>\n<h3>Process data<\/h3>\n<p style=\"text-align: justify;\">I was using <a href=\"http:\/\/www.openalpr.com\/\">openALPR<\/a> &#8211; open for community users, but if needed it has commercial support and cloud based processing plans.<\/p>\n<p style=\"text-align: justify;\">License plate recognition is time consuming process. To process single frame it takes about 300ms with default settings. So this is was not realtime process (unless video is recorded at 3 or less frames per second). Therefore I will process recorded data with native alpr utility offline.<\/p>\n<pre>alpr.exe -c eu samples\\1.avi -n 2 -j &gt; results.json<\/pre>\n<h3>Overlay results on original video<\/h3>\n<p style=\"text-align: justify;\">Generated results.json file contains useful information like license place number with confidence level, region of detected plate, time stamp. I made quick and dirty python script (which is even not worth publishing) to overlay this information on top of original video file.<\/p>\n<p style=\"text-align: justify;\">Video shows all you need to know. Additional local plate training and filtering would help increase confidence level and recognition reliability.<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/www.youtube.com\/watch?v=sw2Rk0BqxwI\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-948\" src=\"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/out2-1.gif\" alt=\"out2\" width=\"600\" height=\"337\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">Is this a tool for you to use? It depends on your application. If your application is to screen traffic realtime like I just did &#8211; this tool is not quite suitable due to high cpu load. If you would like to make automated entry into your house or parking it should work pretty well. Just consider implementing extra light sources for night time operation. Computer vision works much better when it has good light source.<\/p>\n<p style=\"text-align: justify;\">On the other hand <a href=\"http:\/\/www.kurokesu.com\/shop\/cameras\/CAMUSB1\">camera<\/a> with lens like this can be used as a decent surveillance or spy tool by itself.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Automatic license\/number plate recognition (ALPR \/ ANPR) is a specialized kind of optical character (OCR). Target applications might include automatic car parking control, electronic toll collection, neighborhood watch, vehicle tracking and such. Concerns about these systems have centered on privacy fears of government tracking citizens&#8217; movements. Critics have described it as a form of mass [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":895,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[153],"tags":[123,125,127,126,124,14,29],"class_list":["post-879","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects","tag-alpr","tag-dslr-lens","tag-spy","tag-surveillance","tag-telephoto","tag-usb-camera","tag-zoom"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2016\/08\/IMG_9936_3.jpg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6VSmB-eb","_links":{"self":[{"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/posts\/879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/comments?post=879"}],"version-history":[{"count":26,"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/posts\/879\/revisions"}],"predecessor-version":[{"id":951,"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/posts\/879\/revisions\/951"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/media\/895"}],"wp:attachment":[{"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/media?parent=879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/categories?post=879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/tags?post=879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}