Skip to content

Realtime face recogntion pipline realized in Labview. Using PCA algorithm to extract the eigenvector of each face's image.

License

Notifications You must be signed in to change notification settings

LokiXun/Realtime_face_recogntion_PCA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Realtime Face Recognition in Labview

author LokiXun [email protected]

Labview_FacialRecognition_result_Kobe.jpg

FaceDetection Blog reference

usage

  • Program Entry

    FaceRecognition_realtime_detection_usingPCA.vi
    

Database Preparation

  • prepare person facial photos prepare each person's face image in the directory .\Face_Database\Name by person's name.

  • generate faces' eigenvectors of each photo run .\FaceDB_Generate_Matlab\FaceRecognitionPCA_generate_DB_eigenvector.m to generate Face's eigenvector, and saved in mat file .\FaceDB_Generate_Matlab\FaceDetect_DB_23_2_9.mat

setup

  • Labview setup
  • Matlab version > 2018
  • setup Labview's OpenCV Face Detection Module

Q&A

  1. vision opencv库 dll文件找不到

现在 PC 上的 Labview 是 32 bit 的!!

  1. 使用MATLAB®脚本节点时遇到错误1047

  2. https://forums.ni.com/t5/kl3m3n-s-blog/Real-time-face-and-eye-detection-in-LabView-using-OpenCV-Harr/ba-p/3486952?profile.language=zh-CN

  3. Unable to run properly

    • have matlab interactive error, like unable to use matlab script in Labview close both the Labview and matlab. Restart the matlab first, and start labview after matlab under fully running!

      Note: the restart sequence matters!

    • could not detect the face region 🔥 库文件运行异常》运行安装目录下的例程 E:\Labview2017\examples\Vision\NIVision OpenCV Utilities\OpenCV Face Detection.vi

Details

  • PCA feature extraction

    1. Transform to gray scale image
    2. resize to [200, 200] & reshape to [200x200, 1] put as columns vectors into matrix T
    3. compute mean column vector in matrix T & each vectors minus mean vectors to get centric matrix A
  • rgb2gray

    Change from RGB space to YUV or YCbCr color space and use Y value as gray-scale image.

    rgb2gray 通过计算 R、G 和 B 分量的加权和,将 RGB 值转换为灰度值: $0.2989 * R + 0.5870 * G + 0.1140 * B $

    • YUV space

      mainly consider the simplicity to transform the color space, which usually used be compatible Black&White TV. $$ Y = 0.2989 * R + 0.5870 * G + 0.1140 * B \ U = B - Y \ V = R - Y \ whereYisbrightness,U,Viscolor~difference. $$

    Similarly, Y value in YCbCr Space is also computed by this equation, denotes the brightness.

About

Realtime face recogntion pipline realized in Labview. Using PCA algorithm to extract the eigenvector of each face's image.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages