Comments (5)
Have you tried the example on the README? It's here
from jscanify.
Yes, sorry, I should have said it ... I tried it but it seems is broken since I see my webcam, and two divs (canvas and result) with just a zoomed in part of the camera (the top left part).
Sorry for the drawing, but something like this:
In mobile it's not working at all.
That's because I asked, maybe if you have a "whole" working HTML to check.
I have this:
<html>
<body>
<script src="src/opencv.js" async></script>
<script src="src/jscanify.js"></script>
<video id="video"></video>
<canvas id="canvas"></canvas>
<canvas id="result"></canvas>
<script>
const scanner = new jscanify();
const canvasCtx = canvas.getContext("2d");
const resultCtx = result.getContext("2d");
navigator.mediaDevices.getUserMedia({ video: true }).then((stream) => {
video.srcObject = stream;
video.onloadedmetadata = () => {
video.play();
setInterval(() => {
canvasCtx.drawImage(video, 0, 0);
const resultCanvas = scanner.highlightPaper(canvas);
resultCtx.drawImage(resultCanvas, 0, 0);
}, 10);
};
});
</script>
</body>
</html>
from jscanify.
Yes, I did it that way forcing the width/height (setting them by javascript). No problem in that.
Thank you !
from jscanify.
It's because the canvas width and height. By default is always 300 x 150
from jscanify.
Interesting. I haven't taken a look at the specifics yet, but have you tried setting the dimensions of result
to that of resultCanvas
?
from jscanify.
Related Issues (20)
- Documentation implies findPaperContour takes HTML image input HOT 1
- There is no support for Typescript :( HOT 3
- WebRTC is very complicated for photos HOT 5
- Any way to use this library in Angular? HOT 3
- [ Demo Vison ] Update to work with User Input image HOT 1
- IOS Compatibility HOT 27
- Improvements to the recognition algorithm
- Poor Image Quality HOT 7
- Fails to install with Python 3.12 HOT 1
- extractPaper not working with cluttered background HOT 2
- Highlighted image does not show HOT 12
- Size Ratio for exported canvas. HOT 5
- cv.approxPolyDP maxContour. HOT 2
- Error importing jscanify library in React application HOT 2
- Passing a number "-1" from JS side to C/C++ side to an argument of type "unsigned long" HOT 1
- Calling getCornerPoints throws an Uncaught (in promise) 23302432 HOT 2
- React js import support? HOT 3
- Doesn't work in web (React) HOT 3
- Does not work inside vue.js or nuxt project HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jscanify.