{"id":2331,"date":"2008-10-03T07:00:32","date_gmt":"2008-10-03T12:00:32","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2008\/10\/03\/intruder-alert\/"},"modified":"2017-07-20T11:25:12","modified_gmt":"2017-07-20T15:25:12","slug":"intruder-alert","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2008\/10\/03\/intruder-alert\/","title":{"rendered":"Intruder Alert!"},"content":{"rendered":"<div class=\"content\">\n<p>Jiro's pick this week is <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=15272&amp;objectType=file (link no longer works)\">Intruder Detection<\/a> by David Leffingwell, a fellow MathWorker.<\/p>\n<p>I really like examples that involve hardware because they are flashy and you can physically see things happening. The MathWorks<br \/>\nprovides several toolboxes for connecting to various types of hardware, ranging from data and image acquisition boards to<br \/>\nstand alone instruments.<\/p>\n<p>What I like about this nifty demo is that it combines both <a href=\"https:\/\/www.mathworks.com\/products\/daq\/\">Data Acquisition Toolbox<\/a> and <a href=\"https:\/\/www.mathworks.com\/products\/imaq\/\">Image Acquisition Toolbox<\/a> to do motion and noise detection. Once the program detects some motion or noise, it starts recording video and audio for<br \/>\na specified number of seconds. It's also very simple to try out, because it only requires an off-the-shelf webcam (I'm using<br \/>\na Logitech USB webcam) and a soundcard which is already installed on my laptop.<\/p>\n<p>Take a look at this short recording I made. I tested this out at a hotel in Kalamazoo, MI (I was there for a seminar).<\/p>\n<p><embed src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_intruderalert\/intruderAlert.mp4\" height=\"480\" width=\"640\"><\/embed><\/p>\n<p><b>Comments?<\/b><\/p>\n<p>Anybody doing hardware interfaces? Tell me about it <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2331#respond\">here<\/a>. I would be interested in hearing about simple examples that you can do with a webcam or a sound card (so that I can try<br \/>\nit out!). And please post them on the File Exchange!<\/p>\n<p><script>\/\/ <![CDATA[\nfunction grabCode_eb8952b0c69a4957b24eb4922d7816d2() {\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='eb8952b0c69a4957b24eb4922d7816d2 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\n        t2='##### ' + 'SOURCE END' + ' #####' + ' eb8952b0c69a4957b24eb4922d7816d2';\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 = 'Jiro Doke';\n        copyright = 'Copyright 2008 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.6<\/p>\n<\/div>\n<p><!--\neb8952b0c69a4957b24eb4922d7816d2 ##### SOURCE BEGIN #####\n%%\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadAuthor.do?objectId=1094142&objectType=author % Jiro>'s pick this week is <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=15272&objectType=file % Intruder Detection> by <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadAuthor.do?objectType=author&objectId=1097526 % David Leffingwell>, a fellow MathWorker.\n%\n% I really like examples that involve hardware because they are flashy and\n% you can physically see things happening. The MathWorks provides several\n% toolboxes for connecting to various types of hardware, ranging from data\n% and image acquisition boards to stand alone instruments.\n%\n% What I like about this nifty demo is that it combines both\n% <https:\/\/www.mathworks.com\/products\/daq\/ Data Acquisition Toolbox> and\n% <https:\/\/www.mathworks.com\/products\/imaq\/ Image Acquisition Toolbox> to do\n% motion and noise detection. Once the program detects some motion or\n% noise, it starts recording video and audio for a specified number of\n% seconds. It's also very simple to try out, because it only requires an\n% off-the-shelf webcam (I'm using a Logitech USB webcam) and a soundcard\n% which is already installed on my laptop.\n%\n% Take a look at this short recording I made. I tested this out at a hotel\n% in Kalamazoo, MI (I was there for a seminar).\n%\n%\n%\n% *Comments?*\n%\n% Anybody doing hardware interfaces? Tell me about it\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2331#respond here>. I would be\n% interested in hearing about simple examples that you can do with a webcam\n% or a sound card (so that I can try it out!). And please post them on the\n% File Exchange!\n##### SOURCE END ##### eb8952b0c69a4957b24eb4922d7816d2\n--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\nJiro's pick this week is Intruder Detection by David Leffingwell, a fellow MathWorker.<br \/>\nI really like examples that involve hardware because they are flashy and you can physically see things... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2008\/10\/03\/intruder-alert\/\">read more >><\/a><\/p>\n","protected":false},"author":35,"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\/2331"}],"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\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2331"}],"version-history":[{"count":4,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2331\/revisions"}],"predecessor-version":[{"id":8764,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2331\/revisions\/8764"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}