{"id":1398,"date":"2012-10-25T10:33:33","date_gmt":"2012-10-25T09:33:33","guid":{"rendered":"http:\/\/www.multimedialab.be\/blog\/?p=1398"},"modified":"2013-10-29T19:19:35","modified_gmt":"2013-10-29T18:19:35","slug":"incruster-le-stream-dune-camera-de-surveillance","status":"publish","type":"post","link":"http:\/\/www.multimedialab.be\/blog\/?p=1398","title":{"rendered":"Camera de surveillance"},"content":{"rendered":"<p>R\u00c3\u00a9cup\u00c3\u00a9rer le flux d&rsquo;une camera de surveillance dans Processing.<\/p>\n<p><img decoding=\"async\" id=\"image2555\" src=\"http:\/\/www.multimedialab.be\/blog\/wp-content\/uploads\/2012\/10\/p5_cam_index.jpg\" alt=\"Incruster le stream d'une camera de surveillance\" \/><\/p>\n<p><!--more--><\/p>\n<p>Cette op\u00c3\u00a9ration s&rsquo;inspire du projet nocinema.org examin\u00c3\u00a9 au cours.<\/p>\n<p><strong>nocinema<\/strong><\/p>\n<p>nocinema.org est une application en ligne g\u00c3\u00a9n\u00c3\u00a9rant un documentaire\/\u00ef\u00ac\u0081ction en ligne sans d\u00c3\u00a9but ni \u00ef\u00ac\u0081n, sans acteurs ni sc\u00c3\u00a9nario, except\u00c3\u00a9 les histoires que nous pouvons nous construire en suivant le \u00ef\u00ac\u0081l des images et des sons stream\u00c3\u00a9s. <\/p>\n<p>nocinema.org est un syst\u00c3\u00a8me automatis\u00c3\u00a9 construit sur des processus de s\u00c3\u00a9lection de streaming webcams en direct autour du globe, captant des \u00ab\u00a0plans\u00a0\u00bb dans diff\u00c3\u00a9rents lieux, panoramis\u00c3\u00a9s et temporis\u00c3\u00a9s par le montage g\u00c3\u00a9n\u00c3\u00a9r\u00c3\u00a9 en ligne. <\/p>\n<p>Les sons, organis\u00c3\u00a9s \u00c3\u00a0 chaque fois selon des mixages calcul\u00c3\u00a9s en direct, proviennent d\u00e2\u20ac\u2122une base de donn\u00c3\u00a9es sonores continuellement aliment\u00c3\u00a9e et mise \u00c3\u00a0 jour par une \u00c3\u00a9quipe de complices. Ainsi la \u00ab\u00a0bande-son\u00a0\u00bb ind\u00c3\u00a9pendante combin\u00c3\u00a9e au d\u00c3\u00a9roul\u00c3\u00a9 des images zoom\u00c3\u00a9es et panoramis\u00c3\u00a9es g\u00c3\u00a9n\u00c3\u00a8re ce nocinema. <\/p>\n<p>nocinema.org est un projet d\u00c3\u00a9velopp\u00c3\u00a9 par J\u00c3\u00a9r\u00c3\u00b4me Joy.<\/p>\n<p>Liens vers nocinema :<br \/>\n<a href=\"http:\/\/nocinema.org\/\" target=\"_blank\">http:\/\/nocinema.org\/<\/a><br \/>\n<a href=\"http:\/\/nujus.net\/~nocinema\/01\/\" target=\"_blank\">http:\/\/nujus.net\/~nocinema\/01\/<\/a><\/p>\n<p><strong>R\u00c3\u00a9cup\u00c3\u00a9rer le flux d&rsquo;une camera de surveillance dans Processing.<\/strong><\/p>\n<p>CaptureMJPEG est une librairie Processing permettant d&rsquo;incruster un stream Motion JPEG.<br \/>\nLien : <a href=\"https:\/\/bitbucket.org\/nolith\/capturemjpeg\/wiki\/Home\" target=\"_blank\">https:\/\/bitbucket.org\/nolith\/capturemjpeg\/wiki\/Home<\/a><\/p>\n<blockquote><p>\n<strong>Installer une librairie.<\/strong><br \/>\nT\u00c3\u00a9l\u00c3\u00a9chargez l&rsquo;archive et d\u00c3\u00a9compressez le fichier zip. Placez son contenu dans le r\u00c3\u00a9pertoire libraries de votre r\u00c3\u00a9pertoire de sketch. Vous pouvez ouvrir ce dossier en utilisant le menu Sketch > Show sketch folder. Le dossier <em>libraries<\/em> se trouve dans le m\u00c3\u00aame dossier que vos sketchs. Vous devez y placer le r\u00c3\u00a9pertoire extrait de l&rsquo;archive t\u00c3\u00a9l\u00c3\u00a9charg\u00c3\u00a9e ayant le nom de la librairie. Si ce dossier <em>libraries<\/em> n&rsquo;existe pas d\u00c3\u00a9j\u00c3\u00a0, cr\u00c3\u00a9ez le tout simplement. Une fois ces op\u00c3\u00a9rations effectu\u00c3\u00a9es, quittez l&rsquo;application Processing et lancez-la \u00c3\u00a0 nouveau.<br \/>\nPlus d&rsquo;infos \u00c3\u00a0 ce sujet : <a href=\"http:\/\/fr.flossmanuals.net\/processing\/ch041_les-librairies-externes\" target=\"_blank\">http:\/\/fr.flossmanuals.net\/processing\/ch041_les-librairies-externes<\/a><\/p>\n<p><strong>\u00c3\u20ac propos de Processing.<\/strong><\/p>\n<p><a href=\"http:\/\/fr.flossmanuals.net\/processing\/index\" target=\"_blank\">http:\/\/fr.flossmanuals.net\/processing\/index<\/a><br \/>\n<a href=\"http:\/\/fr.wikipedia.org\/wiki\/Processing\" target=\"_blank\">http:\/\/fr.wikipedia.org\/wiki\/Processing<\/a><br \/>\nLe site Processing : <a href=\"http:\/\/processing.org\/\" target=\"_blank\">http:\/\/processing.org\/<\/a><br \/>\nT\u00c3\u00a9l\u00c3\u00a9charger Processing : <a href=\"http:\/\/processing.org\/download\/\" target=\"_blank\">http:\/\/processing.org\/download\/<\/a>\n<\/p><\/blockquote>\n<p>Le code-test ci-dessous utilise un flux de camera poss\u00c3\u00a9dant cette adresse :<br \/>\n<a href=\"http:\/\/147.134.38.233\/axis-cgi\/mjpg\/video.cgi\" target=\"_blank\">http:\/\/147.134.38.233\/axis-cgi\/mjpg\/video.cgi<\/a><\/p>\n<p><img decoding=\"async\" id=\"image2556\" src=\"http:\/\/www.multimedialab.be\/blog\/wp-content\/uploads\/2012\/10\/p5_cam_01.jpg\" alt=\"Incruster le stream d'une camera de surveillance\" \/><\/p>\n<p>Le code :<\/p>\n<pre><code>\r\n\r\nimport it.lilik.capturemjpeg.*;\r\n\r\nprivate CaptureMJPEG capture;\r\nprivate PImage next_img = null;\r\n\r\nvoid setup() {\r\n  size(500, 400);\r\n  background(0);\r\n  capture = new CaptureMJPEG (this,\r\n                              \"http:\/\/147.134.38.233\/axis-cgi\/mjpg\/video.cgi\");\r\n  \/\/ or this if you don't need auth\r\n  \/\/ capture = new CaptureMJPEG(this, \"http:\/\/mynetworkcamera.foo\/image?speed=20\");\r\n\r\n  capture.startCapture();\r\n  frameRate(20);\r\n}\r\n\r\nvoid draw() {\r\n  if (next_img != null) {\r\n    image(next_img, 0, 0);\r\n  }\r\n}\r\n\r\nvoid captureMJPEGEvent(PImage img) {\r\n  next_img = img;\r\n\r\n}\r\n\r\n<\/code><\/pre>\n<p><strong>Lien CaptureMJPEG : <\/strong><br \/>\n<a href=\"https:\/\/bitbucket.org\/nolith\/capturemjpeg\/wiki\/Home\" target=\"_blank\">https:\/\/bitbucket.org\/nolith\/capturemjpeg\/wiki\/Home<\/a><\/p>\n<p><strong>D&rsquo;autres flux :<\/strong><br \/>\n<a href=\"http:\/\/147.134.38.233\/axis-cgi\/mjpg\/video.cgi\" target=\"_blank\">http:\/\/147.134.38.233\/axis-cgi\/mjpg\/video.cgi<\/a><br \/>\n<a href=\"http:\/\/202.67.8.62:80\/axis-cgi\/mjpg\/video.cgi\" target=\"_blank\">http:\/\/202.67.8.62:80\/axis-cgi\/mjpg\/video.cgi<\/a><br \/>\n<a href=\"http:\/\/134.29.208.43:80\/axis-cgi\/mjpg\/video.cgi\" target=\"_blank\">http:\/\/134.29.208.43:80\/axis-cgi\/mjpg\/video.cgi<\/a><br \/>\n<a href=\"http:\/\/webcam.erieyachtclub.org:80\/axis-cgi\/mjpg\/video.cgi\" target=\"_blank\">http:\/\/webcam.erieyachtclub.org:80\/axis-cgi\/mjpg\/video.cgi<\/a><br \/>\n<a href=\"http:\/\/217.29.93.100:80\/axis-cgi\/mjpg\/video.cgi\" target=\"_blank\">http:\/\/217.29.93.100:80\/axis-cgi\/mjpg\/video.cgi<\/a><br \/>\n<a href=\"http:\/\/209.221.217.7:80\/axis-cgi\/mjpg\/video.cgi\" target=\"_blank\">http:\/\/209.221.217.7:80\/axis-cgi\/mjpg\/video.cgi<\/a><br \/>\n<a href=\"http:\/\/rachleff.org:80\/axis-cgi\/mjpg\/video.cgi\" target=\"_blank\">http:\/\/rachleff.org:80\/axis-cgi\/mjpg\/video.cgi<\/a><br \/>\n<a href=\"http:\/\/134.29.208.43\/axis-cgi\/mjpg\/video.cgi\" target=\"_blank\">http:\/\/134.29.208.43\/axis-cgi\/mjpg\/video.cgi<\/a><\/p>\n<p><strong>Public IP cameras : <\/strong><br \/>\n<a href=\"http:\/\/www.webcamxp.com\/publicipcams.aspx\" target=\"_blank\">http:\/\/www.webcamxp.com\/publicipcams.aspx<\/a><\/p>\n<p>Le logiciel libre Processing :<\/p>\n<p><em>Ce code annule un ancien test :<br \/>\n<a href=\"http:\/\/www.multimedialab.be\/blog\/?p=416\" target=\"_blank\">http:\/\/www.multimedialab.be\/blog\/?p=416<\/a><\/em><\/p>\n<p>Mots-cl\u00c3\u00a9s : surveillance, camera, webcam, processing,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>R\u00c3\u00a9cup\u00c3\u00a9rer le flux d&rsquo;une camera de surveillance dans Processing.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55,3,14,34],"tags":[],"class_list":["post-1398","post","type-post","status-publish","format-standard","hentry","category-erg-arts-numeriques","category-code","category-processing","category-surveillance"],"_links":{"self":[{"href":"http:\/\/www.multimedialab.be\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.multimedialab.be\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.multimedialab.be\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.multimedialab.be\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.multimedialab.be\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1398"}],"version-history":[{"count":0,"href":"http:\/\/www.multimedialab.be\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1398\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.multimedialab.be\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.multimedialab.be\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1398"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.multimedialab.be\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}