mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
videocapture read now uses err, im convention
This commit is contained in:
parent
a347ab682e
commit
865962c845
@ -185,6 +185,11 @@ doesn't work for you please get in touch.
|
||||
|
||||
## Changelog
|
||||
|
||||
#### 0.0.13
|
||||
|
||||
- V Early support for face recognition - API is _likely_ to change. Have fun!
|
||||
- *API Change*: VideoCapture.read now calls callback(err, im) instead of callback(im)
|
||||
|
||||
#### 0.0.12
|
||||
- Matrix clone()
|
||||
- NamedWindow Support
|
||||
|
||||
@ -5,7 +5,7 @@ var camera = new cv.VideoCapture(0);
|
||||
|
||||
setInterval(function() {
|
||||
|
||||
camera.read(function(im) {
|
||||
camera.read(function(err, im) {
|
||||
|
||||
im.save('/tmp/cam.png');
|
||||
});
|
||||
|
||||
@ -116,11 +116,12 @@ void AfterAsyncRead(uv_work_t *req) {
|
||||
mat = baton->im->mat;
|
||||
|
||||
img->mat = mat;
|
||||
Local<Value> argv[1];
|
||||
Local<Value> argv[2];
|
||||
|
||||
argv[0] = im_to_return;
|
||||
argv[0] = Local<Value>::New(Null());
|
||||
argv[1] = im_to_return;
|
||||
|
||||
baton->cb->Call(Context::GetCurrent()->Global(), 1, argv);
|
||||
baton->cb->Call(Context::GetCurrent()->Global(), 2, argv);
|
||||
baton->cb.Dispose();
|
||||
|
||||
delete baton;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user