Comments (10)
from react-native-openalpr.
I released master as 1.2.0 https://github.com/RobertSasak/react-native-openalpr/releases/tag/1.2.0
It contains also Take picture ios PR #49
from react-native-openalpr.
I have updated the example https://github.com/RobertSasak/react-native-openalpr/blob/master/example/App.js
from react-native-openalpr.
You're in luck. I just recently submitted a PR for including an image capture()
feature in the Android version. If you clone the openalpr-with-image-capture
branch of this repo, you should have access to the capture functionality which you are seeking. You would be able to do something like this with your onPlateRecognized()
:
onPlateRecognized({ plate, confidence }) {
if (confidence > 0.9) {
if (this.license !== plate) { // Only take a picture if the plate recognized is different from the recent one
this.license = plate;
this.takePicture();
}
}
}
}
takePicture() {
this.cameraRef.capture()
.then((data) => ....)
.catch((e) => ...)
}
I will look into adding this feature into iOS when the time comes. In the meantime, you're welcome to get started on a new branch! Just refer to react-native-camera and you'll be tip top!
from react-native-openalpr.
I added that functionality for iOS in this PR
Here is how to use it:
this. cameraRef.takePicture().then(
uri => {
console.log(`uri for the image ${uri}`;
},
error => {
console.log(`Error : ${error}`;
}
);
from react-native-openalpr.
Hi @franck-nadeau,
I get CameraManager.takePicture is not a function error and when i log the ref i actually can't see the function.
from react-native-openalpr.
Hello.
A few things,
- first you need to be on master because there hasn't been a release for about 2 years.
"react-native-openalpr": "RobertSasak/react-native-openalpr#master",
- second, this will only work on iOS.
- third you should use the Camera.takePicture() helper function that I added.
Let me know if this still does not work for you.
from react-native-openalpr.
@franck-nadeau Thanks for the quick answer,
- This is on my package.json : "react-native-openalpr": "RobertSasak/react-native-openalpr#master",
- I am working on ios.
After calling the function from the module not the ref, i get;
TypeError: _reactNativeOpenalpr.default.takePicture is not a function
.
Also when i call it with Camera.prototype.takePicture, i get;
TypeError: CameraManager.takePicture is not a function
from react-native-openalpr.
I am not sure why that is. It is working fine off my own repo (and my PR was merged in this one too). Anyway, you could try using it as I am:
"react-native-openalpr": "franck-nadeau/react-native-openalpr#master",
Here is my code for your info.
onPlateRecognized({ plate, confidence }) {
if (confidence > 90) {
// We got a good match, lets take a screenshot of it.
this.refs.camera.takePicture().then(
uri => {
},
error => {
}
);
}
}
render() {
...
<Camera
ref="camera"
....
from react-native-openalpr.
Can someone update the example in the repo with this method too ? I can't manage to make it work , i would appreciate a working example. Thank you
from react-native-openalpr.
Related Issues (20)
- Doesit support UAE vehicle plate number? HOT 1
- _reactNativeOpenalpr.takePicture in android on press of take picture? HOT 5
- TypeError: null is not an object (evaluating 'ALPRCameraManager.Aspect') HOT 2
- Try yo test example error with npm start HOT 2
- app crashes on android device HOT 1
- fix libstdc not found without modifying podfile (eas) HOT 3
- not support for react native 0.64.0 HOT 3
- I met some Errors on Example Project HOT 8
- How do I use to detect license plate from static image? HOT 1
- react-native-camera is deprecated. HOT 1
- Configuration with name 'compile' not found. HOT 1
- Can I get result with dash? HOT 1
- ^ 'FlipperKit/FlipperClient.h' file not found HOT 1
- It can be used with expo-project? HOT 1
- React-native camera not working HOT 7
- Support scanning multiple countries at once
- Possible to return the country of the license plate recognised? HOT 1
- Not recognizing plates on IOS
- Project with path ':openalpr' could not be found in project ':react-native-openalpr'. HOT 1
- Cannot read property 'Aspect' of null HOT 3
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 react-native-openalpr.