Get started with marvinj CDN
LGPL-3.0 licensed
MarvinJ is a library for creating accessible and interactive SVG graphics.
Tags:- javascript
- image-processing
- javascript-library
- computer-vision
Stable version
Copied!
How to start using marvinj CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with marvinj CDN - cdnhub.io</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marvin/1.1.1/marvin.min.js"></script>
<style>
#output {
width: 300px;
height: 300px;
border: 1px solid black;
}
</style>
</head>
<body>
<img id="input" src="https://example.com/image.jpg" alt="Input Image">
<div id="output"></div>
<button onclick="detectText()">Detect Text</button>
<script>
async function detectText() {
const image = new MarvinJS.Image('input');
await image.load();
const result = await image.process('text');
document.getElementById('output').innerHTML = result.text;
}
</script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!