Skip to content

Commit b3002df

Browse files
committed
Updated Python demos documentation
1 parent 7465ed1 commit b3002df

File tree

12 files changed

+41
-35
lines changed

12 files changed

+41
-35
lines changed

build.sh

100755100644
File mode changed.

examples/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Pigo demos running in a Python environment
22

3-
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.
3+
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.
44

55
## Requirements
6-
- OpenCV 2
7-
- Python2
6+
- OpenCV2
7+
- Python
88

99
## Notice
1010

examples/blinkdet/README.MD

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
## Blink detection demo
22

3-
This is an example of how to use Pigo for blink detection.
4-
53
### Requirements
64
* OpenCV2
7-
* Python2
5+
* Python
86

97
### Usage
108
```bash
11-
$ python2 blinkdet.py
9+
$ python blinkdet.py
1210
```
1311

1412
### Keys:

examples/facedet/README.MD

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
## Face detection demo
22

3-
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.
4-
53
### Requirements
64
* OpenCV2
7-
* Python2
5+
* Python
86

97
### Usage
108
```bash
119
# detect faces
12-
$ python2 demo.py
10+
$ python demo.py
1311
# blur out the detect faces
14-
$ python2 faceblur.py
12+
$ python faceblur.py
1513
```

examples/facedet/pigo.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#line 1 "cgo-builtin-export-prolog"
77

8-
#include <stddef.h> /* for ptrdiff_t below */
8+
#include <stddef.h>
99

1010
#ifndef GO_CGO_EXPORT_PROLOGUE_H
1111
#define GO_CGO_EXPORT_PROLOGUE_H
@@ -40,11 +40,17 @@ typedef long long GoInt64;
4040
typedef unsigned long long GoUint64;
4141
typedef GoInt64 GoInt;
4242
typedef GoUint64 GoUint;
43-
typedef __SIZE_TYPE__ GoUintptr;
43+
typedef size_t GoUintptr;
4444
typedef float GoFloat32;
4545
typedef double GoFloat64;
46+
#ifdef _MSC_VER
47+
#include <complex.h>
48+
typedef _Fcomplex GoComplex64;
49+
typedef _Dcomplex GoComplex128;
50+
#else
4651
typedef float _Complex GoComplex64;
4752
typedef double _Complex GoComplex128;
53+
#endif
4854

4955
/*
5056
static assertion to make sure the file is being used on architecture

examples/facial_landmark/README.MD

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
## Facial landmark points detection demo
22

3-
Python demo for live webcam facial landmark points detection.
4-
53
### Requirements
64
* OpenCV2
7-
* Python2
5+
* Python
86

97
### Usage
108
```bash
11-
$ python2 flploc.py
9+
$ python flploc.py
1210
```
1311

1412
### Keys:

examples/facial_landmark/flploc.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#line 1 "cgo-builtin-export-prolog"
77

8-
#include <stddef.h> /* for ptrdiff_t below */
8+
#include <stddef.h>
99

1010
#ifndef GO_CGO_EXPORT_PROLOGUE_H
1111
#define GO_CGO_EXPORT_PROLOGUE_H
@@ -40,11 +40,17 @@ typedef long long GoInt64;
4040
typedef unsigned long long GoUint64;
4141
typedef GoInt64 GoInt;
4242
typedef GoUint64 GoUint;
43-
typedef __SIZE_TYPE__ GoUintptr;
43+
typedef size_t GoUintptr;
4444
typedef float GoFloat32;
4545
typedef double GoFloat64;
46+
#ifdef _MSC_VER
47+
#include <complex.h>
48+
typedef _Fcomplex GoComplex64;
49+
typedef _Dcomplex GoComplex128;
50+
#else
4651
typedef float _Complex GoComplex64;
4752
typedef double _Complex GoComplex128;
53+
#endif
4854

4955
/*
5056
static assertion to make sure the file is being used on architecture

examples/masquerade/README.MD

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
## Image overlay demo
2-
3-
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.
1+
## Image overlay demo
42

53
### Requirements
64
* OpenCV2
7-
* Python2
5+
* Python
86

97
### Usage
108
```bash
11-
$ python2 puploc.py
9+
$ python puploc.py
1210
```
1311

1412
### Keys:

examples/puploc/README.MD

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
## Pupils/eyes localization demo
22

3-
Python demo for live webcam pupils/eyes localization.
4-
53
### Requirements
64
* OpenCV2
7-
* Python2
5+
* Python
86

97
### Usage
108
```bash
11-
$ python2 puploc.py
9+
$ python puploc.py
1210
```
1311

1412
### Keys:

examples/talk_detector/README.MD

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
## Talk detection demo
22

3-
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.
4-
53
### Requirements
64
* OpenCV2
7-
* Python2
5+
* Python
86

97
### Usage
108
```bash
11-
$ python2 talkdet.py
9+
$ python talkdet.py
1210
```
1311

1412
### Keys:

0 commit comments

Comments
 (0)