All Projects → hihozhou → Php Opencv

hihozhou / Php Opencv

Licence: apache-2.0
PHP extensions for OpenCV

Projects that are alternatives of or similar to Php Opencv

Awesome Face Detection
Compare with various detectors - s3fd, dlib, ocv, ocv-dnn, mtcnn-pytorch, face_recognition
Stars: ✭ 106 (-79.77%)
Mutual labels:  opencv, face-detection, face-recognition
Human Detection And Tracking
Human-detection-and-Tracking
Stars: ✭ 753 (+43.7%)
Mutual labels:  opencv, face-detection, face-recognition
Opencv Face Filters
Snapchat-like Face Filters in OpenCV
Stars: ✭ 51 (-90.27%)
Mutual labels:  opencv, face-detection, face-recognition
Robovision
AI and machine leaning-based computer vision for a robot
Stars: ✭ 126 (-75.95%)
Mutual labels:  opencv, face-detection, face-recognition
Libfaceid
libfaceid is a research framework for prototyping of face recognition solutions. It seamlessly integrates multiple detection, recognition and liveness models w/ speech synthesis and speech recognition.
Stars: ✭ 354 (-32.44%)
Mutual labels:  opencv, face-detection, face-recognition
Opencv Course
Learn OpenCV in 4 Hours - Code used in my Python and OpenCV course on freeCodeCamp.
Stars: ✭ 185 (-64.69%)
Mutual labels:  opencv, face-detection, face-recognition
Attendance Using Face
Face-recognition using Siamese network
Stars: ✭ 174 (-66.79%)
Mutual labels:  opencv, face-detection, face-recognition
Marvel
Marvel - Face Recognition With Android & OpenCV
Stars: ✭ 199 (-62.02%)
Mutual labels:  opencv, face-detection, face-recognition
Facecropper
✂️ Crop faces, inside of your image, with iOS 11 Vision api.
Stars: ✭ 479 (-8.59%)
Mutual labels:  face-detection, face-recognition
Imagedetect
✂️ Detect and crop faces, barcodes and texts in image with iOS 11 Vision api.
Stars: ✭ 286 (-45.42%)
Mutual labels:  face-detection, face-recognition
Workattendancesystem
一个基于opencv、dilb的员工人脸识别考勤系统
Stars: ✭ 299 (-42.94%)
Mutual labels:  face-detection, face-recognition
Arcface Caffe
insightface-caffe
Stars: ✭ 275 (-47.52%)
Mutual labels:  face-detection, face-recognition
Vggface2 Pytorch
PyTorch Face Recognizer based on 'VGGFace2: A dataset for recognising faces across pose and age'
Stars: ✭ 271 (-48.28%)
Mutual labels:  face-detection, face-recognition
Deepvideoanalytics
A distributed visual search and visual data analytics platform.
Stars: ✭ 2,973 (+467.37%)
Mutual labels:  face-detection, face-recognition
Get Me Through
A Free, Offline, Real-Time, Open-source web-app to assist organisers of any event in allowing only authorised/invited people using Face-Recognition Technology or QR Code.
Stars: ✭ 255 (-51.34%)
Mutual labels:  face-detection, face-recognition
Face Tracking With Anime Characters
Hello! I have made a Python project where YURI from the game doki doki literature club accesses the webcam and stares directly into the players soul. Hope you enjoy!
Stars: ✭ 320 (-38.93%)
Mutual labels:  opencv, face-detection
Facemoji
😆 A voice chatbot that can imitate your expression. OpenCV+Dlib+Live2D+Moments Recorder+Turing Robot+Iflytek IAT+Iflytek TTS
Stars: ✭ 320 (-38.93%)
Mutual labels:  opencv, face-detection
realtime-facereccpp
Real time face recognition with tracking (mtcnn detection, kcf tracker, arcface loss)
Stars: ✭ 32 (-93.89%)
Mutual labels:  face-recognition, face-detection
Pigo
Fast face detection, pupil/eyes localization and facial landmark points detection library in pure Go.
Stars: ✭ 3,542 (+575.95%)
Mutual labels:  opencv, face-detection
Autocrop
😌 Automatically detects and crops faces from batches of pictures.
Stars: ✭ 320 (-38.93%)
Mutual labels:  opencv, face-detection

