ANN: VideoCaptureWrap.jl

Hi there, I’m happy to announce the release of VideoCaptureWrap.jl. :tada:

Hope it helps for those who like to utilize Julia, CxxWrap.jl, OpenCV, Image Processing etc… :smiley:


Running application locally

$ make cli # display image on terminal using ImageInTerminal.jl
$ make gui # display image using OpenCV's API

Running application inside of Docker container (Linux users only)

$ bash

FYI there’s a Google Summer of Code project which has made excellent progress in a generic OpenCV wrapper, see I think there will be a more expository update on the current state fairly soon.


I’ve updated this package. I’ve created JLL package named OpenCVQt_jll.jl which provide shared library of OpenCV libopencv_xxx (compiled with Qt for Linux). Then, I utilize/call this JLL package from this package. It enable us to use/install VideoCaptureWrap.jl easily even on Windows machine.


Regarding to tim.holy’s comment

I could confirm works on my Ubuntu 18.04 machine.

   _       _ _(_)_     |  Documentation:
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.1 (2020-08-25)
 _/ |\__'_|_|_|\__'_|  |  Official release
|__/                   |

julia> using OpenCV

julia> cap = OpenCV.VideoCapture(Int32(0))
OpenCV.VideoCaptureAllocated(Ptr{Nothing} @0x00000000030e4c90)

(true, UInt8[0x0a 0x0a … 0x0d 0x0c; 0x01 0x01 … 0x1a 0x19; 0x00 0x00 … 0x00 0x00]

UInt8[0x0a 0x0a … 0x12 0x0f; 0x03 0x03 … 0x19 0x15; 0x00 0x00 … 0x00 0x00]

UInt8[0x06 0x06 … 0x10 0x11; 0x04 0x04 … 0x12 0x13; 0x00 0x00 … 0x00 0x00]


UInt8[0x06 0x06 … 0x06 0x06; 0x00 0x00 … 0x01 0x01; 0x00 0x00 … 0x00 0x00]

UInt8[0x06 0x06 … 0x06 0x06; 0x00 0x00 … 0x00 0x00; 0x00 0x00 … 0x00 0x00]

UInt8[0x08 0x08 … 0x06 0x06; 0x00 0x00 … 0x00 0x00; 0x00 0x00 … 0x00 0x00])

(OpenCV) pkg> 

Just to clarify, your OpenCVQt_jll.jl exploits that work, right? If so, this is an awesome contribution, and IMO the big remaining TODO to make that work really pay off. If so, have you thought about registering this package?

I went through this package briefly and this does not seem to use the wrappers I had built but instead repeats the work. There was a discussion some time ago about creating jll for the wrappers but I haven’t been able to devote much time to it because this semester is a bit heavier with the coursework. I have an approximate plan laid out in the discussion over here.


OpenCVQt_jll.jl is not related to

It is just generated by and will be used in [here].(

Thank you for your advice. :pray:

I’ve confirmed we could try OpenCV.jl genreated by opencv_contrib/modules/julia with my gist.

I was wondering if we can build OpenCV.jl using BinaryBuilder.jl with this script (but still WIP), if so it would be great.

1 Like

I could confirm VideoCaptureWrap.jl works on Raspberry Pi 4 (it also should run RPI3).

Just run make gui is OK

For those who like to use OpenCV.jl, the following gist might be helpful.


This might be help