Skip to content

Instantly share code, notes, and snippets.

@barakplasma
Last active December 1, 2022 20:45
Show Gist options
  • Save barakplasma/80e0a4079ce7d60a1ead9d53c884c884 to your computer and use it in GitHub Desktop.
Save barakplasma/80e0a4079ce7d60a1ead9d53c884c884 to your computer and use it in GitHub Desktop.
opencv.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h2>Hello OpenCV.js</h2>
<div>
<div class="inputoutput">
<img id="imageSrc" src="barclays-bank_card.jpg" alt="">
</div>
<div class="inputoutput">
<canvas id="canvasOutput" ></canvas>
<div class="caption">canvasOutput</div>
</div>
</div>
<script async src="https://docs.opencv.org/3.4.0/opencv.js" onload="cvread();" type="text/javascript"></script>
<script src="script.js"></script>
</body>
</html>
This file has been truncated, but you can view the full file.
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(function () {
return (root.cv = factory());
});
} else if (typeof module === 'object' && module.exports) {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory();
} else if (typeof window === 'object') {
// Browser globals
root.cv = factory();
} else if (typeof importScripts === 'function') {
// Web worker
root.cv = factory;
} else {
// Other shells, e.g. d8
root.cv = factory();
}
}(this, function () {
var cv = (function() {
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
return (
function(cv) {
cv = cv || {};
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment