Skip to content

fabien-chevalley/MMALSharp

 
 

Repository files navigation

MMALSharp

Build status

MMALSharp is an unofficial C# API for the Raspberry Pi camera. Under the hood, MMALSharp makes use of the native MMAL interface designed by Broadcom.

The project is in early stages of development, however progress is good, please see the status of each component below:

  • Camera
  • Camera Info
  • Renderers (Null sink & Video)
  • Resizer
  • Splitter
  • Image Encoder
  • Image Decoder
  • Video Encoder
  • Video Decoder

** Please clone from Master branch if building from source. Dev branch not guaranteed to be stable. **

MMALSharp supports the following runtimes:

  1. Mono 4.x
  2. .NET Standard 2.0

Documentation

For full installation instructions for Mono 4.x and .NET Core, including configuration and examples - please visit the Wiki site.

Status

So far, the library has been tested on the following Raspberry Pi devices:

  • Raspberry Pi 1 Model B (512mb)
  • Raspberry Pi Zero
  • Raspberry Pi 2 Model B

Both the SUNNY and Sony IMX219 camera modules are working as expected.

Tested image 'still' features:

  • Image width/height
  • Image encoding
  • Brightness
  • Contrast
  • Saturation
  • Sharpness
  • Shutter speed
  • ISO
  • Exposure compensation
  • Exposure mode
  • Exposure metering mode
  • Raspistill supported image effects
  • Rotation
  • Flips
  • Annotate
  • Dynamic range compression
  • Stats Pass
  • Colour effects
  • Crop
  • Auto white balance mode/gains
  • EXIF tags
  • Raw capture

Notes & Known issues

When using more resource intensive encoders such as MMAL_ENCODING_BMP and the Sony IMX219 module, I've found it necessary to increase the memory split to around 200mb or otherwise you'll receive an ENOSPC error due to insufficient resources.

License

MIT license

Copyright (c) 2017 Ian Auty

Raspberry Pi is a trademark of the Raspberry Pi Foundation

Special thanks

Dave Jones @waveform80 - your Python header conversions have saved me numerous hours so far. Thank you very much.

About

Unofficial C# API for the Raspberry Pi camera. Supports Mono 4.x and .NET Standard 2.0

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%