There is good news and bad news related to the availability of software for the HVC-P2. The good news is that there is an evaluation GUI application for Windows that is ready to run. And the product website has sample code available for C, Python, and Android. The bad news is that most of the software is somewhat dated and the documentation is somewhat lacking. The Evaluation Software is reasonably straightforward to use and provides a good basis for getting a sense of the HVC-P2 capabilities. Unfortunately, it is Windows only and it allows logging the detection results but not saving the images.
The initial software set with the USB drivers and the Evaluation Software was released in August of 2016. The Sample C code was added in January 2017. The Python code was added February 2017. The Android code was recently added in July 2018. The following is a snapshot of their current software available at the HVC-P2 product page: https://www.components.omron.com/mobile/hvc_p2/ .
I am running Win10, so the USB driver installation happens automatically when the device is connected and you just need to make sure that the application correctly determines which Com port to use.
Here is a listing of the Evaluation Software: http://omronfs.omron.com/en_US/ecb/products/pdf/EvaluationSoftware_rev.2.4.1.zip
Both a Japanese and English version of the Application are provided. I used the English version HVCDemoE.exe which runs a nice GUI interface. It would have been nice if the source code for this application had been provided.
Here is a listing of the Sample Code for C: http://omronfs.omron.com/en_US/ecb/products/pdf/SampleCode_rev.3.0.zip
There is support for both the Windows and Linux platforms. Here is the base directory structure:
Directory Structure
bin/ Output directory for building
import/ Import directory to use STBLib
platform/ Building environment
Windows/ For VC10(Visual Studio 2010 C++)/VC14(Visual Studio 2015 C++)
Linux/ For Linux
src/
HVCApi/ B5T-007001 interface function
HVCApi.c API function
HVCApi.h API function definition
HVCDef.h Struct definition
HVCExtraUartFunc.h Definition for external functions called from API function
STBApi/ STBLib interface function
STBWrap.c STBLib wrapper function
STBWrap.h STB Lib wrapper function definition
bmp/ Function to save bitmap file
bitmap_windows.c Saving image function for Windows
bitmap_linux.c Saving image function for Linux
uart/ UART interface function
uart_windows.c UART function for Windows
uart_linux.c UART function for Linux
uart.h UART function definition
Album/ Album file save/read function
Album.c Function to I/O album obtained from B5T-007001
Sample/ Detection process sample
main.c Sample code for detection process
FR_Sample/ Registration/Recognition process sample
register_main.c Sample code for registration process
FR_main.c Sample code for recognition process
STBLib/ STBLib kit
doc/ Documents set of STBLib
bin/ STBLib binary file
platform/ STBLib's building environment
Windows/ For VC10/VC14
Linux/ For Linux
src/ STBLib source code
The sample code allows you to build 3 different executables that are all run from the command terminal:
1) The "detection process" executes 9 functions except recognition (sample.exe).
2) The "registration process" executes the face recognition registration function (register.exe).
3) The "recognition process" executes recognition function (FRsample.exe).
The Windows executables are built using Visual Studio. There are code directories for only VC10 and VC14 but I did not have any issues using VC15 (Visual Studio 2017) to build the VC14 solution.
I do not intend to use Windows for my application, so I only built and tested sample.exe which runs the 9 detection functions.
The Linux executables are built using shell scripts and makefiles that are provided. I plan to use Python on the Raspberry Pi, so I haven't tried these but I may try them later.
Here is a listing of the Sample Code for Python: http://omronfs.omron.com/en_US/ecb/products/pdf/python_sample_rev.1.2.zip
The Python code has dependencies on Python 2.7, pySerial and Python Imaging libraries. I used the new Pillow library which is a later fork of PIL and that worked fine.
Two sample programs are provided that run in the terminal window:
1) execution.py which runs the "Detection process" which can execute all 10 functions including face recognition
2) registration.py which runs the "Album operation" to register faces for recognition
I have successfully installed and operated the examples on a Raspberry Pi 3 running Raspbian Stretch. I am using execution.py as the basis for the security monitoring application that I am implementing for the roadtest. I've added logging and image saving and also added the capability to add the detection bounding boxes to the images. This is where all of my effort will be applied relative to software development. I have not deployed it yet on a Raspberry Pi Zero W.
Here is a listing of the Sample Code for Android: http://omronfs.omron.com/en_US/ecb/products/pdf/android_sample.zip
I have never developed Android applications, so I am not attempting to use this code in the timeframe of the roadtest. It appears to have the equivalent functionality of the C and Python code. This is the most recent of the Omron application software but I'm not sure which devices they are targeting as you still are required to communicate via the USB UART.
The required development environment is:
1) Android Studio 3.1.3
2) Android SDK version 27
Software API Documentation:
This is an area that the Omron HVC-P2 documentation is very weak. I am used to APIs from IP Camera manufacturers that clearly document the functions in the API, specifying the function operation, its parameters and return values. I believe that Omron has targeted larger OEM users of this product line doesn't really expect any small scale use. I was somewhat confused about the definition of the status codes from the stabilization library, so I sent a query to their product support. I got a response in a couple of days acknowledging they received my questions, but wanting to know my application. When I responded that I was doing a roadtest evaluation, I never heard from them again.
I found the documentation on the Stabilization library that answered my questions. It was located in the C Sample code under the STBLib\doc directory. I wouldn't have found it if I had only tried the Python code. The STBLib_SoftwareSpecification_A document is the type of API documentation that I expected.
Device Command Specifications:
The CommandSpecifications document describes the serial command protocol used to control the device. It allows you to develop your own functions to operate the device.
Here is the flow chart for a command session:
And here is a flow chart for the detection process:
Here is the serial format for the command and response communication between the host and the device:
And finally here is the list of 20 device commands that are available:
So, there is an abundance of software available for the HVC-P2. There is even a Node.js implementation on github that I've chosen not to investigate. It appears that other than the evaluation GUI, the various other software just implement the basic command functions. I haven't seen a user application like the one I'm trying to implement.