Developing Face Recognition Software Using LabVIEW and a Vector Quantization Histogram

Dr. Alex See Kok Bin , PSB Academy

"The LabVIEW graphical programming environment helps the user visualize the program flow for easier development and debugging. Also, as many engineering processes and algorithms are presented in flow diagrams, implementing them in LabVIEW is simpler and faster as they naturally correspond to the LabVIEW block diagrams and the use of subVIs."

- Dr. Alex See Kok Bin , PSB Academy

The Challenge:

Using semiconductor technology to create a complex, PC-based face authentication and recognition system at a lower cost than current methods.

The Solution:

Using NI LabVIEW software and the Vision Development Module to design complex face recognition algorithms for an automated, PC-based face recognition software that costs less than previous solutions.


Dr. Alex See Kok Bin - PSB Academy
Ang Jin Leong - Monash University Malaysia


Evolving face authentication and recognition has become important, especially for homeland security. As technological advancements in semiconductor wafer manufacturing have resulted in cheaper microprocessors and computers, there is an opportunity to develop a complex, PC-based face authentication and recognition system with sufficient reliability at a much lower cost.


Generally, a face recognition system examines a still or video image of a scene and then identifies or verifies one or more person in the scene using a stored database of faces. Our application focuses on still image face recognition, using face images from the well-known Database of Faces, for both database training and real-time recognition purposes.


System Overview

Vector quantization (VQ) is a lossy image compression technique widely used in electronic media and entertainment systems due to its good compression performance and high-speed, real-time decompression. An image is input into a VQ compression system and it outputs a codebook and a stream of indexes, which together form the compressed format of the original image. The main design problem of a VQ system is the algorithm to generate the codebook, in which a ‘good-quality’ codebook results in good compression performance. The algorithm used in this project overcomes this problem by using an iterative process, also known as training. Figure 1 depicts the VQ scheme.


The VQ histogram is an intermediate result of the image compression operation, which contains useful features describing the compressed face image. Finally, a tree-structured decision network offers a simpler, efficient face recognition approach.


We developed the face recognition system using LabVIEW. Figure 2 shows the flow diagram of the system, which has three main steps. The input to the system is an unknown face image and the output is the recognition result that identifies the face image from a database.



Step 1 is the vectorization process that converts the image into vectors, as a vector is the basic unit in a VQ system. We can include optional image processing on the input images in this step. Some examples of image processing include resizing, grey scale equalization, adaptive filtering, image enhancements, and experiments to show the manipulation of images that can affect recognition results. The image processing libraries in the NI Vision Development Module offer easy implementation and experimentation with different combinations of these image processing functions. Step 2 is the system training phase, in which the system generates an optimum codebook for each training image. The system successfully implements the adaptive incremental Linde, Buzo, Gray (LBG) VQ algorithm here. Step 2 is not required during face recognition simulation, which makes it practical for real-time recognition purposes. Step 3 is a tree-structured decision network that makes recognition decisions for a given test image, as described in Figure 3.


The tree-structured decision network is made of nodes and each node differentiates between two face images. It does this by storing databases of two trained face images and comparing them with an input test image. Figure 3 illustrates a test image fed to the top node, containing databases 1 and 2. If the test image is closer to the trained database 1, it diverts this test image to the next node on the left down to the network. Otherwise, it diverts it to the right, as shown in the top node of the network in Figure 3. The final recognition result is the decision at the ending node of the network.


We developed the network so all trained face images have a definite route and output indicated by the end node. In Figure 3, the network has been trained to recognize eight faces and each trained face has a definite output at the ending node (1 to 8). This presents a logical comparison manner and makes the search more efficient by comparing to only a subset of the entire face database within the network. Another advantage is that we can easily add a new face image to the network database without retraining all previous images or reconstructing the entire network, which would be time-consuming.




Using 50 images from the publicly available Database of Faces, the PC-based face recognition system achieves an up to 80 percent recognition rate. This PC-based system serves as a proof of concept for the proposed face recognition method, which has room for further improvements and research.


The LabVIEW graphical programming environment helps the user visualize the program flow for easier development and debugging. Also, as many engineering processes and algorithms are presented in flow diagrams, implementing them in LabVIEW is simpler and faster as they naturally correspond to the LabVIEW block diagrams and the use of subVIs (see Figure 4). We can use the valuable time saved for actual experimenting and improving the program to achieve better results. This attribute is highly recommended for software programmers.


Automated Face Recognition

Automation in this context refers to automated database generation, as well as automated recognition simulations, for both development and real-time recognition purposes. We can easily implement automation in LabVIEW . Implementing automation is important to help R&D test different settings and system parameters that otherwise would require hours of attention from a developer.



The scope of work presented here focuses on the software. Many more enhancements are possible, including improving the software’s reliability and adding hardware such as cameras and sensors. LabVIEW programs readily work with many automation systems and image acquisition hardware, suggesting that a fully automated face recognition system is possible.


In conclusion, we demonstrated the use of LabVIEW to implement a low-cost, complex face recognition algorithm with reliable performance.


Author Information:

Dr. Alex See Kok Bin
PSB Academy
2985 Jalan Bukit Menah

Figure 1: Vector Quantization Operations
Figure 2: Face Recognition System Flow Diagram
Figure 3: Tree-Structured Decision Network
Figure 4: Implementing Functional Block Diagrams