Coder Social home page Coder Social logo

dcigor / onvif Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 2.0 6.32 MB

Face detection for MacOS using ONVIF IP cameras

Home Page: https://dcomplex.com

License: GNU Lesser General Public License v3.0

C 0.41% Objective-C 58.04% Swift 29.12% C++ 12.44%
onvif ffmpeg face-detection macos objective-c c-plus-plus swift video-processing

onvif's Introduction

This is an Open Source project contributed to ONVIF Open Source Challenge: https://onvif-spotlight.bemyapp.com

Use the project under the LGPL license to contact me for alternatives.

The project shows how to:

  1. create a MacOS app

  2. use Swift, Objective-C and C++ in the same project

  3. use FFMPEG for video streaming and decoding

  4. use ONVIFCamera and SOAPEngine open source libraries for ONVIF communication

  5. detect Faces using new Apple Vision Framework

  6. Use Model-View-Controller architecture.


Project folder structure: /app/ - the built application. Run in on your Mac

/FaceDetector/... - The meat of the project: View, Control, Parser and VideoSource classes

/ONVIFCamera/ - 3rd party libraries ONVIFCamera and SOAPEngine


For convenience, the project includes ONVIFCamera and SOAPEngine open source libraries. You might want to get the latest versions for your setup instead.

Feel free to use your FFMPEG build and adjust project include/lib folders or follow the following procedure to setup FFMPEG in the expected location for building the project. Run following commands in Terminal window:

#requirements

xcode-select --install

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew install yasm

brew upgrade yasm

#donwloading

mkdir ~/dev

mkdir ~/dev/depends

mkdir ~/dev/depends/v5

mkdir ~/dev/3rd

rm -R ~/dev/3rd/ffmpeg

pushd ~/dev/3rd

curl http://ffmpeg.org/releases/ffmpeg-4.0.tar.bz2 > ffmpeg.tar.bz2

gunzip -c ffmpeg.tar.bz2 | tar xopf -

rm ~/dev/3rd/ffmpeg.tar.bz2

mv ~/dev/3rd/ffmpeg-* ~/dev/3rd/ffmpeg

popd

#build

rm -R ~/dev/depends/v5/ffmpeg

pushd ~/dev/3rd/ffmpeg

export MACOSX_DEPLOYMENT_TARGET=10.9

./configure --prefix=$HOME/dev/depends/v5/ffmpeg --disable-programs --disable-doc --disable-avdevice --disable-audiotoolbox --disable-demuxer=matroska --disable-muxer=matroska --disable-securetransport --disable-xlib --disable-zlib --disable-iconv --disable-bzlib --disable-schannel --disable-decoders --enable-runtime-cpudetect --enable-decoder=jpeg2000 --enable-decoder=jpegls --enable-decoder=mjpeg --enable-decoder=mjpegb --enable-decoder=h264 --disable-encoders --enable-encoder=jpeg2000 --enable-encoder=jpegls --enable-encoder=mjpeg --extra-cflags="-mmacosx-version-min=10.9"

make install

popd

onvif's People

Contributors

dcigor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

onvif's Issues

FaceDetector uses Swift 3.x, which is not supported in Xcode 11.3.1

When I try to open the project in Xcode 11.3.1, I get:

The target “FaceDetector” contains source code developed with Swift 3.x. This version of Xcode does not support building or migrating Swift 3.x targets.

Use Xcode 10.1 to migrate the code to Swift 4

This is not that surprising because the project is a few years old, but I though I'd submit a bug so that others would know before trying the installation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.