├── .gitignore
├── LICENSE.md
├── README.md
├── client
├── index.html
├── receiver.js
├── sender.js
└── styles.css
└── server
├── lib
├── config
│ └── server.js
└── routes
│ ├── index.js
│ └── socket.js
├── package.json
└── server.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Esther Jun Kim
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # face-detection-browser-opencv
2 |
3 | Real-time face detection using WebRTC, OpenCV, Node.js, and WebSockets.
4 |
5 | Similar to [face-detection-node-opencv](https://github.com/claudiopetrini/face-detection-node-opencv) but this time:
6 |
7 | - camera acquisition is made with WebRTC on the browser
8 | - the image is sent to the server via web socket for processing
9 | - the processed image is rendered on the client
10 |
11 | ## Requirements
12 |
13 | * [Node.js](http://nodejs.org/)
14 | * [OpenCV 2.4.9 - 2.4.11](http://opencv.org/)
15 | * A webcam, e.g. laptop-integrated webcam, USB webcam
16 |
17 | ## Installing Node.js packages
18 |
19 | * Navigate to the `server` directory
20 | * To install the packages: `npm install`
21 |
22 | ## Running the demo
23 |
24 | * Make sure you are still in the `server` directory
25 | * To run the server: `node server.js`
26 | * To run the demo locally, open a browser and go to `localhost:8080`
27 |
28 | The app should be up and running!
29 |
--------------------------------------------------------------------------------
/client/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |