Public | Automated Build

Last pushed: 2 years ago
Short Description
Opencv socket server in docker who emit faces position
Full Description

opencv-server-socket-docker

Install

docker pull jermorin/opencv-server-socket

Usage

docker run jermorin/opencv-server-socket -p 0.0.0.0:3000:3000

Client

import socket from 'socket.io-client';

const serverUrl = 'http://localhost:3000';

const socketOptions = {
  transports: ['websocket'],
  'force new connection': true
};

const imageUrl = {url: 'https://pixabay.com/static/uploads/photo/2016/01/09/08/38/india-1129953_960_720.jpg'};
const base64 = {base64: 'kekekdi888'};
const path = {path: '../server/path'};

const client = socket.connect(serverUrl, socketOptions);

client.on('connect', () => {
  console.log('connection to server');
  client.emit('image', imageUrl);
  client.on('faces', faces => console.log(faces));
});

License

MIT © Jérémy Morin

Docker Pull Command
Owner
jermorin

Comments (0)