PHP-OPENCV - PHP extension for Opencv

Build Status Minimum PHP Version

⚠️⚠️ NO LONGER IN ACTIVE DEVELOPMENT | 项目不再维护 ⚠️⚠️ Due to personal scheduling reasons, the project has been suspended for maintenance and it is hoped that the project code will provide useful value.

Document

Requirements

  • OpenCV 4.0.0+
  • PHP7.0+

Installation

Use OpenCV docker(commendatory)

If you don't know how to install OpenCV, you can use my OpenCV docker image(only 300M, including opencv_contrib).

docker pull hihozhou/php-opencv

Compile and install php-opencv extension

git clone https://github.com/hihozhou/php-opencv.git
cd php-opencv
phpize
./configure --with-php-config=your php-config path
make
make install

Configure

php.ini

extension="your opencv.so path"

Example

LBPH face recognition

use CV\Face\LBPHFaceRecognizer;
//use ...;

$src = imread('facePic.jpg');
$gray = cvtColor($src, COLOR_BGR2GRAY);
equalizeHist($gray, $gray);
$faceRecognizer = LBPHFaceRecognizer::create();
/* ... */ //get $images and $labels for train
$faceRecognizer->train($images, $labels);//How to get $image and $labels, see the document
/* ... */ //Face detection using CascadeClassifier
$faceLabel = $faceRecognizer->predict($gray);
/* ... */ //draw face and name

result:

predict

Image Processing

//Obama.php
use function CV\{ imread, imshow, waitkey, namedWindow};

$im = imread('Obama.png');//load image
namedWindow('This is Obama id card',WINDOW_FULLSCREEN);//create window
imshow('This is Obama id card',$im);//show image on window

waitkey(0);

result:

Obama

Load image by gray

$gray = imread('Obama.png',IMREAD_GRAYSCALE);
//or
use  function CV\{ cvtColor};
$gray = cvtColor($im, COLOR_BGR2GRAY);

Obama_gray

You can draw something.
e.g:

use CV\{Mat,Scalar, Point, Size};
use function CV\{ellipse, imwrite, waitKey};
use const CV\{CV_8UC3};

$windowWidth = 600;
$thickness = 2;
$lineType = 8;
$matScalar = new Scalar(0,0,0);
$mat = new Mat($windowWidth, $windowWidth, CV_8UC3, $matScalar);
$point=new Point($windowWidth/2, $windowWidth/2);
$size=new Size($windowWidth/4, $windowWidth/16);
$scalar=new Scalar(255, 129, 0);
for($i = 0; $i <= 360; $i += 45){
    ellipse($mat,$point,$size,$i,0,360,$scalar,$thickness,$lineType);
}
imwrite('./tests/ellipse.png',$mat);

result:

ellipse

Features

  • [x] 1.core
  • [x] 2.imgproc
  • [x] 3.highgui
  • [ ] 4.contrib
  • [ ] 5.features2d
  • [ ] 6.flann
  • [ ] 7.gpu
  • [ ] 8.calib3d
  • [ ] 9.legacy
  • [x] 10.ml
  • [ ] 11.nonfree
  • [x] 12.objdetect
  • [ ] 13.ocl
  • [ ] 14.photo
  • [ ] 15.stitching
  • [ ] 16.superres
  • [ ] 17.ts
  • [x] 18.video
  • [ ] 19.Videostab

Contributors

This project exists thanks to all the people who contribute. [Contribute].

感谢

感谢韩天峰老大的指导,
感谢韩天峰老大的指导, 感谢盘古大叔php7-internal项目以及平常的指导, 感谢木桶技术升级交流群黑夜路人技术群、以及PHP内核交流的群友对技术的帮助。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].