OpenCV Bindings using NativeCall
Other C++
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples 'use OpenCV;' re-exports all OpenCV modules Jan 18, 2016
lib Less debugging Feb 6, 2017
logotype Add Travis CI support along with the modified OpenCV logo Jan 16, 2016
src No need for bloated LibraryMake. It is not needed here Jan 18, 2016
t Modernize test environment and use Test::META Feb 6, 2017
.gitignore Fix .gitignore Feb 6, 2017
.travis.yml Remove homebrew conflicting pip-installed numpy (macOS) Feb 6, 2017 Fix zef installation Feb 6, 2017
META6.json Use SPDX identifier in license field of META6.json Apr 28, 2017 Reorganize docs Feb 6, 2017


Build Status Build status

This provides a simple Perl 6 object-oriented NativeCall wrapper for the OpenCV library.


use v6;
use OpenCV;

# Read the image from the disk
my $image = imread( "sample.png" );

# Show the image in a window
namedWindow( "Sample", 1 );
imshow( "Sample", $image );

# Wait for a key press to exit

For more examples, please see the examples folder.

OpenCV Installation

Please follow the instructions below based on your platform:

Linux (Debian)

  • To install OpenCV 2.4 development libraries, please run:
$ sudo apt-get install libopencv-dev g++


  • To install OpenCV 2.4 development libraries, please run:
$ brew update
$ brew tap homebrew/science
$ brew install opencv


A precompiled 64-bit windows DLL binary is already provided so it should work on 64-bit windows operating systems.


To install it using zef (a module management tool bundled with Rakudo Star):

$ zef install OpenCV


  • To run tests:
$ prove -ve "perl6 -Ilib"
  • To run all tests including author tests (Please make sure Test::Meta is installed):
$ zef install Test::META
$ AUTHOR_TESTING=1 prove -ve "perl6 -Ilib"

Development Notes

If you need to change the C++ to C library wrapper without doing a zef install ., please run:

$ zef build .


Ahmad M. Zawawi, azawawi on #perl6,


MIT License