element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
RoadTests & Reviews
  • Products
  • More
RoadTests & Reviews
Review Blogs Omron HVC-P2 Roadtest - Software
  • Blogs
  • RoadTest Forum
  • Documents
  • RoadTests
  • Reviews
  • Polls
  • Files
  • Members
  • Sub-Groups
  • More
  • Cancel
  • New
Join RoadTests & Reviews to participate - click to join for free!
  • Share
  • More
  • Cancel
  • Author Author: ralphjy
  • Date Created: 7 Oct 2018 9:24 PM Date Created
  • Views 792 views
  • Likes 4 likes
  • Comments 0 comments
Related
Recommended
  • omron roadtest
  • image recognition

Omron HVC-P2 Roadtest - Software

ralphjy
ralphjy
7 Oct 2018

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/ .

image

 

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

image

 

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.

image

image

 

 

Here is a listing of the Sample Code for C:  http://omronfs.omron.com/en_US/ecb/products/pdf/SampleCode_rev.3.0.zip

image

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

image

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

image

 

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:

image

 

And here is a flow chart for the detection process:

image

 

Here is the serial format for the command and response communication between the host and the device:

image

And finally here is the list of 20 device commands that are available:

image

 

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.

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube