All Projects → ConnorRigby → elixir-opencv

ConnorRigby / elixir-opencv

Licence: other
OpenCv NIF Bindings for Erlang/Elixir.

Programming Languages

C++
36643 projects - #6 most used programming language
elixir
2628 projects
Makefile
30231 projects

Projects that are alternatives of or similar to elixir-opencv

kiwi
Kiwi turns your Pimoroni Keybow into a fully customizable poor-man's Elgato Stream Deck!
Stars: ✭ 40 (+33.33%)
Mutual labels:  nerves, nerves-project
nerves thermal camera
Thermal camera imaging with Elixir, Nerves, Raspberry Pi, and a MLX90640 sensor
Stars: ✭ 28 (-6.67%)
Mutual labels:  nerves
mdns lite
A simple, no frills mDNS implementation in Elixir
Stars: ✭ 29 (-3.33%)
Mutual labels:  nerves
mix tasks upload hotswap
Deploy local code changes to the remote node(s) in a hot-code-swapping manner
Stars: ✭ 31 (+3.33%)
Mutual labels:  nerves
inky
A library for managing Inky e-ink displays from Elixir.
Stars: ✭ 60 (+100%)
Mutual labels:  nerves
Nerves
Craft and deploy bulletproof embedded software in Elixir
Stars: ✭ 1,778 (+5826.67%)
Mutual labels:  nerves
pigpiox
An Elixir wrapper around pigpiod for the Raspberry PI
Stars: ✭ 29 (-3.33%)
Mutual labels:  nerves
nerves livebook
Develop on embedded devices with Livebook and Nerves
Stars: ✭ 135 (+350%)
Mutual labels:  nerves
scenic asteroids
A toy Asteroids clone written in Elixir with the Scenic UI library
Stars: ✭ 42 (+40%)
Mutual labels:  nerves
nerves init gadget
Simple initialization for devices running Nerves
Stars: ✭ 53 (+76.67%)
Mutual labels:  nerves
shoehorn
Handle OTP application failures without restarting the Erlang VM
Stars: ✭ 36 (+20%)
Mutual labels:  nerves
grovepi
Use the GrovePi in Elixir
Stars: ✭ 46 (+53.33%)
Mutual labels:  nerves
hap
A HomeKit Accessory Protocol (HAP) Implementation for Elixir
Stars: ✭ 50 (+66.67%)
Mutual labels:  nerves
nerves system ev3
Base Nerves system configuration for the Lego EV3
Stars: ✭ 23 (-23.33%)
Mutual labels:  nerves
elixir bme680
An Elixir library to interface with the BME680 (and BME280) environmental sensor
Stars: ✭ 19 (-36.67%)
Mutual labels:  nerves

OpenCv

OpenCv NIF Bindings for Erlang/Elixir.

Current status

Currently almost nothing works. Opening a video device and capturing jpeg frames works currently.

Usage

Capturing a jpeg encoded frame frame can be done by:

Interactive Elixir (1.7.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> {:ok, conn} = OpenCv.new()
{:ok, #Reference<0.1511271170.1095630852.139975>}
iex(2)> {:ok, cap} = OpenCv.VideoCapture.open(conn, '/dev/video0')
{:ok, #Reference<0.1511271170.1095630848.138924>}
iex(3)> true = OpenCv.VideoCapture.is_opened(conn, cap)
true
iex(4)> {:ok, frame} = OpenCv.VideoCapture.read(conn, cap)
{:ok, #Reference<0.1511271170.1095630848.138925>}
iex(5)> jpg = OpenCv.imencode(conn, frame, '.jpg', [])
<<255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 255,
  219, 0, 67, 0, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 4, 3, 2, 2, 2, 2,
  5, 4, 4, 3, ...>>
iex(6)> File.write("img.jpg", jpg)
:ok

Building

This currently supports opencv3 and opencv4. It may support opencv2, but I have not tested. Nerves builds are currently supported given you have a system that has opencv installed. this system has opencv 3 installed. I've only tested build on linux, and it is likely that paths for the Makefile may be wrong.

Installation

To pull in this package directly from GitHub, amend your list of dependencies in mix.exs as follows:

def deps do
  [
    {:open_cv, github: "ConnorRigby/elixir-opencv", branch: "master"}
  ]
end

If available in Hex, the package can be installed by adding open_cv to your list of dependencies in mix.exs:

def deps do
  [
    {:open_cv, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/open_cv.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].