diff --git a/build.sh b/build.sh old mode 100755 new mode 100644 diff --git a/examples/README.md b/examples/README.md index 6a0d202..da96769 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,10 +1,10 @@ ## Pigo demos running in a Python environment -This directory contains a few real time demos running as shared library (**.so**) in a Python environment. The face detection is done on the Go side but the face detection results are transfered as an array to the Python program. It was intended this way because the Go ecosystem is still missing a cross platform and operating system agnostic webcam library. This dependency issue is partially resolved with the Webassembly (WASM) port of the library. +This directory contains a few real time face detection demos running as shared library (**.so**) in a Python environment. The face detection is done on the Go side, but the detected results are transfered as 1D array over the Python program. It was intended this way because the Go ecosystem is still missing a cross platform and operating system agnostic webcam library. This dependency issue is partially resolved with the Webassembly (WASM) port of the library. ## Requirements -- OpenCV 2 -- Python2 +- OpenCV2 +- Python ## Notice diff --git a/examples/blinkdet/README.MD b/examples/blinkdet/README.MD index c5002d8..88964aa 100644 --- a/examples/blinkdet/README.MD +++ b/examples/blinkdet/README.MD @@ -1,14 +1,12 @@ ## Blink detection demo -This is an example of how to use Pigo for blink detection. - ### Requirements * OpenCV2 -* Python2 +* Python ### Usage ```bash -$ python2 blinkdet.py +$ python blinkdet.py ``` ### Keys: diff --git a/examples/facedet/README.MD b/examples/facedet/README.MD index 768ad87..93b3062 100644 --- a/examples/facedet/README.MD +++ b/examples/facedet/README.MD @@ -1,15 +1,13 @@ ## Face detection demo -This is an example of how to use Pigo for face detection as a Python application. There are two examples: one which simply detects the webcam faces and another one which blur out the detected faces. - ### Requirements * OpenCV2 -* Python2 +* Python ### Usage ```bash # detect faces -$ python2 demo.py +$ python demo.py # blur out the detect faces -$ python2 faceblur.py +$ python faceblur.py ``` diff --git a/examples/facedet/pigo.h b/examples/facedet/pigo.h index 4ffbc8a..9655988 100644 --- a/examples/facedet/pigo.h +++ b/examples/facedet/pigo.h @@ -5,7 +5,7 @@ #line 1 "cgo-builtin-export-prolog" -#include /* for ptrdiff_t below */ +#include #ifndef GO_CGO_EXPORT_PROLOGUE_H #define GO_CGO_EXPORT_PROLOGUE_H @@ -40,11 +40,17 @@ typedef long long GoInt64; typedef unsigned long long GoUint64; typedef GoInt64 GoInt; typedef GoUint64 GoUint; -typedef __SIZE_TYPE__ GoUintptr; +typedef size_t GoUintptr; typedef float GoFloat32; typedef double GoFloat64; +#ifdef _MSC_VER +#include +typedef _Fcomplex GoComplex64; +typedef _Dcomplex GoComplex128; +#else typedef float _Complex GoComplex64; typedef double _Complex GoComplex128; +#endif /* static assertion to make sure the file is being used on architecture diff --git a/examples/facial_landmark/README.MD b/examples/facial_landmark/README.MD index 9907e4a..ea29489 100644 --- a/examples/facial_landmark/README.MD +++ b/examples/facial_landmark/README.MD @@ -1,14 +1,12 @@ ## Facial landmark points detection demo -Python demo for live webcam facial landmark points detection. - ### Requirements * OpenCV2 -* Python2 +* Python ### Usage ```bash -$ python2 flploc.py +$ python flploc.py ``` ### Keys: diff --git a/examples/facial_landmark/flploc.h b/examples/facial_landmark/flploc.h index 4ffbc8a..9655988 100644 --- a/examples/facial_landmark/flploc.h +++ b/examples/facial_landmark/flploc.h @@ -5,7 +5,7 @@ #line 1 "cgo-builtin-export-prolog" -#include /* for ptrdiff_t below */ +#include #ifndef GO_CGO_EXPORT_PROLOGUE_H #define GO_CGO_EXPORT_PROLOGUE_H @@ -40,11 +40,17 @@ typedef long long GoInt64; typedef unsigned long long GoUint64; typedef GoInt64 GoInt; typedef GoUint64 GoUint; -typedef __SIZE_TYPE__ GoUintptr; +typedef size_t GoUintptr; typedef float GoFloat32; typedef double GoFloat64; +#ifdef _MSC_VER +#include +typedef _Fcomplex GoComplex64; +typedef _Dcomplex GoComplex128; +#else typedef float _Complex GoComplex64; typedef double _Complex GoComplex128; +#endif /* static assertion to make sure the file is being used on architecture diff --git a/examples/masquerade/README.MD b/examples/masquerade/README.MD index 965d606..2056978 100644 --- a/examples/masquerade/README.MD +++ b/examples/masquerade/README.MD @@ -1,14 +1,12 @@ -## Image overlay demo - -In this demo we detect a person's eyes and place an overlay mask like sunglasses which can be replaced by pressing the keys documented below. +## Image overlay demo ### Requirements * OpenCV2 -* Python2 +* Python ### Usage ```bash -$ python2 puploc.py +$ python puploc.py ``` ### Keys: diff --git a/examples/puploc/README.MD b/examples/puploc/README.MD index f38432c..79e7636 100644 --- a/examples/puploc/README.MD +++ b/examples/puploc/README.MD @@ -1,14 +1,12 @@ ## Pupils/eyes localization demo -Python demo for live webcam pupils/eyes localization. - ### Requirements * OpenCV2 -* Python2 +* Python ### Usage ```bash -$ python2 puploc.py +$ python puploc.py ``` ### Keys: diff --git a/examples/talk_detector/README.MD b/examples/talk_detector/README.MD index f807781..f2c70e7 100644 --- a/examples/talk_detector/README.MD +++ b/examples/talk_detector/README.MD @@ -1,14 +1,12 @@ ## Talk detection demo -This demo demonstrates how Pigo's facial landmark points detection capabilities can be used for detecting if a person is talking or not. This method can be used in a variety of fields, like checking if a person is communicating or not. - ### Requirements * OpenCV2 -* Python2 +* Python ### Usage ```bash -$ python2 talkdet.py +$ python talkdet.py ``` ### Keys: diff --git a/examples/talk_detector/talkdet.h b/examples/talk_detector/talkdet.h index 4ffbc8a..9655988 100644 --- a/examples/talk_detector/talkdet.h +++ b/examples/talk_detector/talkdet.h @@ -5,7 +5,7 @@ #line 1 "cgo-builtin-export-prolog" -#include /* for ptrdiff_t below */ +#include #ifndef GO_CGO_EXPORT_PROLOGUE_H #define GO_CGO_EXPORT_PROLOGUE_H @@ -40,11 +40,17 @@ typedef long long GoInt64; typedef unsigned long long GoUint64; typedef GoInt64 GoInt; typedef GoUint64 GoUint; -typedef __SIZE_TYPE__ GoUintptr; +typedef size_t GoUintptr; typedef float GoFloat32; typedef double GoFloat64; +#ifdef _MSC_VER +#include +typedef _Fcomplex GoComplex64; +typedef _Dcomplex GoComplex128; +#else typedef float _Complex GoComplex64; typedef double _Complex GoComplex128; +#endif /* static assertion to make sure the file is being used on architecture diff --git a/examples/web/capture.py b/examples/web/capture.py old mode 100755 new mode 100644