0){return}preRun();if(runDependencies>0)return;function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}noExitRuntime=true;run();if(typeof Module.FS==="undefined"&&typeof FS!=="undefined"){Module.FS=FS}Module["imread"]=function(imageSource){var img=null;if(typeof imageSource==="string"){img=document.getElementById(imageSource)}else{img=imageSource}var canvas=null;var ctx=null;if(img instanceof HTMLImageElement){canvas=document.createElement("canvas");canvas.width=img.width;canvas.height=img.height;ctx=canvas.getContext("2d");ctx.drawImage(img,0,0,img.width,img.height)}else if(img instanceof HTMLCanvasElement){canvas=img;ctx=canvas.getContext("2d")}else{throw new Error("Please input the valid canvas or img id.");return}var imgData=ctx.getImageData(0,0,canvas.width,canvas.height);return cv.matFromImageData(imgData)};Module["imshow"]=function(canvasSource,mat){var canvas=null;if(typeof canvasSource==="string"){canvas=document.getElementById(canvasSource)}else{canvas=canvasSource}if(!(canvas instanceof HTMLCanvasElement)){throw new Error("Please input the valid canvas element or id.");return}if(!(mat instanceof cv.Mat)){throw new Error("Please input the valid cv.Mat instance.");return}var img=new cv.Mat;var depth=mat.type()%8;var scale=depth<=cv.CV_8S?1:depth<=cv.CV_32S?1/256:255;var shift=depth===cv.CV_8S||depth===cv.CV_16S?128:0;mat.convertTo(img,cv.CV_8U,scale,shift);switch(img.type()){case cv.CV_8UC1:cv.cvtColor(img,img,cv.COLOR_GRAY2RGBA);break;case cv.CV_8UC3:cv.cvtColor(img,img,cv.COLOR_RGB2RGBA);break;case cv.CV_8UC4:break;default:throw new Error("Bad number of channels (Source image must have 1, 3 or 4 channels)");return}var imgData=new ImageData(new Uint8ClampedArray(img.data),img.cols,img.rows);var ctx=canvas.getContext("2d");ctx.clearRect(0,0,canvas.width,canvas.height);canvas.width=imgData.width;canvas.height=imgData.height;ctx.putImageData(imgData,0,0);img.delete()};Module["VideoCapture"]=function(videoSource){var video=null;if(typeof videoSource==="string"){video=document.getElementById(videoSource)}else{video=videoSource}if(!(video instanceof HTMLVideoElement)){throw new Error("Please input the valid video element or id.");return}var canvas=document.createElement("canvas");canvas.width=video.width;canvas.height=video.height;var ctx=canvas.getContext("2d");this.video=video;this.read=function(frame){if(!(frame instanceof cv.Mat)){throw new Error("Please input the valid cv.Mat instance.");return}if(frame.type()!==cv.CV_8UC4){throw new Error("Bad type of input mat: the type should be cv.CV_8UC4.");return}if(frame.cols!==video.width||frame.rows!==video.height){throw new Error("Bad size of input mat: the size should be same as the video.");return}ctx.drawImage(video,0,0,video.width,video.height);frame.data.set(ctx.getImageData(0,0,video.width,video.height).data)}};function Range(start,end){this.start=typeof start==="undefined"?0:start;this.end=typeof end==="undefined"?0:end}Module["Range"]=Range;function Point(x,y){this.x=typeof x==="undefined"?0:x;this.y=typeof y==="undefined"?0:y}Module["Point"]=Point;function Size(width,height){this.width=typeof width==="undefined"?0:width;this.height=typeof height==="undefined"?0:height}Module["Size"]=Size;function Rect(){switch(arguments.length){case 0:{this.x=0;this.y=0;this.width=0;this.height=0;break}case 1:{var rect=arguments[0];this.x=rect.x;this.y=rect.y;this.width=rect.width;this.height=rect.height;break}case 2:{var point=arguments[0];var size=arguments[1];this.x=point.x;this.y=point.y;this.width=size.width;this.height=size.height;break}case 4:{this.x=arguments[0];this.y=arguments[1];this.width=arguments[2];this.height=arguments[3];break}default:{throw new Error("Invalid arguments")}}}Module["Rect"]=Rect;function RotatedRect(){switch(arguments.length){case 0:{this.center={x:0,y:0};this.size={width:0,height:0};this.angle=0;break}case 3:{this.center=arguments[0];this.size=arguments[1];this.angle=arguments[2];break}default:{throw new Error("Invalid arguments")}}}RotatedRect.points=function(obj){return Module.rotatedRectPoints(obj)};RotatedRect.boundingRect=function(obj){return Module.rotatedRectBoundingRect(obj)};RotatedRect.boundingRect2f=function(obj){return Module.rotatedRectBoundingRect2f(obj)};Module["RotatedRect"]=RotatedRect;function Scalar(v0,v1,v2,v3){this.push(typeof v0==="undefined"?0:v0);this.push(typeof v1==="undefined"?0:v1);this.push(typeof v2==="undefined"?0:v2);this.push(typeof v3==="undefined"?0:v3)}Scalar.prototype=new Array;Scalar.all=function(v){return new Scalar(v,v,v,v)};Module["Scalar"]=Scalar;function MinMaxLoc(){switch(arguments.length){case 0:{this.minVal=0;this.maxVal=0;this.minLoc=new Point;this.maxLoc=new Point;break}case 4:{this.minVal=arguments[0];this.maxVal=arguments[1];this.minLoc=arguments[2];this.maxLoc=arguments[3];break}default:{throw new Error("Invalid arguments")}}}Module["MinMaxLoc"]=MinMaxLoc;function Circle(){switch(arguments.length){case 0:{this.center=new Point;this.radius=0;break}case 2:{this.center=arguments[0];this.radius=arguments[1];break}default:{throw new Error("Invalid arguments")}}}Module["Circle"]=Circle;function TermCriteria(){switch(arguments.length){case 0:{this.type=0;this.maxCount=0;this.epsilon=0;break}case 3:{this.type=arguments[0];this.maxCount=arguments[1];this.epsilon=arguments[2];break}default:{throw new Error("Invalid arguments")}}}Module["TermCriteria"]=TermCriteria;Module["matFromArray"]=function(rows,cols,type,array){var mat=new cv.Mat(rows,cols,type);switch(type){case cv.CV_8U:case cv.CV_8UC1:case cv.CV_8UC2:case cv.CV_8UC3:case cv.CV_8UC4:{mat.data.set(array);break}case cv.CV_8S:case cv.CV_8SC1:case cv.CV_8SC2:case cv.CV_8SC3:case cv.CV_8SC4:{mat.data8S.set(array);break}case cv.CV_16U:case cv.CV_16UC1:case cv.CV_16UC2:case cv.CV_16UC3:case cv.CV_16UC4:{mat.data16U.set(array);break}case cv.CV_16S:case cv.CV_16SC1:case cv.CV_16SC2:case cv.CV_16SC3:case cv.CV_16SC4:{mat.data16S.set(array);break}case cv.CV_32S:case cv.CV_32SC1:case cv.CV_32SC2:case cv.CV_32SC3:case cv.CV_32SC4:{mat.data32S.set(array);break}case cv.CV_32F:case cv.CV_32FC1:case cv.CV_32FC2:case cv.CV_32FC3:case cv.CV_32FC4:{mat.data32F.set(array);break}case cv.CV_64F:case cv.CV_64FC1:case cv.CV_64FC2:case cv.CV_64FC3:case cv.CV_64FC4:{mat.data64F.set(array);break}default:{throw new Error("Type is unsupported")}}return mat};Module["matFromImageData"]=function(imageData){var mat=new cv.Mat(imageData.height,imageData.width,cv.CV_8UC4);mat.data.set(imageData.data);return mat};
+
+
+ return cv
+}
+);
+})();
+if (typeof exports === 'object' && typeof module === 'object')
+ module.exports = cv;
+ else if (typeof define === 'function' && define['amd'])
+ define([], function() { return cv; });
+ else if (typeof exports === 'object')
+ exports["cv"] = cv;
+
+ if (typeof Module === 'undefined')
+ Module = {};
+ return cv(Module);
+}));
+
\ No newline at end of file
diff --git a/photo_mem_cv.html b/photo_mem_cv.html
new file mode 100644
index 0000000..32a66f8
--- /dev/null
+++ b/photo_mem_cv.html
@@ -0,0 +1,544 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OpenCV.js chargement en cours...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+