{"id":2915,"date":"2011-07-01T11:23:28","date_gmt":"2011-07-01T11:23:28","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2011\/07\/01\/video-sudoku\/"},"modified":"2017-02-04T14:29:51","modified_gmt":"2017-02-04T19:29:51","slug":"video-sudoku","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2011\/07\/01\/video-sudoku\/","title":{"rendered":"Video Sudoku"},"content":{"rendered":"<div class=\"content\">\n<p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/31739\">Michael<\/a>'s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/30088-video-sudoku-solver\">Video Sudoku Solver<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/66822\">Teja Muppirala<\/a>.<\/p>\n<p>About once a year, the Application Engineers here at MathWorks gather from across the globe to share ideas, strategies, best<br \/>\npractices, horror stories, and more. One of the highlights of this time is our demo showcase, where we show off our most<br \/>\nuseful, most sophisticated, or most jaw-droppingly neat demos. One of this year's standouts happens to be on the File Exchange.<\/p>\n<p>The algorithm that solves Teja's Sudoku demo is nothing new: Cleve Moler discussed the recursive technique back in 2009. What <i>is<\/i> new, though, is that Teja has wrapped some video acquisition and number recognition around this algorithm to create a simple<br \/>\nversion of augmented reality. Hold an unsolved Sudoku puzzle in front of your webcam, and this solver can recognize what it's<br \/>\nseeing and write the solution into the video feed.<\/p>\n<p>Teja defines each step in this process with concise functions that are demonstrated in a script acting on a static image.<br \/>\nBy the time we move to the live video analysis, we understand exactly what's happening. This makes the demo not just entertaining<br \/>\nbut educational as well!<\/p>\n<p>Teja has furthermore provided a <a href=\"https:\/\/www.mathworks.com\/videos\/solving-a-sudoku-puzzle-using-a-webcam-68773.html\">video<\/a> explaining how this algorithm works on our Image and Video Processing demo page.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/michael\/potw_videosudoku\/sudoku.gif\" alt=\"\" hspace=\"5\" vspace=\"5\" \/><\/p>\n<p><b>Comments<\/b><\/p>\n<p>Give it a try and let us know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2915#respond\">here<\/a> or leave a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/30088-video-sudoku-solver#comments\">comment<\/a> for Teja.<\/p>\n<p><script>\/\/ <![CDATA[\nfunction grabCode_a07f5174a5794af4a959e9b62ecfb109() {\n        \/\/ Remember the title so we can use it in the new page\n        title = document.title;\n\n        \/\/ Break up these strings so that their presence\n        \/\/ in the Javascript doesn't mess up the search for\n        \/\/ the MATLAB code.\n        t1='a07f5174a5794af4a959e9b62ecfb109 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\n        t2='##### ' + 'SOURCE END' + ' #####' + ' a07f5174a5794af4a959e9b62ecfb109';\n    \n        b=document.getElementsByTagName('body')[0];\n        i1=b.innerHTML.indexOf(t1)+t1.length;\n        i2=b.innerHTML.indexOf(t2);\n \n        code_string = b.innerHTML.substring(i1, i2);\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\n\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \n        \/\/ in the XML parser.\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\n        \/\/ doesn't go ahead and substitute the less-than character. \n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\n\n        author = 'Michael Weidman';\n        copyright = 'Copyright 2011 The MathWorks, Inc.';\n\n        w = window.open();\n        d = w.document;\n        d.write('\n\n\n\n<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\n\n\n\n\n\\n');\n      \n      d.title = title + ' (MATLAB code)';\n      d.close();\n      }\n\/\/ ]]><\/script><\/p>\n<p style=\"text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;\">\n<a><span style=\"font-size: x-small; font-style: italic;\">Get<br \/>\nthe MATLAB code<br \/>\n<noscript>(requires JavaScript)<\/noscript><\/span><\/a><\/p>\n<p>Published with MATLAB\u00ae 7.12<\/p>\n<\/div>\n<p><!--\na07f5174a5794af4a959e9b62ecfb109 ##### SOURCE BEGIN #####\n%%\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/31739 % Michael>'s pick this week is\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/30088-video-sudoku-solver Video Sudoku % Solver> by\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/66822 Teja % Muppirala>.\n%\n% About once a year, the Application Engineers here at MathWorks gather\n% from across the globe to share ideas, strategies, best practices, horror\n% stories, and more.  One of the highlights of this time is our demo\n% showcase, where we show off our most useful, most sophisticated, or most\n% jaw-droppingly neat demos.  One of this year's standouts happens to be on\n% the File Exchange.\n%\n% The algorithm that solves Teja's Sudoku demo is nothing new: Cleve\n% Moler\n% <https:\/\/www.mathworks.com\/company\/newsletters.htmlnews_notes\/2009\/clevescorner.html % discussed> the recursive technique back in 2009.  What _is_ new, though,\n% is that Teja has wrapped some video acquisition and number recognition\n% around this algorithm to create a simple version of augmented reality.\n% Hold an unsolved Sudoku puzzle in front of your webcam, and this solver\n% can recognize what it's seeing and write the solution into the video\n% feed.\n%\n% Teja defines each step in this process with concise functions that are\n% demonstrated in a script acting on a static image.  By the time we move\n% to the live video analysis, we understand exactly what's happening.\n% This makes the demo not just entertaining but educational as well!\n%\n% Teja has furthermore provided a\n% <https:\/\/www.mathworks.com\/products.htmldemos\/image\/sudoku\/index.html video>\n% explaining how this algorithm works on our Image and Video Processing\n% <https:\/\/www.mathworks.com\/solutions\/image-video-processing.htmldemos.html demo page>.\n%\n% <<sudoku.gif>>\n%\n% *Comments*\n%\n% Give it a try and let us know what you think\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2915#respond here> or leave a\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/30088-video-sudoku-solver#comments % comment> for Teja.\n\n##### SOURCE END ##### a07f5174a5794af4a959e9b62ecfb109\n--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\nMichael's pick this week is Video Sudoku Solver by Teja Muppirala.<br \/>\nAbout once a year, the Application Engineers here at MathWorks gather from across the globe to share ideas, strategies,... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2011\/07\/01\/video-sudoku\/\">read more >><\/a><\/p>\n","protected":false},"author":36,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2915"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/36"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2915"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2915\/revisions"}],"predecessor-version":[{"id":8383,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2915\/revisions\/8383"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}