C1 | C2 | C3 | C4 | |
---|---|---|---|---|
CV_8U | 0 | 8 | 16 | 24 |
CV_8S | 1 | 9 | 17 | 25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 0; | |
font-family: monospace; | |
background: #444; | |
} | |
canvas { | |
display: block; | |
width: 100vw; | |
height: 100vh; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
width = 256; | |
height = 256; | |
let dst = new Uint8Array(Module.HEAPU8.buffer, dst_ptr, width * height); | |
canvasResultsLenna.width = width; | |
canvasResultsLenna.height = height; | |
var imgData = ctxResultsLenna.createImageData(width, height); | |
for (var i = 0; i < dst.length; i++) { | |
imgData.data[i * 4] = dst[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <emscripten.h> | |
#include <iostream> | |
#include <string> | |
#include <GLES2/gl2.h> | |
#include <EGL/egl.h> | |
extern "C" | |
{ | |
#include "emscripten/html5.h" | |
} |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters