woxtu / rust-opencv

Wrapper for OpenCV (WIP, not compilable now)
13 stars 5 forks source link

video to videoio + capture from camera function #1

Closed jonysy closed 9 years ago

jonysy commented 9 years ago

Renamed video to videoio, linking to opencv_videoio instead of opencv_video and added from_camera function. video is a separate module and here's the correct videoio header file

woxtu commented 9 years ago

Thank you for your PR.

I'll merge this, but I don't want to rename video to videoio (src/video.rs, not src/ffi/video.rs). So could you restore it?

jonysy commented 9 years ago

Sure. src/videoio is now src/video

woxtu commented 9 years ago

Thank you!

jonysy commented 9 years ago

No problem! :)

woxtu commented 9 years ago

@jxny

Hmm... I've just noticed my OpenCV (2.4.9, Mac OS X) doesn't have libopencv_videoio.dylib, so linking to opencv_videoio causes a linker error. Is it all right in your environment?

jonysy commented 9 years ago

@woxtu I'm using version 3.0

woxtu commented 9 years ago

I understand.

woxtu commented 9 years ago

Added some features for conditional link (33a0fb0f594dfe17efebb8ca1d8582957164ca7f). So you can use it as follows:

[dependencies.opencv]
...
features = ["opencv30"]
jonysy commented 9 years ago

@woxtu Perfect!