ssyuzev / zigcv

zig bindings for OpenCV4

Home Page:https://ryoppippi.github.io/zigcv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Announcement

This repository is no longer maintained. I beleve the future of zig is bright, but I don't have enough time to maintain this repository. Feel free to fork it and continue development!

ZIGCV

ci

The ZIGCV library provides Zig language bindings for the OpenCV 4 computer vision library.

The ZIGCV library supports the head/master of zig and OpenCV (v4.6.0) on Linux, macOS, and Windows.

Caution

Still under development, so the zig APIs will be dynamically changed.

You can use const c_api = @import("zigcv").c_api; to call c bindings directly.
This C-API is currently fixed.

How to execute

At first, install openCV 4.6. (maybe you can read how to install from here).
Then:

git clone --recursive https://github.com/ryoppippi/zigcv
zig build

Docker

You can also download and run the Docker image that has the latest opencv build compiled by zig cc compiler.

Demos

you can build some demos. For example:

zig build examples
./zig-out/bin/face_detection 0
face detection

You can see the full demo list by zig build --help.

Technical restrictions

Due to zig being a relatively new language it does not have full C ABI support at the moment.
For use that mainly means we can't use any functions that return structs that are less than 16 bytes large on x86, and passing structs to any functions may cause memory error on arm.

License

MIT

Author

Ryotaro "Justin" Kimura (a.k.a. ryoppippi)

About

zig bindings for OpenCV4

https://ryoppippi.github.io/zigcv

License:MIT License


Languages

Language:Zig 99.6%Language:Dockerfile 0.4%