diff --git a/examples/c++/b5t007001_register b/examples/c++/b5t007001_register new file mode 100755 index 00000000..a4024e24 Binary files /dev/null and b/examples/c++/b5t007001_register differ diff --git a/examples/c++/b5t007001_register.cxx b/examples/c++/b5t007001_register.cxx new file mode 100644 index 00000000..afa23532 --- /dev/null +++ b/examples/c++/b5t007001_register.cxx @@ -0,0 +1,1143 @@ +/* +* Author: Takashi Kakiuchi +* Copyright (c) 2019 Omron Electronic Components - Americas +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of +* this software and associated documentation files (the "Software"), to deal in +* the Software without restriction, including without limitation the rights to +* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +* the Software, and to permit persons to whom the Software is furnished to do so, +* subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all +* copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +/* headers */ +#include +#include +#include +#include +#include +#include +#include + +/* omron sensor header */ +#include "b5t007001.hpp" + +/* Define */ +#define CLEAR_SCREEN "\033[2J\033[1;1H" /* Clear screen */ +//#define USE_LIBRARY_TIMEOUT /* Enable to use library timeout */ + +#define ADD_USER 1 +#define MODIFY_DELETE_USER 2 +#define LIST_USER 3 +#define SETTINGS 4 + +#define UART_SETTING_TIMEOUT 1000 /* HVC setting command signal timeout period */ +#define UART_DETECT_EXECUTE_TIMEOUT 6000 /* HVC Face Detection command signal timeout period */ +#define UART_REGIST_EXECUTE_TIMEOUT 7000 /* HVC registration command signal timeout period */ +#define LIBRARY_TIMEOUT -1 /* Library timeout */ + +using namespace upm; +using namespace std; + +volatile sig_atomic_t flag = true; +UINT8 isCinWaitState = 0; //State for cin is waiting for input or not. + +void +sig_handler(INT32 signum) +{ + // Check for Interrupt signal + if (signum == SIGINT || signum == SIGTERM){ + cout << "exit" << endl; + flag = false; + if(isCinWaitState == 1){ + std::cin.setstate(std::ios_base::badbit); + } + } +} + +UINT8 +takeSelectedInput(STRING str, UINT32 &value, UINT32 startIndex, UINT32 endIndex){// Take input + + isCinWaitState = 1; + + try{ + cin.exceptions(std::ios_base::badbit); + + do{ + cout << str; + cin >> value; + + // Clear and ignor bad input + if(isdigit(value) != true){ + cin.clear(); // reset badbit + cin.ignore(std::numeric_limits::max(), '\n'); //skip bad input + } + + // Check start index and end index with input value + if(value < startIndex || value > endIndex){ + cout << "*************************************************************" << endl; + cout << "Invalid choice. Please select from " << std::dec << startIndex << " to " << endIndex << "." << endl; + cout << "*************************************************************" << endl; + }else{ + isCinWaitState = 0; + return true; + } + + }while((value < startIndex || value > endIndex) && flag); + + }catch (std::ios_base::failure& fail){ + + isCinWaitState = 0; + return false; + } + + isCinWaitState = 0; + return false; +} + +INT32 +main(INT32 argc, INT8** argv) +{ + + signal(SIGINT, sig_handler); + + // Variable initialize + UINT32 choice,sub_choice,input,sub_input; + UINT32 loop,i,tmpDataId,tmplen; + UINT8 ret; + + #ifdef USE_LIBRARY_TIMEOUT + INT32 timeout = LIBRARY_TIMEOUT; + #else + INT32 timeout = UART_SETTING_TIMEOUT; + #endif + + HVC_VERSION version; + HVC_IMAGE image; + B5T_STATUS_T returnStatus; + + HVC_UART_BAUD_RATE_T baudRate; + UINT8 cameraAngle; + HVC_THRESHOLD threshold; + HVC_SIZERANGE sizeRange; + INT32 pose, angle; + + UINT8 *pAlbumData = NULL; + INT32 albumDataSize = 0; + string inFileName; + + fstream pFile; + + vector userId; + vector userDataId; + + // Print baudrates for selection + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " BaudRates " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. 9600 " << endl; + cout << "2. 38400 " << endl; + cout << "3. 115200 " << endl; + cout << "4. 230400 " << endl; + cout << "5. 460800 " << endl; + cout << "6. 921600 " << endl; + cout << "*************************************************************" << endl; + + ret = takeSelectedInput("Select from the list of BaudRates : ", input, 1,6); + + if(ret != true){ + return 0; + } + + switch(input){// Baudrate variable update as per input + + case 1: // 9600 + baudRate = HVC_UART_BAUD_RATE_9600; + break; + + case 2: // 38400 + baudRate = HVC_UART_BAUD_RATE_38400; + break; + + case 3: // 115200 + baudRate = HVC_UART_BAUD_RATE_115200; + break; + + case 4: // 230400 + baudRate = HVC_UART_BAUD_RATE_230400; + break; + + case 5: // 460800 + baudRate = HVC_UART_BAUD_RATE_460800; + break; + + case 6: // 921600 + baudRate = HVC_UART_BAUD_RATE_921600; + break; + + default: + break; + + }//end input switch + + // Instantiate a B5T007001 sensor on UART. + B5T007001 sensor(DEFAULT_UART_NUM, baudRate); + + // Get the sensor version + returnStatus = sensor.getVersion(timeout,version); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get Version with error code : " << returnStatus << endl; + return 0; + } + + // String re-size + string tmpstring((INT8*)version.string, sizeof(version.string)); + + // Album data Allocatoion + pAlbumData = (UINT8*)malloc(sizeof(UINT8) * (HVC_ALBUM_SIZE_MAX + 8)); + + if (pAlbumData == NULL){ + cout << "Album data memeory allocation error." << endl; + return 0; + } + + while(flag) + { + cout << CLEAR_SCREEN; + cout << "*************************************************************" << endl; + cout << " HVC Version : " // Print HVC version + << tmpstring + << (unsigned) version.major << "." + << (unsigned) version.minor << "." + << (unsigned) version.relese << "." + << (unsigned) (version.revision[0] + + (version.revision[1] << 8) + + (version.revision[2] << 16) + + (version.revision[3] << 24)) << endl; + // Print main menu for selection + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " MAIN MENU " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. Add user " << endl; + cout << "2. Modify/Delete user " << endl; + cout << "3. List user " << endl; + cout << "4. Settings " << endl; + cout << "*************************************************************" << endl; + + ret = takeSelectedInput("Select from main menu : ", choice, 1, 4); + + if(ret != true){ + break; + } + + switch(choice){ + + case ADD_USER: + + // Get register user ids and data ids + returnStatus = sensor.getRegisteredUsersInfo(timeout,userId,userDataId); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get registered user info with error code : " << returnStatus << endl; + break; + } + + if(userId.size() > 0) // Check registered user ids size + { + for(loop = 0; loop < userId.size(); loop++){ + if(userId[loop] != loop){ + break; + } + } + }else{ + // Init 0 for non-registered user application + loop = 0; + } + + #ifndef USE_LIBRARY_TIMEOUT + // Update timeout variable + timeout = UART_REGIST_EXECUTE_TIMEOUT; + #endif + + if(loop > 99){// Check total number of register user id + cout << "Maximum user id registration number reached." << endl; + break; + } + + tmpDataId = 0; + + // Add user + returnStatus = sensor.addUser(timeout,loop,tmpDataId,image); + + #ifndef USE_LIBRARY_TIMEOUT + // Update timeout variable + timeout = UART_SETTING_TIMEOUT; + #endif + + if(returnStatus != B5T_STATUS_SUCCESS){// Check return status + cout << "Failed to add user with error code : " << returnStatus << endl; + break; + } + + // Print message with registered user id and data id + cout << "User added successfully with user id : " << loop << " ,and data id : " << tmpDataId << "." << endl; + + break; + + case MODIFY_DELETE_USER: + + // Get register user ids and data ids + returnStatus = sensor.getRegisteredUsersInfo(timeout,userId,userDataId); + + if(returnStatus != B5T_STATUS_SUCCESS){// Check return status + cout << "Failed to get Registered User Info with error code : " << returnStatus << endl; + cin.ignore(); + break; + } + + // Print for selection of modify and delete user + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " Modify or Delete Users ID " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. Modify user " << endl; + cout << "2. Delete user " << endl; + cout << "*************************************************************" << endl; + + ret = takeSelectedInput("Select modify user or delete user : ",sub_choice,1,2); + + if(ret != true){ + break; + } + + if(sub_choice == 1){// Modify user + + if(userId.size() > 0){// Check registered user ids size + for(loop = 0; loop < userId.size(); loop++){ + cout << (loop+1) << "." << "User ID : " << unsigned(userId[loop]) << endl; + } + }else{ + cout << "Users id list is empty. Please add user and try again." << endl; + break; + } + + ret = takeSelectedInput("Select from the list of user ID : ",sub_choice,1,userId.size()); + + if(ret != true){ + break; + } + + // Print for selection of modify and delete data ids + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " Modify/Delete Data IDs " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. Add/Modify Data ID " << endl; + cout << "2. Delete Data ID " << endl; + cout << "*************************************************************" << endl; + + ret = takeSelectedInput("Select from the list : ",input,1,2); + + if(ret != true){ + break; + } + + if(input == 1){ + + // Print registered data ids + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " Data IDs " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "Registered Data IDs." << endl; + + tmpDataId = 0; + tmplen = 0; + + for(loop=0, i=0x01; i < 0x400; loop++, i<<=1){// Check and print registered data ids + + if ((userDataId[sub_choice-1] & i) == 0 ){ + if(tmplen < __builtin_popcountll(userDataId[sub_choice-1])){ + tmpDataId++; + continue; + }else{ + break; + } + } + cout << "Data ID : " << tmpDataId << endl; + tmplen++; + tmpDataId++; + } + + // Check registration number + if ( tmpDataId >= 10 ){ + cout << "Maximum data id registration number reached." << endl; + cin.ignore(); + break; + } + + // Print for input from user for add/modify data id + ret = takeSelectedInput("Select data id(0 to 9) for add/modify : ",input,0,9); + + if(ret != true){ + break; + } + + // Check user input + if((input >= 0) && (input <= 9)){ + + #ifndef USE_LIBRARY_TIMEOUT + // Update timeout variable + timeout = UART_REGIST_EXECUTE_TIMEOUT; + #endif + + // Add user + returnStatus = sensor.addUser(timeout,userId[sub_choice-1],input,image); + + #ifndef USE_LIBRARY_TIMEOUT + // Update timeout variable + timeout = UART_SETTING_TIMEOUT; + #endif + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to modify user with error code : " << returnStatus << endl; + break; + } + + cout << "Data id "<< input << " of user id " << (unsigned)userId[sub_choice-1] << " add/modify successfully." << endl; + break; + } + + }else if(input == 2){//Delete Data Id + + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " Data IDs " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + + tmpDataId = 0; + tmplen = 0; + + for(loop=0,i=0x01; i < 0x400; loop++, i<<=1){// Check and print registered data ids + + if ((userDataId[sub_choice-1] & i) == 0 ){ + if(tmplen < __builtin_popcountll(userDataId[sub_choice-1])){ + tmpDataId++; + continue; + }else{ + break; + } + } + cout << "Data ID : " << tmpDataId << endl; + tmplen++; + tmpDataId++; + } + + ret = takeSelectedInput("Select data ID for delete : ",sub_input,0,9); + + if(ret != true){ + break; + } + + if((sub_input >= 0) && (sub_input <= (tmpDataId+1))){// Check input + + #ifndef USE_LIBRARY_TIMEOUT + // Update timeout variable + timeout = UART_REGIST_EXECUTE_TIMEOUT; + #endif + + // Delete user data id + returnStatus = sensor.deleteUserData(timeout,userId[sub_choice-1], sub_input); + + #ifndef USE_LIBRARY_TIMEOUT + // Update timeout variable + timeout = UART_SETTING_TIMEOUT; + #endif + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to modify user with error code : " << returnStatus << endl; + break; + } + + cout << "Data id "<< sub_input << " of user id " << unsigned(userId[sub_choice-1]) << " deleted Successfully." << endl; + break; + } + + }else{ + + cout << "Invalid input." << endl; + } + }else if(sub_choice == 2){// Delete user + + // Print for delete users + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " Delete Users " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. Delete specific user id " << endl; + cout << "2. Delete all user id " << endl; + cout << "*************************************************************" << endl; + + // Print for input from user + ret = takeSelectedInput("Select from the list of Delete user : ",input,1,2); + + if(ret != true){ + break; + } + + if(input == 2){// Delete all user + + if(userId.size() > 0){// Check registered user ids size + + sensor.deleteUserAll(timeout); + cout << "All user id delete successfully." << endl; + + }else{ + cout << "Users id list is empty. Please add user and try again." << endl; + } + + }else if(input == 1){// Delete specific user id + + if(userId.size() > 0){// Check registered user ids size + + for(loop = 0; loop < userId.size(); loop++){ + cout << (loop+1) << "." << "User ID : " << unsigned(userId[loop]) << endl; + } + + }else{ + + cout << "Users id list is empty. Please add user and try again." << endl; + break; + } + + // Take a input choice from user + ret = takeSelectedInput("Select from the list of user ID : ",input,1,userId.size()); + + if(ret != true){ + break; + } + + // Delete user id + returnStatus = sensor.deleteUser(timeout,userId[input-1]); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to modify user with error code : " << returnStatus << endl; + cin.ignore(); + break; + } + cout << "User id " << unsigned(userId[input-1]) << " deteled successfully." << endl; + } + } + + break; + + case LIST_USER: + + // Get register user ids and data ids + returnStatus = sensor.getRegisteredUsersInfo(timeout,userId,userDataId); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get Registered User Info with error code : " << returnStatus << endl; + break; + } + + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " Users ID " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + + if(userId.size() > 0){// Check registered user ids size + + for(loop = 0; loop < userId.size(); loop++){ + + cout << (loop+1) << "." << "User ID : " << unsigned(userId[loop]) << endl; + } + }else{ + + cout << "Users id list is empty. Please add user and try again." << endl; + break; + } + + ret = takeSelectedInput("Select from the list of user ID : ",sub_choice,1,userId.size()); + + if(ret != true){ + break; + } + + tmplen = 0; + + if((sub_choice > 0) && (sub_choice <= userId.size())){// Check input + + for(loop=0,i=0x01; i < 0x400; loop++, i<<=1){// Check and print registered data ids + + if ((userDataId[sub_choice-1] & i) == 0 ){ + + if(tmplen < __builtin_popcountll(userDataId[sub_choice-1])){ + continue; + }else{ + break; + } + } + + cout << "Data ID : " << loop << endl; + tmplen++; + } + break; + } + + break; + + case SETTINGS: + + // Print settings + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " Settings " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. Get camera angle " << endl; + cout << "2. Set camera angle " << endl; + cout << "3. Get threshold value " << endl; + cout << "4. Set threshold value " << endl; + cout << "5. Get detection size " << endl; + cout << "6. Set detection size " << endl; + cout << "7. Get face angle " << endl; + cout << "8. Set face angle " << endl; + cout << "9. Set uart forwarding rate " << endl; + cout << "10. Save Album from HVC Device to Host " << endl; + cout << "11. Load Album from Host to HVC Device RAM " << endl; + cout << "12. Save Album from HVC Device RAM to HVC device ROM " << endl; + cout << "*************************************************************" << endl; + + ret = takeSelectedInput("Select from the list of settings : ",sub_choice,1,12); + + if(ret != true){ + break; + } + + switch(sub_choice){ + + case 1: // Get camera angle + + returnStatus = sensor.getCameraAngle(timeout, cameraAngle); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get camera Angle with error code : " << returnStatus << endl; + break; + } + + switch(cameraAngle){ + + case 0: // 0 + cout << "Camera Angle is 0 degree." << endl; + break; + + case 1: // 90 + cout << "Camera Angle is 90 degree." << endl; + break; + + case 2: // 180 + cout << "Camera Angle is 180 degree." << endl; + break; + + case 3: // 270 + cout << "Camera Angle is 270 degree." << endl; + break; + + default: + cout << "Invalid Camera Angle Received." << endl; + + }//end switch getCameraAngle + + break; + + case 2: // Set camera angle + + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " Camera Angles " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. 0 degree " << endl; + cout << "2. 90 degree " << endl; + cout << "3. 180 degree " << endl; + cout << "4. 270 degree " << endl; + cout << "*************************************************************" << endl; + + ret = takeSelectedInput("Select from the list of Camera Angles : ",input,1,4); + + if(ret != true){ + break; + } + + // Set Camera angle + returnStatus = sensor.setCameraAngle(timeout,cameraAngle); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set camera angle with error code : " << returnStatus << endl; + break; + } + + if(cameraAngle == 0){ + cout << "Camera Angle : 0 set successfully" << endl; + }else if(cameraAngle == 1){ + cout << "Camera Angle : 90 set successfully" << endl; + }else if(cameraAngle == 2){ + cout << "Camera Angle : 180 set successfully" << endl; + }else if(cameraAngle == 3){ + cout << "Camera Angle : 270 set successfully" << endl; + }else{ + cout << "Invalid Camera Angle set." << endl; + } + + break; + + case 3: // Get threshold value + + returnStatus = sensor.getThreshold(timeout, threshold); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get Threshold value with error code : " << returnStatus << endl; + break; + } + + cout << "Threshold Value of Human Body Detection is : " << threshold.bdThreshold << endl; + cout << "Threshold Value of Hand Detection is : " << threshold.hdThreshold << endl; + cout << "Threshold Value of Face Detection is : " << threshold.dtThreshold << endl; + cout << "Threshold Value of Face Recognition is : " << threshold.rsThreshold << endl; + + break; + + case 4: // Set threshold value + + // Human Body Detection + ret = takeSelectedInput("Input Threshold value for Human Body Detection : ",input,1,1000); + + if(ret != true){ + break; + } + + threshold.bdThreshold = input; + + // Hand Detection + ret = takeSelectedInput("Input Threshold value for Hand Detection : ",input,1,1000); + + if(ret != true){ + break; + } + + threshold.hdThreshold = input; + + // Face Detection + ret = takeSelectedInput("Input Threshold value for Face Detection : ",input,1,1000); + + if(ret != true){ + break; + } + + threshold.dtThreshold = input; + + // Face Recognition + ret = takeSelectedInput("Input Threshold value for Face Recognition : ",input,1,1000); + + if(ret != true){ + break; + } + + threshold.rsThreshold = input; + + returnStatus = sensor.setThreshold(timeout,threshold); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set threshold value with error code : " << returnStatus << endl; + break; + } + + cout << "Threshold values set successfully." << endl; + + break; + + case 5: // Get detection size + + returnStatus = sensor.getSizeRange(timeout,sizeRange); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get detection size with error code : " << returnStatus << endl; + break; + } + + cout << "Minimum detection size of Human Body Detection is : " << sizeRange.bdMinSize << endl; + cout << "Maximum detection size of Human Body Detection is : " << sizeRange.bdMaxSize << endl; + cout << "Minimum detection size of Hand Detection is : " << sizeRange.hdMinSize << endl; + cout << "Maximum detection size of Hand Detection is : " << sizeRange.hdMaxSize << endl; + cout << "Minimum detection size of Face Detection is : " << sizeRange.dtMinSize << endl; + cout << "Maximum detection size of Face Detection is : " << sizeRange.dtMaxSize << endl; + + break; + + case 6: // Set detection size + + ret = takeSelectedInput("Minimum detection size of Human Body Detection : ",input,20,8192); + + if(ret != true){ + break; + } + + sizeRange.bdMinSize = input; + + ret = takeSelectedInput("Maximum detection size of Human Body Detection : ",input,20,8192); + + if(ret != true){ + break; + } + + sizeRange.bdMaxSize = input; + + ret = takeSelectedInput("Minimum detection size of Hand Detection : ",input,20,8192); + + if(ret != true){ + break; + } + + sizeRange.hdMinSize = input; + + ret = takeSelectedInput("Maximum detection size of Hand Detection : ",input,20,8192); + + if(ret != true){ + break; + } + + sizeRange.hdMaxSize = input; + + ret = takeSelectedInput("Minimum detection size of Face Detection : ",input,20,8192); + + if(ret != true){ + break; + } + + sizeRange.dtMinSize = input; + + ret = takeSelectedInput("Maximum detection size of Face Detection : ",input,20,8192); + + if(ret != true){ + break; + } + + sizeRange.dtMaxSize = input; + + returnStatus = sensor.setSizeRange(timeout,sizeRange); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set detection size with error code : " << returnStatus << endl; + break; + } + + cout << "Detection size set successfully." << endl; + + break; + + case 7: // Get face angle + + returnStatus = sensor.getFaceDetectionAngle(timeout,pose,angle); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get Face Detetion Angle with error code : " << returnStatus << endl; + break; + } + + if(pose == 0){ + cout << "Face Detection pose is : 30 degree" << endl; + }else if(pose == 1){ + cout << "Face Detection pose is : 60 degree" << endl; + }else if(pose == 2){ + cout << "Face Detection pose is : 90 degree" << endl; + }else{ + cout << "Invalid Face Detection pose." << endl; + } + + if(angle == 0){ + cout << "Face Detection angle is : 15 degree" << endl; + }else if(angle == 1){ + cout << "Face Detection angle is : 45 degre" << endl; + }else{ + cout << "Invalid Face Detection angle." << endl; + } + + break; + + case 8: // Set face angle + + //Pose + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " Pose " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. 30 degree " << endl; + cout << "2. 60 degree " << endl; + cout << "3. 90 degree " << endl; + cout << "*************************************************************" << endl; + + ret = takeSelectedInput("Select from the list of Pose : ",input,1,3); + + if(ret != true){ + break; + } + + pose = (input - 1); + + //Angle + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " Angle " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. 15 degree " << endl; + cout << "2. 45 degree " << endl; + cout << "*************************************************************" << endl; + + ret = takeSelectedInput("Select from the list of Angle : ",input,1,2); + + if(ret != true){ + break; + } + + angle = (input - 1); + + returnStatus = sensor.setFaceDetectionAngle(timeout,pose,angle); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set face detection angle with error code : " << returnStatus << endl; + break; + } + + cout << "Face Detection Angle set Successfully." << endl; + + break; + + case 9: // Set uart forwarding rate + + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " BaudRates " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. 9600 " << endl; + cout << "2. 38400 " << endl; + cout << "3. 115200 " << endl; + cout << "4. 230400 " << endl; + cout << "5. 460800 " << endl; + cout << "6. 921600 " << endl; + cout << "*************************************************************" << endl; + + ret = takeSelectedInput("Select from the list of BaudRates : ",input,1,6); + + if(ret != true){ + break; + } + + switch(input){ + + case 1: // 9600 + baudRate = HVC_UART_BAUD_RATE_9600; + break; + + case 2: // 38400 + baudRate = HVC_UART_BAUD_RATE_38400; + break; + + case 3: // 115200 + baudRate = HVC_UART_BAUD_RATE_115200; + break; + + case 4: // 230400 + baudRate = HVC_UART_BAUD_RATE_230400; + break; + + case 5: // 460800 + baudRate = HVC_UART_BAUD_RATE_460800; + break; + + case 6: // 921600 + baudRate = HVC_UART_BAUD_RATE_921600; + break; + + default: + cout << "Invalid choice. Please Select from 1 to 6." << endl; + + }//end input switch set baudrate + + // Set Baudrate + returnStatus = sensor.setBaudRate(timeout,baudRate); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set BaudRate with error code : " << returnStatus << endl; + break; + } + + cout << "BaudRate " << baudRate << " set successfully." << endl; + + break; + + case 10: // Save Album from HVC Device to Host + + #ifndef USE_LIBRARY_TIMEOUT + // Update timeout variable + timeout = UART_SAVE_ALBUM_TIMEOUT; + #endif + + // Save Album to host + returnStatus = sensor.saveAlbumToHost(timeout, pAlbumData, albumDataSize); + + #ifndef USE_LIBRARY_TIMEOUT + // Update timeout variable + timeout = UART_SETTING_TIMEOUT; + #endif + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to Save Album Data with error code : " << returnStatus << endl; + break; + } + + do{ + cout << "Input File Path for save Album : "; + + // Set path of file + + getline(cin, inFileName,'\n'); + + // Open file + pFile.open(inFileName.c_str(), fstream::out); + + if(!pFile){// Check file or path exists + cout << "*************************************************************" << endl; + cout << "Invalid Path." << endl; + cout << "*************************************************************" << endl; + } + + }while(!pFile && flag); + + // Write data in file + pFile.write((INT8*)pAlbumData,albumDataSize); + + // Close file + pFile.close(); + + cout << "Save Album Data successfully." << endl; + + break; + + case 11: // Load Album from Host to HVC Device RAM + + #ifndef USE_LIBRARY_TIMEOUT + // Update timeout variable + timeout = UART_LOAD_ALBUM_TIMEOUT; + #endif + + do{ + + cout << "Input File Path from load Album : "; + + // Set path of file + getline(cin, inFileName,'\n'); + + // Open file + pFile.open(inFileName.c_str(), fstream::out | fstream::in); + + if(!pFile){// Check file or path exists + cout << "*************************************************************" << endl; + cout << "Invalid Path." << endl; + cout << "*************************************************************" << endl; + } + + }while(!pFile && flag); + + // Calculate size of ablbum data + pFile.seekg (0, pFile.end); + albumDataSize = pFile.tellg(); + pFile.seekg (0, pFile.beg); + + // Read album data + pFile.read((INT8*)pAlbumData,albumDataSize); + + // Close file + pFile.close(); + + // Load album + returnStatus = sensor.loadAlbumFromHost(timeout, pAlbumData,albumDataSize); + + #ifndef USE_LIBRARY_TIMEOUT + // Update timeout variable + timeout = UART_SETTING_TIMEOUT; + #endif + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to load album data with error code : " << returnStatus << endl; + break; + } + + cout << "Load album data successfully." << endl; + + break; + + case 12: // Save Album from HVC Device RAM to HVC device ROM + + // Save album into ROM + returnStatus = sensor.saveAlbumToROM(timeout); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to aave album to ROM memory with error code : " << returnStatus << endl; + break; + } + + cout << "Save album to ROM memory successfully." << endl; + + break; + + default: + cout << "Invalid choice. Please select from 1 to 12." << endl; + + }//end sub_choice switch + + break; + + default: + cout << "Invalid choice. Please select from 1 to 4." << endl; + + }//end choice switch + + if(flag){ + cout << "Press enter to continue..."; + //cin.ignore(); + cin.get(); + } + } + + // Free album data + if(pAlbumData != NULL){ + free(pAlbumData); + } + + return 0; +} diff --git a/examples/c++/b5t007001_sample.cxx b/examples/c++/b5t007001_sample.cxx new file mode 100644 index 00000000..f94c0ccc --- /dev/null +++ b/examples/c++/b5t007001_sample.cxx @@ -0,0 +1,1623 @@ +/* +* Author: Takashi Kakiuchi +* Copyright (c) 2019 Omron Electronic Components - Americas +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of +* this software and associated documentation files (the "Software"), to deal in +* the Software without restriction, including without limitation the rights to +* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +* the Software, and to permit persons to whom the Software is furnished to do so, +* subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all +* copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +/* headers */ +#include +#include +#include +#include +#include +#include +#include +#include + +/* omron sensor header */ +#include "b5t007001.hpp" + +/* Define */ +#define CLEAR_SCREEN "\033[2J\033[1;1H" + +#define HUMAN_BODY_DETECT 1 +#define HAND_DETECT 2 +#define FACE_DETECT 3 +#define AGE_ESTIMATE 4 +#define FACE_DIRECTION 5 +#define GENDER_ESTIMATE 6 +#define GAZE_ESTIMATE 7 +#define BLINK_ESTIMATE 8 +#define EXPRESSION_ESTIMATE 9 +#define FACE_RECOGNITION 10 +#define ALL 11 +#define SETTINGS 12 + +#define DEBUG_PRINT 0 +using namespace upm; +using namespace std; + +volatile sig_atomic_t exitFlag = 0; +UINT8 isCinWaitState = 0; //State for cin is waiting for input or not. + +void +sig_handler(int signum) +{ + // Check for Interrupt signal + if (signum == SIGINT || signum == SIGTERM){ + exitFlag++; + } + if(exitFlag == 2){ + if(isCinWaitState == 1){ + std::cin.setstate(std::ios_base::badbit); + } + } + cout << "\r\nPress enter to continue or press ctrl + c again to exit from application." << endl; +} + +bool isNumberWithSpaces(string s) +{ + if(s.size() == 0) + { + return false; + } + for (UINT32 i = 0; i < s.length(); i++){ + if (s[i] != ' ' && isdigit(s[i]) == false){ + return false; + } + } + return true; +} + +bool isNumber(string s) +{ + if(s.size() == 0) + { + return false; + } + for (UINT32 i = 0; i < s.length(); i++){ + if (s[i] != '-' && isdigit(s[i]) == false){ + return false; + } + } + return true; +} + +void getNumbersFromString(string tmpStr, vector &outNumbers){ + UINT32 found=0, foundNext = 0; + outNumbers.clear(); + found = tmpStr.find(' ', found); + outNumbers.push_back(stoi(tmpStr.substr(0, found))); + found = 0; + for(UINT32 i=0;i< tmpStr.size();i++){ + found = tmpStr.find(' ', found+1); + if ((found != string::npos) && (found < tmpStr.size()-1)){ + foundNext = tmpStr.find(' ', found+1); +#if DEBUG_PRINT + cout << "DEBUG: foundNext =" << foundNext << endl; +#endif + if(foundNext == string::npos) { + foundNext = tmpStr.size() - found; + } + else + { + foundNext = foundNext - found; + } +#if DEBUG_PRINT + cout << "DEBUG: foundNext =" << foundNext << endl; + cout << "DEBUG: First occurrence is " << stoi(tmpStr.substr(found+1, foundNext)) << endl; +#endif + outNumbers.push_back(stoi(tmpStr.substr(found+1, foundNext))); + } + else + { + break; + } + } +} +UINT8 takeDigitInput(string printMsg, STB_INT32 &inputValue){ + string tmpStr; + isCinWaitState = 1; + try{ + cin.exceptions(std::ios_base::badbit); + do{ + exitFlag = 0; + cout << printMsg; + getline(cin, tmpStr); + if(isNumber(tmpStr)){ + inputValue = stoi(tmpStr); + break; + } + else + { + cout << "Invalid input. Please try again." << endl; + } + + }while(1); + }catch (std::ios_base::failure& fail){ + isCinWaitState = 0; + return false; + } + isCinWaitState = 0; + return true; +} +void takeEnterInput(){ + cout << "Press enter to continue..."; + isCinWaitState = 1; + try{ + exitFlag = 0; + cin.clear(); // reset badbit + cin.exceptions(std::ios_base::badbit); + while(1){ + if(cin.get() == '\n'){ + break; + } + } + }catch (std::ios_base::failure& fail){ + } + isCinWaitState = 0; +} + +UINT8 +takeSelectedMultiChoiceInput(STRING str, std::vector &value, INT32 startIndex, INT32 endIndex){// Take input + + isCinWaitState = 1; + std::string tmpStr; + UINT8 takeInput = 1; + try{ + cin.exceptions(std::ios_base::badbit); + + do{ + cout << str; + getline(cin,tmpStr); + + exitFlag = 0; + if(!isNumberWithSpaces(tmpStr)){ + cout << "*************************************************************" << endl; + cout << "Invalid choice. Please select from " << std::dec << startIndex << " to " << endIndex << "." << endl; + cout << "*************************************************************" << endl; + continue; + } + + getNumbersFromString(tmpStr, value); + + takeInput = 0; + // Check start index and end index with input value + for(UINT8 i=0;i < value.size();i++){ + #if DEBUG_PRINT + std::cout << "DEBUG: Processing values " << value[i] << std::endl; + #endif + + if(!(value[i] <= endIndex && value[i] >= startIndex)){ + cout << "*************************************************************" << endl; + cout << "Invalid choice. Please select from " << std::dec << startIndex << " to " << endIndex << "." << endl; + cout << "*************************************************************" << endl; + takeInput = 1; + break; + } + } + }while(takeInput); + + }catch (std::ios_base::failure& fail){ + isCinWaitState = 0; + return false; + } + isCinWaitState = 0; + return true; +} + + +UINT8 +takeSelectedInput(STRING str, INT32 &value, INT32 startIndex, INT32 endIndex){// Take input + + isCinWaitState = 1; + + try{ + cin.exceptions(std::ios_base::badbit); + + do{ + cout << str; + cin >> value; + + // Clear and ignor bad input + if(isdigit(value) != true){ + cin.clear(); // reset badbit + cin.ignore(std::numeric_limits::max(), '\n'); //skip bad input + } + + exitFlag = 0; + // Check start index and end index with input value + if(value < startIndex || value > endIndex){ + cout << "*************************************************************" << endl; + cout << "Invalid choice. Please select from " << std::dec << startIndex << " to " << endIndex << "." << endl; + cout << "*************************************************************" << endl; + }else{ + isCinWaitState = 0; + return true; + } + + }while((value < startIndex || value > endIndex) && exitFlag < 2); + + }catch (std::ios_base::failure& fail){ + isCinWaitState = 0; + return false; + } + isCinWaitState = 0; + return false; +} +string printSTBStatus(STB_STATUS status){ + + if(status == STB_STATUS_NO_DATA){ + return "No data"; + }else if(status == STB_STATUS_CALCULATING){ + return "Calculating"; + }else if(status == STB_STATUS_COMPLETE){ + return "Complete"; + }else if(status == STB_STATUS_FIXED){ + return "Fixed"; + } + return "Invalid status"; +} + +UINT8 getSTBFaceIndex(STB_INT32 nDetectID, STB_FACE *outSTBFaceResult, INT32 outSTBFaceCount, INT32 &nIndex){ + INT32 count = 0; + + for(count = 0; count < outSTBFaceCount; count++){ + if(outSTBFaceResult[count].nDetectID == nDetectID){ + nIndex = count; + return true; + } + } + + return false; +} + +int +main(int argc, char** argv) +{ + signal(SIGINT, sig_handler); + + int sub_choice,input; + int loop; + INT32 timeout = UART_EXECUTE_TIMEOUT; + HVC_VERSION version; + B5T_STATUS_T returnStatus; + + HVC_UART_BAUD_RATE_T baudRate; + UINT8 cameraAngle; + HVC_THRESHOLD threshold; + HVC_SIZERANGE sizeRange; + INT32 pose, angle; + + HVC_RESULT hvcResult; + INT32 execFlag; + INT32 imageNum = HVC_EXECUTE_IMAGE_QVGA_HALF; + + EXPRESSION exEnum; + INT32 stbStatus = 0; + + INT32 outSTBFaceCount; + STB_FACE *outSTBFaceResult; + INT32 outSTBBodyCount; + STB_BODY *outSTBBodyResult; + string tmpStr; + UINT32 i; + std::vector digitValues; + uint32_t sleep_time = 1000; + STB_INT8 majorVersion = 0, minorVersion = 0; + STB_INT32 maxRetryCount=0; + STB_INT32 posSteadinessParam, sizeSteadinessParam; + STB_INT32 thresholdValue; + STB_INT32 udAngleMin, udAngleMax, lrAngleMin,lrAngleMax; + STB_INT32 frameCount; + STB_INT32 minRatio; + + // Data and Time + INT8 dateAndTime[30]; + struct timeval value; + time_t curtime; + + UINT8 displaySamples = 1; + UINT8 ret= true; + INT32 nIndex; + + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " BaudRates " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. 9600 " << endl; + cout << "2. 38400 " << endl; + cout << "3. 115200 " << endl; + cout << "4. 230400 " << endl; + cout << "5. 460800 " << endl; + cout << "6. 921600 " << endl; + cout << "*************************************************************" << endl; + + ret = takeSelectedInput("Select from the list of BaudRates : ",input,1,6); + + if(ret != true){ + return 0; + } + + switch(input){ + + case 1: // 9600 + baudRate = HVC_UART_BAUD_RATE_9600; + break; + case 2: // 38400 + baudRate = HVC_UART_BAUD_RATE_38400; + break; + case 3: // 115200 + baudRate = HVC_UART_BAUD_RATE_115200; + break; + case 4: // 230400 + baudRate = HVC_UART_BAUD_RATE_230400; + break; + case 5: // 460800 + baudRate = HVC_UART_BAUD_RATE_460800; + break; + case 6: // 921600 + baudRate = HVC_UART_BAUD_RATE_921600; + break; + default: + cout << "Invalid choice. Please select from 1 to 6." << endl; + break; + + }//end input switch + + // Instantiate a B5T007001 sensor on UART. + B5T007001 sensor(DEFAULT_UART_NUM, baudRate); + + // Get the sensor version + returnStatus = sensor.getVersion(timeout,version); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get Version with error code : " << returnStatus << endl; + return 0; + } + + // String re-size + string tmpstring((char*)version.string, sizeof(version.string)); + do{ + cout << CLEAR_SCREEN; + cout << "*************************************************************" << endl; + cout << " HVC Version : " + << tmpstring + << (unsigned) version.major << "." + << (unsigned) version.minor << "." + << (unsigned) version.relese << "." + << (unsigned) (version.revision[0] + + (version.revision[1] << 8) + + (version.revision[2] << 16) + + (version.revision[3] << 24)) << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " MAIN MENU " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. Human body detection " << endl; + cout << "2. Hand detection " << endl; + cout << "3. Face detection " << endl; + cout << "4. Age estimation " << endl; + cout << "5. Face direction estimation " << endl; + cout << "6. Gender estimation " << endl; + cout << "7. Gaze estimation " << endl; + cout << "8. Blink estimation " << endl; + cout << "9. Expression estimation " << endl; + cout << "10. Face recognition " << endl; + cout << "11. All (1 to 10) " << endl; + cout << "12. Settings " << endl; + cout << "*************************************************************" << endl; + ret = takeSelectedMultiChoiceInput("select values separated by spaces if multi choice for 1-12: ",digitValues,1,12); + + if(ret != true){ + break; + } + + execFlag = 0; + displaySamples = 1; + for(i=0;i < digitValues.size();i++){ + switch(digitValues[i]){ + case HUMAN_BODY_DETECT: + execFlag |= HVC_ACTIV_BODY_DETECTION; + break; + case HAND_DETECT: + execFlag |= HVC_ACTIV_HAND_DETECTION; + break; + case FACE_DETECT: + execFlag |= HVC_ACTIV_FACE_DETECTION; + break; + case AGE_ESTIMATE: + execFlag |= HVC_ACTIV_AGE_ESTIMATION; + break; + case FACE_DIRECTION: + execFlag |= HVC_ACTIV_FACE_DIRECTION; + break; + case GENDER_ESTIMATE: + execFlag |= HVC_ACTIV_GENDER_ESTIMATION; + break; + case GAZE_ESTIMATE: + execFlag |= HVC_ACTIV_GAZE_ESTIMATION; + break; + case BLINK_ESTIMATE: + execFlag |= HVC_ACTIV_BLINK_ESTIMATION; + break; + case EXPRESSION_ESTIMATE: + execFlag |= HVC_ACTIV_EXPRESSION_ESTIMATION; + break; + case FACE_RECOGNITION: + execFlag |= HVC_ACTIV_FACE_RECOGNITION; + break; + case ALL: + // Update all flags + execFlag |= HVC_ACTIV_BODY_DETECTION | HVC_ACTIV_HAND_DETECTION | HVC_ACTIV_FACE_DETECTION | HVC_ACTIV_FACE_DIRECTION | + HVC_ACTIV_AGE_ESTIMATION | HVC_ACTIV_GENDER_ESTIMATION | HVC_ACTIV_GAZE_ESTIMATION | HVC_ACTIV_BLINK_ESTIMATION | + HVC_ACTIV_EXPRESSION_ESTIMATION | HVC_ACTIV_FACE_RECOGNITION; + break; + case SETTINGS: + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " Settings " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. Get camera angle " << endl; + cout << "2. Set camera angle " << endl; + cout << "3. Get threshold value " << endl; + cout << "4. Set threshold value " << endl; + cout << "5. Get detection size " << endl; + cout << "6. Set detection size " << endl; + cout << "7. Get face angle " << endl; + cout << "8. Set face angle " << endl; + cout << "9. Set uart forwarding rate " << endl; + cout << "10. Get stb library status " << endl; + cout << "11. Set stb library status " << endl; + cout << "12. Get stb version " << endl; + cout << "13. Set stb maximum retry count(TR) " << endl; + cout << "14. Get stb maximum retry count(TR) " << endl; + cout << "15. Set stb rectangle steadiness parameter(TR) " << endl; + cout << "16. Get stb rectangle steadiness parameter(TR) " << endl; + cout << "17. Set stb estimation result stabilizing threshold value(PE)" << endl; + cout << "18. Get stb estimation result stabilizing threshold value(PE)" << endl; + cout << "19. Set stb estimation result stabilizing angle(PE) " << endl; + cout << "20. Get stb estimation result stabilizing angle(PE) " << endl; + cout << "21. Set stb age/gender estimation complete frame count(PE) " << endl; + cout << "22. Get stb age/gender estimation complete frame count(PE) " << endl; + cout << "23. Set stb recognition stabilizing threshold value(FR) " << endl; + cout << "24. Get stb recognition stabilizing threshold value(FR) " << endl; + cout << "25. Set stb recognition stabilizing angle(FR) " << endl; + cout << "26. Get stb recognition stabilizing angle(FR) " << endl; + cout << "27. Set stb recognition stabilizing complete frame count(FR) " << endl; + cout << "28. Get stb recognition stabilizing complete frame count(FR) " << endl; + cout << "29. Set stb recognition minimum account ratio(FR) " << endl; + cout << "30. Get stb recognition minimum account ratio(FR) " << endl; + cout << "31. Clear stb frame result " << endl; + cout << "*************************************************************" << endl; + + displaySamples = 0; + ret = takeSelectedInput("Select from the list of settings : ",sub_choice,1,31); + + if(ret != true){ + break; + } + + switch(sub_choice){ + case 1: // Get camera angle + returnStatus = sensor.getCameraAngle(timeout, cameraAngle); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get camera Angle with error code : " << returnStatus << endl; + break; + } + + switch(cameraAngle){ + + case 0: // 0 + cout << "Camera Angle is 0 degree." << endl; + break; + case 1: // 90 + cout << "Camera Angle is 90 degree." << endl; + break; + case 2: // 180 + cout << "Camera Angle is 180 degree." << endl; + break; + case 3: // 270 + cout << "Camera Angle is 270 degree." << endl; + break; + default: + cout << "Invalid Camera Angle Received." << endl; + + }//end switch getCameraAngle + + break; + case 2: // Set camera angle + + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " Camera Angles " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. 0 degree " << endl; + cout << "2. 90 degree " << endl; + cout << "3. 180 degree " << endl; + cout << "4. 270 degree " << endl; + cout << "*************************************************************" << endl; + + ret = takeSelectedInput("Select from the list of Camera Angles :",input,1,4); + + if(ret != true){ + break; + } + + cameraAngle = (input - 1); + + returnStatus = sensor.setCameraAngle(timeout,cameraAngle); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set camera angle with error code : " << returnStatus << endl; + break; + } + + if(cameraAngle == 0){ + cout << "Camera Angle : 0 set successfully" << endl; + }else if(cameraAngle == 1){ + cout << "Camera Angle : 90 set successfully" << endl; + }else if(cameraAngle == 2){ + cout << "Camera Angle : 180 set successfully" << endl; + }else if(cameraAngle == 3){ + cout << "Camera Angle : 270 set successfully" << endl; + }else{ + cout << "Invalid Camera Angle set." << endl; + } + + break; + case 3: // Get threshold value + + returnStatus = sensor.getThreshold(timeout, threshold); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get Threshold value with error code : " << returnStatus << endl; + break; + } + + cout << "Threshold Value of Human Body Detection is : " << threshold.bdThreshold << endl; + cout << "Threshold Value of Hand Detection is : " << threshold.hdThreshold << endl; + cout << "Threshold Value of Face Detection is : " << threshold.dtThreshold << endl; + cout << "Threshold Value of Face Recognition is : " << threshold.rsThreshold << endl; + + break; + + case 4: // Set threshold value + + // Human Body Detection + ret = takeSelectedInput("Input Threshold value for Human Body Detection : ",input,1,1000); + + if(ret != true){ + break; + } + + threshold.bdThreshold = input; + + // Hand Detection + ret = takeSelectedInput("Input Threshold value for Hand Detection : ",input,1,1000); + + if(ret != true){ + break; + } + + threshold.hdThreshold = input; + + // Face Detection + ret = takeSelectedInput("Input Threshold value for Face Detection : ",input,1,1000); + + if(ret != true){ + break; + } + + threshold.dtThreshold = input; + + // Face Recognition + ret = takeSelectedInput("Input Threshold value for Face Recognition : ",input,1,1000); + + if(ret != true){ + break; + } + + threshold.rsThreshold = input; + + returnStatus = sensor.setThreshold(timeout,threshold); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set threshold value with error code : " << returnStatus << endl; + break; + } + + cout << "Threshold values set successfully." << endl; + + break; + + case 5: // Get detection size + + returnStatus = sensor.getSizeRange(timeout,sizeRange); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get detection size with error code : " << returnStatus << endl; + break; + } + + cout << "Minimum detection size of Human Body Detection is : " << sizeRange.bdMinSize << endl; + cout << "Maximum detection size of Human Body Detection is : " << sizeRange.bdMaxSize << endl; + cout << "Minimum detection size of Hand Detection is : " << sizeRange.hdMinSize << endl; + cout << "Maximum detection size of Hand Detection is : " << sizeRange.hdMaxSize << endl; + cout << "Minimum detection size of Face Detection is : " << sizeRange.dtMinSize << endl; + cout << "Maximum detection size of Face Detection is : " << sizeRange.dtMaxSize << endl; + + break; + + case 6: // Set detection size + + ret = takeSelectedInput("Minimum detection size of Human Body Detection : ",input,20,8192); + + if(ret != true){ + break; + } + + sizeRange.bdMinSize = input; + + ret = takeSelectedInput("Maximum detection size of Human Body Detection : ",input,20,8192); + + if(ret != true){ + break; + } + + sizeRange.bdMaxSize = input; + + ret = takeSelectedInput("Minimum detection size of Hand Detection : ",input,20,8192); + + if(ret != true){ + break; + } + + sizeRange.hdMinSize = input; + + ret = takeSelectedInput("Maximum detection size of Hand Detection : ",input,20,8192); + + if(ret != true){ + break; + } + + sizeRange.hdMaxSize = input; + + ret = takeSelectedInput("Minimum detection size of Face Detection : ",input,20,8192); + + if(ret != true){ + break; + } + + sizeRange.dtMinSize = input; + + ret = takeSelectedInput("Maximum detection size of Face Detection : ",input,20,8192); + + if(ret != true){ + break; + } + + sizeRange.dtMaxSize = input; + + returnStatus = sensor.setSizeRange(timeout,sizeRange); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set detection size with error code : " << returnStatus << endl; + break; + } + + cout << "Detection size set successfully." << endl; + + break; + + case 7: // Get face angle + + returnStatus = sensor.getFaceDetectionAngle(timeout,pose,angle); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get Face Detetion Angle with error code : " << returnStatus << endl; + break; + } + + if(pose == 0) cout << "Face Detection pose is : 30 degree" << endl; + else if(pose == 1) cout << "Face Detection pose is : 60 degree" << endl; + else if(pose == 2) cout << "Face Detection pose is : 90 degree" << endl; + else cout << "Invalid Face Detection pose." << endl; + + if(angle == 0) cout << "Face Detection angle is : 15 degree" << endl; + else if(angle == 1) cout << "Face Detection angle is : 45 degre" << endl; + else cout << "Invalid Face Detection angle." << endl; + + break; + case 8: // Set face angle + + //Pose + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " Pose " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. 30 degree " << endl; + cout << "2. 60 degree " << endl; + cout << "3. 90 degree " << endl; + cout << "*************************************************************" << endl; + + ret = takeSelectedInput("Select from the list of Pose : ",input,1,3); + + if(ret != true){ + break; + } + + pose = (input - 1); + + //Angle + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " Angle " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. 15 degree " << endl; + cout << "2. 45 degree " << endl; + cout << "*************************************************************" << endl; + + ret = takeSelectedInput("Select from the list of Angle : ",input,1,2); + + if(ret != true){ + break; + } + + angle = (input - 1); + + returnStatus = sensor.setFaceDetectionAngle(timeout,pose,angle); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set face detection angle with error code : " << returnStatus << endl; + break; + } + + cout << "Face Detection Angle set Successfully." << endl; + + break; + + case 9: // Set uart forwarding rate + + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " BaudRates " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. 9600 " << endl; + cout << "2. 38400 " << endl; + cout << "3. 115200 " << endl; + cout << "4. 230400 " << endl; + cout << "5. 460800 " << endl; + cout << "6. 921600 " << endl; + cout << "*************************************************************" << endl; + + ret = takeSelectedInput("Select from the list of BaudRates : ",input,1,6); + + if(ret != true){ + break; + } + + switch(input){ + + case 1: // 9600 + baudRate = HVC_UART_BAUD_RATE_9600; + break; + + case 2: // 38400 + baudRate = HVC_UART_BAUD_RATE_38400; + break; + + case 3: // 115200 + baudRate = HVC_UART_BAUD_RATE_115200; + break; + + case 4: // 230400 + baudRate = HVC_UART_BAUD_RATE_230400; + break; + + case 5: // 460800 + baudRate = HVC_UART_BAUD_RATE_460800; + break; + + case 6: // 921600 + baudRate = HVC_UART_BAUD_RATE_921600; + break; + + default: + cout << "Invalid choice. Please select from 1 to 6." << endl; + + }//end input switch set baudrate + + returnStatus = sensor.setBaudRate(timeout,baudRate); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set BaudRate with error code : " << returnStatus << endl; + break; + } + + cout << "BaudRate " << baudRate << " set successfully." << endl; + + break; + + case 10: // Get stb library status + + returnStatus = sensor.getSTBStatus(stbStatus); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get stablization library status with error code : " << returnStatus << endl; + break; + } + + if(stbStatus == 0){ + cout << "STB Library status is : OFF" << endl; + }else if(stbStatus){ + cout << "STB Library status is : ON" << endl; + } + + break; + + case 11: // Set stb library status + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << " STB Library Status " << endl; + cout << "*************************************************************" << endl; + cout << "*************************************************************" << endl; + cout << "1. Body Tracking " << endl; + cout << "2. Face Tracking " << endl; + cout << "3. Face Direction " << endl; + cout << "4. Age Estimation " << endl; + cout << "5. Gender Estimation " << endl; + cout << "6. Gaze Estimation " << endl; + cout << "7. Blink Estimation " << endl; + cout << "8. Expression Estimation " << endl; + cout << "9. Face Recognition " << endl; + cout << "10. All " << endl; + cout << "11. Disable " << endl; + cout << "*************************************************************" << endl; + ret = takeSelectedMultiChoiceInput("select values separated by spaces if multi choice : ",digitValues,1,11); + + if(ret != true){ + break; + } + stbStatus = 0; + for(i=0;i < digitValues.size();i++){ +#if DEBUG_PRINT + std::cout << "DEBUG: Processing values " << digitValues[i] << std::endl; +#endif + switch(digitValues[i]){ + case 1: // Body Tracking + stbStatus |= STB_FUNC_BD; + break; + case 2: // Face Tracking + stbStatus |= STB_FUNC_DT; + break; + case 3: // Face Direction + stbStatus |= STB_FUNC_PT; + break; + case 4: // Age Estimation + stbStatus |= STB_FUNC_AG; + break; + case 5: // Gender Estimation + stbStatus |= STB_FUNC_GN; + break; + case 6: // Gaze Estimation + stbStatus |= STB_FUNC_GZ; + break; + case 7: // Blink Estimation + stbStatus |= STB_FUNC_BL; + break; + case 8: // Expression Estimation + stbStatus |= STB_FUNC_EX; + break; + case 9: // Face Recognition + stbStatus |= STB_FUNC_FR; + break; + case 10: // All + stbStatus |= STB_FUNC_BD | STB_FUNC_DT | STB_FUNC_PT | STB_FUNC_AG | STB_FUNC_GN | STB_FUNC_GZ | STB_FUNC_BL | STB_FUNC_EX | STB_FUNC_FR; + break; + case 11: // Disable + stbStatus = 0; + break; + default: + cout << "Invalid choice. Please select from 1 to 11." << endl; + break; + }//end input switch set baudrate + }//End of for loop + returnStatus = sensor.setSTBStatus(stbStatus); + + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set STB library status with error code : " << returnStatus << endl; + break; + } + + cout << "STB library status set successfully." << endl; + break; + case 12:// Get stb version + returnStatus = sensor.stbGetVersion(&majorVersion, &minorVersion); + if(returnStatus != B5T_STATUS_SUCCESS){ + break; + } + cout << "STB version:" << unsigned(majorVersion) << "." << unsigned(minorVersion) << endl; + break; + case 13:// Set stb maximum retry count(TR) + ret = takeDigitInput("Enter value of maximum retry count: ", maxRetryCount); + if(ret != true){ + break; + } + returnStatus = sensor.stbSetTrRetryCount(maxRetryCount); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set stb maximum retry count(TR)" << endl; + break; + } + cout << "Stb maximum retry count(TR) set successfully" << endl; + break; + case 14:// Get stb maximum retry count(TR) + returnStatus = sensor.stbGetTrRetryCount(&maxRetryCount); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get stb maximum retry count(TR)" << endl; + break; + } + cout << "Stb maximum retry count(TR) = " << maxRetryCount << endl; + break; + case 15:// Set stb rectangle steadiness parameter(TR) + ret = takeDigitInput("Enter value of Rectangle position steadiness parameter: ", posSteadinessParam); + if(ret != true){ + break; + } + ret = takeDigitInput("Enter value of Rectangle size steadiness parameter: ", sizeSteadinessParam); + if(ret != true){ + break; + } + returnStatus = sensor.stbSetTrSteadinessParam(posSteadinessParam,sizeSteadinessParam); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set stb rectangle steadiness parameter(TR)" << endl; + break; + } + cout << "Stb rectangle steadiness parameter(TR) set successfully." << endl; + break; + case 16:// Get stb rectangle steadiness parameter(TR) + returnStatus = sensor.stbGetTrSteadinessParam(&posSteadinessParam, &sizeSteadinessParam); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get stb rectangle steadiness parameter(TR)" << endl; + break; + } + cout << "Rectangle position steadiness = " << posSteadinessParam << endl; + cout << "Rectangle size steadiness = " << sizeSteadinessParam << endl; + break; + case 17:// Set stb estimation result stabilizing threshold value(PE) + ret = takeDigitInput("Enter threshold value : ", thresholdValue); + if(ret != true){ + break; + } + returnStatus = sensor.stbSetPeThresholdUse(thresholdValue); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set stb estimation result stabilizing threshold value(PE)" << endl; + break; + } + cout << "Stb estimation result stabilizing threshold value(PE) set successfully." << endl; + break; + case 18:// Get stb estimation result stabilizing threshold value(PE) + returnStatus = sensor.stbGetPeThresholdUse(&thresholdValue); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get stb estimation result stabilizing threshold value(PE)" << endl; + break; + } + cout << "Stb estimation result stabilizing threshold value(PE) =" << thresholdValue; + break; + case 19:// Set stb estimation result stabilizing angle(PE) + ret = takeDigitInput("Enter Minimum up-down angle of face: ",udAngleMin); + if(ret != true){ + break; + } + ret = takeDigitInput("Enter Maximum up-down angle of face: ",udAngleMax); + if(ret != true){ + break; + } + ret = takeDigitInput("Enter Minimum left-right angle of face: ",lrAngleMin); + if(ret != true){ + break; + } + ret = takeDigitInput("Enter Maximum left-right angle of face: ",lrAngleMax); + if(ret != true){ + break; + } + returnStatus = sensor.stbSetPeAngleUse(udAngleMin, udAngleMax, lrAngleMin, lrAngleMax); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set stb estimation result stabilizing angle(PE)" << endl; + break; + } + cout << "Stb estimation result stabilizing angle(PE) set successfully" << endl; + break; + case 20:// Get stb estimation result stabilizing angle(PE) + returnStatus = sensor.stbGetPeAngleUse(&udAngleMin,&udAngleMax, &lrAngleMin, &lrAngleMax); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get stb estimation result stabilizing angle(PE)" << endl; + break; + } + cout << "Minimum up-down angle of face = " << udAngleMin << endl; + cout << "Maximum up-down angle of face = " << udAngleMax << endl; + cout << "Minimum left-right angle of face = " << lrAngleMin << endl; + cout << "Maximum left-right angle of face = " << lrAngleMax << endl; + break; + case 21:// Set stb age/gender estimation complete frame count(PE) + ret = takeDigitInput("Enter frame count : ",frameCount); + if(ret != true){ + break; + } + returnStatus = sensor.stbSetPeCompleteFrameCount(frameCount); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set stb age/gender estimation complete frame count(PE)" << endl; + break; + } + cout << "Stb age/gender estimation complete frame count(PE) set successfully." << endl; + break; + case 22:// Get stb age/gender estimation complete frame count(PE) + returnStatus = sensor.stbGetPeCompleteFrameCount(&frameCount); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get stb age/gender estimation complete frame count(PE)" << endl; + break; + } + cout << "Stb age/gender estimation complete frame count(PE) = " << frameCount << endl; + break; + case 23:// Set stb recognition stabilizing threshold value(FR) + ret = takeDigitInput("Enter threshold value : ",thresholdValue); + if(ret != true){ + break; + } + returnStatus = sensor.stbSetFrThresholdUse(thresholdValue); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set stb recognition stabilizing threshold value(FR)" << endl; + break; + } + cout << "Stb recognition stabilizing threshold value(FR) set successfully." << endl; + break; + case 24:// Get stb recognition stabilizing threshold value(FR) + returnStatus = sensor.stbGetFrThresholdUse(&thresholdValue); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get stb recognition stabilizing threshold value(FR)" << endl; + break; + } + cout << "Threshold value = " << thresholdValue << endl; + break; + case 25:// Set stb recognition stabilizing angle(FR) + ret = takeDigitInput("Enter Minimum up-down angle of face: ",udAngleMin); + if(ret != true){ + break; + } + ret = takeDigitInput("Enter Maximum up-down angle of face: ",udAngleMax); + if(ret != true){ + break; + } + ret = takeDigitInput("Enter Minimum left-right angle of face: ",lrAngleMin); + if(ret != true){ + break; + } + ret = takeDigitInput("Enter Maximum left-right angle of face: ",lrAngleMax); + if(ret != true){ + break; + } + returnStatus = sensor.stbSetFrAngleUse(udAngleMin, udAngleMax, lrAngleMin, lrAngleMax); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set stb recognition stabilizing angle(FR)" << endl; + break; + } + cout << "Stb recognition stabilizing angle(FR) set successfully." << endl; + break; + case 26:// Get stb recognition stabilizing angle(FR) + returnStatus = sensor.stbGetFrAngleUse(&udAngleMin,&udAngleMax, &lrAngleMin, &lrAngleMax); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get stb estimation result stabilizing angle(PE)" << endl; + break; + } + cout << "Minimum up-down angle of face = " << udAngleMin << endl; + cout << "Maximum up-down angle of face = " << udAngleMax << endl; + cout << "Minimum left-right angle of face = " << lrAngleMin << endl; + cout << "Maximum left-right angle of face = " << lrAngleMax << endl; + break; + case 27:// Set stb recognition stabilizing complete frame count(FR) + ret = takeDigitInput("Enter frame count : ",frameCount); + if(ret != true){ + break; + } + returnStatus = sensor.stbSetFrCompleteFrameCount(frameCount); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set stb age/gender estimation complete frame count(PE)" << endl; + break; + } + cout << "Stb recognition stabilizing complete frame count(FR) set successfully." << endl; + break; + case 28:// Get stb recognition stabilizing complete frame count(FR) + returnStatus = sensor.stbGetFrCompleteFrameCount(&frameCount); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get stb recognition stabilizing complete frame count(FR)" << endl; + break; + } + cout << "Frame count = " << frameCount << endl; + break; + case 29:// Set stb recognition minimum account ratio(FR) + ret = takeDigitInput("Enter minimum account ratio : ", minRatio); + if(ret != true){ + break; + } + returnStatus = sensor.stbSetFrMinRatio(minRatio); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to set stb recognition minimum account ratio(FR)" << endl; + break; + } + cout << "Stb recognition minimum account ratio(FR) set successfully" << endl; + break; + case 30:// Get stb recognition minimum account ratio(FR) + returnStatus = sensor.stbGetFrMinRatio(&minRatio); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get stb recognition minimum account ratio(FR)" << endl; + break; + } + cout << "Account ratio = " << minRatio << endl; + break; + case 31:// Clear stb frame result + returnStatus = sensor.stbClear(); + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to clear stb frame result" << endl; + break; + } + cout << "Stb frame result cleared successfully." << endl; + break; + }//end sub_choice switch + if(ret == true){ + takeEnterInput(); + } + }// end choice switch + }//End of for + + if(displaySamples){ + cout << "************************************************************\r\n"; + cout << "Please enter display time in ms \r\n"; + cout << "************************************************************\r\n"; + + try{ + isCinWaitState = 1; + // Update sleep time variable + cin.clear(); // reset badbit + cin.exceptions(std::ios_base::badbit); + cin >> sleep_time; + }catch (std::ios_base::failure& fail){ +#if DEBUG_PRINT + std::cout << "Exception called display time" << std::endl; +#endif + } + isCinWaitState = 0; + //exitFlag = 0; + //Check STB current status + stbStatus = 0; + returnStatus = sensor.getSTBStatus(stbStatus); + if((stbStatus & STB_FUNC_DT) && (stbStatus & STB_FUNC_PT)){ + stbStatus = stbStatus | STB_FUNC_AG | STB_FUNC_GN | STB_FUNC_GZ | STB_FUNC_BL | STB_FUNC_EX | STB_FUNC_FR; + } + if(returnStatus != B5T_STATUS_SUCCESS){ + cout << "Failed to get stablization library status with error code : " << returnStatus << endl; + //break; + } +#if DEBUG_PRINT + std::cout << "DEBUG: stbStatus = " << stbStatus << std::endl; +#endif + while(exitFlag < 2){ + if(exitFlag == 1){ + try{ + isCinWaitState = 1; + cin.exceptions(std::ios_base::badbit); + std::cin.ignore(1000,'\n'); + cin.clear(); + cout << "Press enter to continue Main menu or press ctrl + c to exit from application." << endl; + cin.get(); + exitFlag = 0; + }catch (std::ios_base::failure& fail){ +#if DEBUG_PRINT + std::cout << "Exception called" << std::endl; +#endif + } + isCinWaitState = 0; + break; + } + cout << "*************************************************************" << endl; + cout << "Detecting user. Please pay attention to camera, and wait for sometime." << endl; + cout << "*************************************************************" << endl; + cout << "Timestamp : "; + // Get date and time + gettimeofday(&value, NULL); + curtime=value.tv_sec; + strftime(dateAndTime,30,"[%F %T.",localtime(&curtime)); + cout << dateAndTime << std::setfill('0') << std::setw(3) << std::dec << value.tv_usec/1000 << "] " << endl; + cout << "*************************************************************" << endl; + + // Call exececute detection API based on STB init status + if(stbStatus == 0){ + returnStatus = sensor.executeDetection(timeout, execFlag, imageNum, hvcResult); + } + else{ + returnStatus = sensor.executeDetection(timeout, execFlag, imageNum, hvcResult, &outSTBFaceCount, &outSTBFaceResult, &outSTBBodyCount, &outSTBBodyResult); + INT32 i; + // Assign STB results + if(returnStatus == B5T_STATUS_SUCCESS){ +#if DEBUG_PRINT + std::cout << "DEBUG: outSTBBodyCount= " << outSTBBodyCount << std::endl; + std::cout << "DEBUG: outSTBFaceCount= " << outSTBFaceCount << std::endl; +#endif + if((execFlag & HVC_ACTIV_BODY_DETECTION) && (stbStatus & STB_FUNC_BD)){ + for(i = 0; i < outSTBBodyCount; i++ ){ + if ( hvcResult.bdResult.num <= i ) break; + nIndex = outSTBBodyResult[i].nDetectID; + hvcResult.bdResult.bdResult[nIndex].posX = (short)outSTBBodyResult[i].center.x; + hvcResult.bdResult.bdResult[nIndex].posY = (short)outSTBBodyResult[i].center.y; + hvcResult.bdResult.bdResult[nIndex].size = outSTBBodyResult[i].nSize; + } + } + for(i = 0; i < outSTBFaceCount; i++ ){ + if ( hvcResult.fdResult.num <= i ) break; + nIndex = outSTBFaceResult[i].nDetectID; +#if DEBUG_PRINT + std::cout << "DEBUG: outSTBFaceResult[i].nDetectID= " << outSTBFaceResult[i].nDetectID << std::endl; + std::cout << "DEBUG: outSTBFaceResult[i].nTrackingID= " << outSTBFaceResult[i].nTrackingID << std::endl; +#endif + if((execFlag & HVC_ACTIV_FACE_DETECTION) && (stbStatus & STB_FUNC_DT)){ +#if DEBUG_PRINT + std::cout << "outSTBFaceResult[i].center.x = " << outSTBFaceResult[i].center.x<< std::endl; + std::cout << "outSTBFaceResult[i].center.y = " << outSTBFaceResult[i].center.y<< std::endl; + std::cout << "outSTBFaceResult[i].nSize = " << outSTBFaceResult[i].nSize << std::endl; +#endif + hvcResult.fdResult.fcResult[nIndex].dtResult.posX = (short)outSTBFaceResult[i].center.x; + hvcResult.fdResult.fcResult[nIndex].dtResult.posY = (short)outSTBFaceResult[i].center.y; + hvcResult.fdResult.fcResult[nIndex].dtResult.size = outSTBFaceResult[i].nSize; + } + if((execFlag & HVC_ACTIV_FACE_DIRECTION) && (stbStatus & STB_FUNC_PT) && (outSTBFaceResult[i].direction.status >= STB_STATUS_COMPLETE)){ +#if DEBUG_PRINT + std::cout << "outSTBFaceResult[i].direction.yaw = "<< outSTBFaceResult[i].direction.yaw << std::endl; + std::cout << "outSTBFaceResult[i].direction.pitch = "<< outSTBFaceResult[i].direction.pitch << std::endl; + std::cout << "outSTBFaceResult[i].direction.roll = "<< outSTBFaceResult[i].direction.roll << std::endl; + std::cout << "outSTBFaceResult[i].direction.confidence = "<< outSTBFaceResult[i].direction.conf << std::endl; +#endif + hvcResult.fdResult.fcResult[nIndex].dirResult.yaw = outSTBFaceResult[i].direction.yaw; + hvcResult.fdResult.fcResult[nIndex].dirResult.pitch = outSTBFaceResult[i].direction.pitch; + hvcResult.fdResult.fcResult[nIndex].dirResult.roll = outSTBFaceResult[i].direction.roll; + hvcResult.fdResult.fcResult[nIndex].dirResult.confidence = outSTBFaceResult[i].direction.conf; + } + if((execFlag & HVC_ACTIV_AGE_ESTIMATION) && (stbStatus & STB_FUNC_AG) && (outSTBFaceResult[i].age.status >= STB_STATUS_COMPLETE)){ + hvcResult.fdResult.fcResult[nIndex].ageResult.confidence += 10000; // During + if ( outSTBFaceResult[i].age.status >= STB_STATUS_COMPLETE ) { +#if DEBUG_PRINT + std::cout << "outSTBFaceResult[i].age.value = " << outSTBFaceResult[i].age.value << std::endl; +#endif + hvcResult.fdResult.fcResult[nIndex].ageResult.age = outSTBFaceResult[i].age.value; + hvcResult.fdResult.fcResult[nIndex].ageResult.confidence += 10000; // Complete + } + } + if((execFlag & HVC_ACTIV_GENDER_ESTIMATION) && (stbStatus & STB_FUNC_GZ) && (outSTBFaceResult[i].gender.status >= STB_STATUS_COMPLETE)){ + hvcResult.fdResult.fcResult[nIndex].genderResult.confidence += 10000; // During + if ( outSTBFaceResult[i].gender.status >= STB_STATUS_COMPLETE ) { +#if DEBUG_PRINT + std::cout << "outSTBFaceResult[i].gender.value"<< outSTBFaceResult[i].gender.value <= 20000){ + cout << " Confidence : " << hvcResult.fdResult.fcResult[loop].ageResult.confidence - 20000 << " (*)"<< endl; + }else if(hvcResult.fdResult.fcResult[loop].ageResult.confidence >= 10000){ + cout << " Confidence : " << hvcResult.fdResult.fcResult[loop].ageResult.confidence - 10000 << " (-)"<< endl; + }else{ + cout << " Confidence : " << hvcResult.fdResult.fcResult[loop].ageResult.confidence << " (x)"<= 20000){ + cout << " Confidence : " << hvcResult.fdResult.fcResult[loop].genderResult.confidence - 20000 << " (*)"<< endl; + }else if(hvcResult.fdResult.fcResult[loop].genderResult.confidence >= 10000){ + cout << " Confidence : " << hvcResult.fdResult.fcResult[loop].genderResult.confidence - 10000 << " (-)" <= 20000){ + cout << " Confidence : " << hvcResult.fdResult.fcResult[loop].recognitionResult.confidence - 20000 << endl; + }else if(hvcResult.fdResult.fcResult[loop].recognitionResult.confidence >= 10000){ + cout << " Confidence : " << hvcResult.fdResult.fcResult[loop].recognitionResult.confidence - 10000 << endl; + }else{ + cout << " Confidence : " << hvcResult.fdResult.fcResult[loop].recognitionResult.confidence << endl; + } + }else{ + cout << " Confidence : " << hvcResult.fdResult.fcResult[loop].recognitionResult.confidence << endl; + } + } + } + }//face count for loop + usleep(sleep_time); + }//end while + + }//End of if displaySample + }while((exitFlag < 2)); + + return 0; + +}//end main + + diff --git a/src/b5t007001/CMakeLists.txt b/src/b5t007001/CMakeLists.txt new file mode 100644 index 00000000..74f39097 --- /dev/null +++ b/src/b5t007001/CMakeLists.txt @@ -0,0 +1,11 @@ +set (libname "b5t007001") +set (libdescription "B5T HVC Sensor") + +add_subdirectory(stblib) + +set (module_src ${libname}.cxx) +set (module_hpp ${libname}.hpp stblib/usr_include/STBAPI.h stblib/usr_include/STBCommonDef.h stblib/usr_include/STBTypedef.h) + +include_directories("stblib/src/include/") +include_directories("stblib/usr_include") +upm_module_init(stblib) diff --git a/src/b5t007001/b5t007001 b/src/b5t007001/b5t007001 new file mode 100644 index 00000000..5f757ceb Binary files /dev/null and b/src/b5t007001/b5t007001 differ diff --git a/src/b5t007001/b5t007001.cxx b/src/b5t007001/b5t007001.cxx new file mode 100644 index 00000000..f9a1eb27 --- /dev/null +++ b/src/b5t007001/b5t007001.cxx @@ -0,0 +1,1750 @@ +/* +* Author: Takashi Kakiuchi +* Copyright (c) 2019 Omron Electronic Components - Americas +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of +* this software and associated documentation files (the "Software"), to deal in +* the Software without restriction, including without limitation the rights to +* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +* the Software, and to permit persons to whom the Software is furnished to do so, +* subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all +* copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#include "b5t007001.hpp" +#include +#include + +using namespace upm; + +/** + * Command number + */ +#define HVC_COM_GET_VERSION (UINT8)0x00 +#define HVC_COM_SET_CAMERA_ANGLE (UINT8)0x01 +#define HVC_COM_GET_CAMERA_ANGLE (UINT8)0x02 +#define HVC_COM_EXECUTE (UINT8)0x03 +#define HVC_COM_EXECUTEEX (UINT8)0x04 +#define HVC_COM_SET_THRESHOLD (UINT8)0x05 +#define HVC_COM_GET_THRESHOLD (UINT8)0x06 +#define HVC_COM_SET_SIZE_RANGE (UINT8)0x07 +#define HVC_COM_GET_SIZE_RANGE (UINT8)0x08 +#define HVC_COM_SET_DETECTION_ANGLE (UINT8)0x09 +#define HVC_COM_GET_DETECTION_ANGLE (UINT8)0x0A +#define HVC_COM_SET_BAUDRATE (UINT8)0x0E +#define HVC_COM_REGISTRATION (UINT8)0x10 +#define HVC_COM_DELETE_DATA (UINT8)0x11 +#define HVC_COM_DELETE_USER (UINT8)0x12 +#define HVC_COM_DELETE_ALL (UINT8)0x13 +#define HVC_COM_GET_PERSON_DATA (UINT8)0x15 +#define HVC_COM_SAVE_ALBUM (UINT8)0x20 +#define HVC_COM_LOAD_ALBUM (UINT8)0x21 +#define HVC_COM_WRITE_ALBUM (UINT8)0x22 + +/** + * HVC frame buffer + */ +#define HVC_UART_FRAME_SIZE 32 + +/** + * RX ignore temp buffer size + */ +#define RX_IGNORE_TEMP_BUF_SIZE 10000 + +/** + * Debug print macro + */ +#define DEBUG_PRINT 0 + +/** + * Header for send signal data + */ +typedef enum { + SEND_HEAD_SYNCBYTE = 0, + SEND_HEAD_COMMANDNO, + SEND_HEAD_DATALENGTHLSB, + SEND_HEAD_DATALENGTHMSB, + SEND_HEAD_NUM +}SEND_HEADER; + +/** + * Header for receive signal data + */ +typedef enum { + RECEIVE_HEAD_SYNCBYTE = 0, + RECEIVE_HEAD_STATUS, + RECEIVE_HEAD_DATALENLL, + RECEIVE_HEAD_DATALENLM, + RECEIVE_HEAD_DATALENML, + RECEIVE_HEAD_DATALENMM, + RECEIVE_HEAD_NUM +}RECEIVE_HEADER; + + + +B5T007001::B5T007001(UINT8 uart,HVC_UART_BAUD_RATE_T inRate){ + //Create UART object + mUart = new mraa::Uart(uart); + mraa::Result returnValue; + + //Check for UART object created well or not + if(mUart == NULL){ + throw std::invalid_argument(std::string(__FUNCTION__) + ": Failed to initialize UART"); + } + //Update baudrate for connected UART + returnValue = mUart->setBaudRate(inRate); + if(returnValue != mraa::SUCCESS){ + throw std::runtime_error(std::string(__FUNCTION__) + + ": failed to set baudrate" ); + } + //STB default disabled + mStbStatus = 0; + + // Init STB Handle + mSTBHandle = NULL; + + //Set default timeout for UART + returnValue = mUart->setTimeout(UART_SETTING_TIMEOUT, UART_SETTING_TIMEOUT, UART_SETTING_TIMEOUT); + if(returnValue != mraa::SUCCESS){ + throw std::runtime_error(std::string(__FUNCTION__) + + ": failed to set timeout" ); + } +} + +B5T007001::~B5T007001() { + //Delete UART instance + delete mUart; + //Deinit SBI library + stbDeInit(); +} + +B5T_STATUS_T B5T007001::UARTSendData(INT32 inDataSize, const UINT8 *inData){ + INT32 outWriteCount; + + if(NULL == inData){ + return B5T_STATUS_INVALID_INPUT; + } + if(inData[0] == 0xFE){ + //Ignore all character on rx line + UARTRxIgnoreAllData(); + } + + //UART write + outWriteCount = mUart->write((const INT8*)inData, inDataSize); + + //Handle error cases + if(-1 == outWriteCount){ + std::cerr << std::string(__FUNCTION__) << ": Write failed with error code =" << outWriteCount << std::endl; + return B5T_STATUS_WRITE_FAILED; + } + else if(inDataSize != outWriteCount){ + std::cerr << std::string(__FUNCTION__) << ": Write failed with un-sufficient data write. Exepected count= " << inDataSize << "And Actual count " << outWriteCount << std::endl; + return B5T_STATUS_WRITE_FAILED; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::UARTReceiveData(INT32 inTimeOutTime, INT32 inDataSize, UINT8 *outResult, UINT8 isSyncRequired){ + INT32 tmpReadCount = 0; + INT32 totalReadCount = 0; + INT32 syncIndex=0, count=0; + totalReadCount = 0; + while(1){ + // Wait for data available on UART +#if DEBUG_PRINT + std::cout << "DEBUG: Before dataAvail" << std::endl; +#endif + if (!mUart->dataAvailable(inTimeOutTime)) + { + std::cerr << __FUNCTION__ << ": Execution interrupted or timeout occurs for response" << std::endl; + return B5T_STATUS_READ_TIMEOUT; + } + // Read data +#if DEBUG_PRINT + std::cout << "DEBUG: Befor read inDataSize =" << inDataSize << "totalReadCount =" << totalReadCount << std::endl; +#endif + tmpReadCount = mUart->read((INT8*)(outResult + totalReadCount), inDataSize - totalReadCount); + if(-1 == tmpReadCount){ + std::cerr << __FUNCTION__ << ": Read failed" << std::endl; + return B5T_STATUS_READ_FAILED; + } + totalReadCount = totalReadCount + tmpReadCount; + if((isSyncRequired == 1) && (outResult[0] != (UINT8)0xFE)){ + syncIndex = 0; + //Remove all bytes before syncbyte +#if DEBUG_PRINT + std::cout << "DEBUG: inDataSize = " << inDataSize << "tmpReadCount = " << tmpReadCount << "totalReadCount = " << totalReadCount << std::endl; + std::cerr << "DEBUG: re-read data as sync byte not received" << std::endl; +#endif + for(count = 0;count < totalReadCount; count++){ + if(outResult[count] == (UINT8)0xFE){ + syncIndex = count; + break; + } + } + if(syncIndex == 0){ +#if DEBUG_PRINT + std::cout << "DEBUG: Ignorring all read count = " << totalReadCount <read((INT8*)tmpBuf, RX_IGNORE_TEMP_BUF_SIZE); + if(-1 == tmpReadCount){ + break; + } +#if DEBUG_PRINT + std::cout << "DEBUG: Deleted data count = " << tmpReadCount << std::endl; +#endif + sleep(1); //Sleep for 1sec as need to receive all data + maxTry++; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::HVCSendCommand(UINT8 inCommandNo, INT32 inDataSize, UINT8 *inData){ + INT32 count; + B5T_STATUS_T ret; + UINT8 sendData[HVC_UART_FRAME_SIZE]; + + //Create header + sendData[SEND_HEAD_SYNCBYTE] = (UINT8)0xFE; + sendData[SEND_HEAD_COMMANDNO] = (UINT8)inCommandNo; + sendData[SEND_HEAD_DATALENGTHLSB] = (UINT8)(inDataSize&0xff); + sendData[SEND_HEAD_DATALENGTHMSB] = (UINT8)((inDataSize>>8)&0xff); + + for(count = 0; count < inDataSize; count++){ + sendData[SEND_HEAD_NUM + count] = inData[count]; + } + + //Send command signal + ret = UARTSendData(SEND_HEAD_NUM+inDataSize, sendData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code =" << ret << std::endl; + return ret; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::HVCReceiveData(INT32 inTimeOutTime, INT32 inDataSize, UINT8 *outResult){ + B5T_STATUS_T ret; + //Check for invalid read size + if(inDataSize <= 0){ + std::cerr << std::string(__FUNCTION__) << ": Invalid input" << std::endl; + return B5T_STATUS_INVALID_INPUT; + } + //Receive data + ret = UARTReceiveData(inTimeOutTime, inDataSize, outResult); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code =" << ret << std::endl; + return ret; + } + return ret; +} + +B5T_STATUS_T B5T007001::HVCReceiveHeader(INT32 inTimeOutTime, INT32 &outDataSize){ + B5T_STATUS_T ret; + UINT8 headerData[HVC_UART_FRAME_SIZE]; + UINT8 outStatus= 0; + + // Get header part + ret = UARTReceiveData(inTimeOutTime, RECEIVE_HEAD_NUM, headerData, 1); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + if((UINT8)0xFE != headerData[RECEIVE_HEAD_SYNCBYTE]){ + std::cerr << std::string(__FUNCTION__) << ": Header invalid data" << std::endl; + return B5T_STATUS_HEADER_INVALID; + } + + // Get data length + outDataSize = headerData[RECEIVE_HEAD_DATALENLL] + + (headerData[RECEIVE_HEAD_DATALENLM]<<8) + + (headerData[RECEIVE_HEAD_DATALENML]<<16) + + (headerData[RECEIVE_HEAD_DATALENMM]<<24); + + //Get command execution result + outStatus = headerData[RECEIVE_HEAD_STATUS]; + + //Check status code + if(0 != outStatus){ + std::cerr << std::string(__FUNCTION__) << ": failed with firmware response code =" << unsigned(outStatus) <>8)&0xff); + sendData[2] = (UINT8)(inDataID&0xff); + ret = HVCSendCommand(HVC_COM_REGISTRATION, sizeof(UINT8)*3, sendData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + // Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + // Receive data + if ( size >= (INT32)sizeof(UINT8)*4 ) { + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*4, recvData); + outImage.width = recvData[0] + (recvData[1]<<8); + outImage.height = recvData[2] + (recvData[3]<<8); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*4; + } + + // Image data + if ( size >= (INT32)sizeof(UINT8)*64*64 ) { + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*64*64, outImage.image); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*64*64; + } + return ret; +} + +B5T_STATUS_T B5T007001::getVersion(INT32 inTimeOutTime, HVC_VERSION &outVersion){ + B5T_STATUS_T ret; + INT32 size = 0; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + //Send GetVersion command signal + ret = HVCSendCommand(HVC_COM_GET_VERSION, 0, NULL); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + //Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + if(size > (INT32)sizeof(HVC_VERSION) ) { + size = sizeof(HVC_VERSION); + } + + // Receive data + ret = HVCReceiveData(inTimeOutTime, size, (UINT8*)&outVersion); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + return ret; +} + +B5T_STATUS_T B5T007001::setCameraAngle(INT32 inTimeOutTime, UINT8 inAngleNo){ + B5T_STATUS_T ret; + INT32 size = 0; + UINT8 sendData[HVC_UART_FRAME_SIZE]; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + + sendData[0] = (UINT8)(inAngleNo&0xff); + //Send SetCameraAngle command signal + ret = HVCSendCommand(HVC_COM_SET_CAMERA_ANGLE, sizeof(UINT8), sendData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + //Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + return ret; +} + +B5T_STATUS_T B5T007001::getCameraAngle(INT32 inTimeOutTime, UINT8 &outAngleNo){ + B5T_STATUS_T ret; + INT32 size = 0; + UINT8 recvData[HVC_UART_FRAME_SIZE]; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + + //Send GetCameraAngle command signal + ret = HVCSendCommand(HVC_COM_GET_CAMERA_ANGLE, 0, NULL); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + //Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + if ( size > (INT32)sizeof(UINT8) ) { + size = sizeof(UINT8); + } + + //Receive data + ret = HVCReceiveData(inTimeOutTime, size, recvData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + outAngleNo = recvData[0]; + + return ret; +} + +B5T_STATUS_T B5T007001::executeDetection(INT32 inTimeOutTime, INT32 inExec, INT32 inImageInfo, HVC_RESULT &outHVCResult,INT32 *outSTBFaceCount, STB_FACE **outSTBFaceResult,INT32 *outSTBBodyCount,STB_BODY **outSTBBodyResult){ + B5T_STATUS_T ret=B5T_STATUS_SUCCESS; +#if DEBUG_PRINT + std::cout << "DEBUG: mStbStatus = " << mStbStatus << std::endl; +#endif + if(inTimeOutTime < 0){ + inTimeOutTime = UART_EXECUTE_TIMEOUT; + } + ret = executeDetection(inTimeOutTime, inExec, inImageInfo, outHVCResult); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + if(mStbStatus == 0){ + return ret; + } +#if DEBUG_PRINT + std::cout << "DEBUG: calling STB " << std::endl; +#endif + ret = stbExec(inExec, outHVCResult, outSTBFaceCount, outSTBFaceResult, outSTBBodyCount, outSTBBodyResult); +#if DEBUG_PRINT + std::cout << "DEBUG: calling STB retStatus" << ret << std::endl; +#endif + return ret; +} + +B5T_STATUS_T B5T007001::executeDetection(INT32 inTimeOutTime, INT32 inExec, INT32 inImageInfo, HVC_RESULT &outHVCResult){ + B5T_STATUS_T ret=B5T_STATUS_SUCCESS; + INT32 i, j; + INT32 size = 0; + UINT8 sendData[HVC_UART_FRAME_SIZE]; + UINT8 recvData[HVC_UART_FRAME_SIZE]; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_EXECUTE_TIMEOUT; + } + + // Send Execute command signal + sendData[0] = (UINT8)(inExec&0xff); + sendData[1] = (UINT8)((inExec>>8)&0xff); + sendData[2] = (UINT8)(inImageInfo&0xff); + ret = HVCSendCommand(HVC_COM_EXECUTEEX, sizeof(UINT8)*3, sendData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + // Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + // Receive result data + if ( size >= (INT32)sizeof(UINT8)*4 ) { + outHVCResult.executedFunc = inExec; + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*4, recvData); + outHVCResult.bdResult.num = recvData[0]; + outHVCResult.hdResult.num = recvData[1]; + outHVCResult.fdResult.num = recvData[2]; + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*4; + } + + // Get Human Body Detection result + for(i = 0; i < outHVCResult.bdResult.num; i++){ + if ( size >= (INT32)sizeof(UINT8)*8 ) { + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*8, recvData); + outHVCResult.bdResult.bdResult[i].posX = (short)(recvData[0] + (recvData[1]<<8)); + outHVCResult.bdResult.bdResult[i].posY = (short)(recvData[2] + (recvData[3]<<8)); + outHVCResult.bdResult.bdResult[i].size = (short)(recvData[4] + (recvData[5]<<8)); + outHVCResult.bdResult.bdResult[i].confidence = (short)(recvData[6] + (recvData[7]<<8)); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*8; + } + } + + // Get Hand Detection result + for(i = 0; i < outHVCResult.hdResult.num; i++){ + if ( size >= (INT32)sizeof(UINT8)*8 ) { + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*8, recvData); + outHVCResult.hdResult.hdResult[i].posX = (short)(recvData[0] + (recvData[1]<<8)); + outHVCResult.hdResult.hdResult[i].posY = (short)(recvData[2] + (recvData[3]<<8)); + outHVCResult.hdResult.hdResult[i].size = (short)(recvData[4] + (recvData[5]<<8)); + outHVCResult.hdResult.hdResult[i].confidence = (short)(recvData[6] + (recvData[7]<<8)); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*8; + } + } + + // Face-related results + for(i = 0; i < outHVCResult.fdResult.num; i++){ + // Face Detection result + if(0 != (outHVCResult.executedFunc & HVC_ACTIV_FACE_DETECTION)){ + if ( size >= (INT32)sizeof(UINT8)*8 ) { + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*8, recvData); + outHVCResult.fdResult.fcResult[i].dtResult.posX = (short)(recvData[0] + (recvData[1]<<8)); + outHVCResult.fdResult.fcResult[i].dtResult.posY = (short)(recvData[2] + (recvData[3]<<8)); + outHVCResult.fdResult.fcResult[i].dtResult.size = (short)(recvData[4] + (recvData[5]<<8)); + outHVCResult.fdResult.fcResult[i].dtResult.confidence = (short)(recvData[6] + (recvData[7]<<8)); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*8; + } + } + + // Face direction + if(0 != (outHVCResult.executedFunc & HVC_ACTIV_FACE_DIRECTION)){ + if ( size >= (INT32)sizeof(UINT8)*8 ) { + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*8, recvData); + outHVCResult.fdResult.fcResult[i].dirResult.yaw = (short)(recvData[0] + (recvData[1]<<8)); + outHVCResult.fdResult.fcResult[i].dirResult.pitch = (short)(recvData[2] + (recvData[3]<<8)); + outHVCResult.fdResult.fcResult[i].dirResult.roll = (short)(recvData[4] + (recvData[5]<<8)); + outHVCResult.fdResult.fcResult[i].dirResult.confidence = (short)(recvData[6] + (recvData[7]<<8)); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*8; + } + } + + // Age + if(0 != (outHVCResult.executedFunc & HVC_ACTIV_AGE_ESTIMATION)){ + if ( size >= (INT32)sizeof(UINT8)*3 ) { + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*3, recvData); + outHVCResult.fdResult.fcResult[i].ageResult.age = (char)(recvData[0]); + outHVCResult.fdResult.fcResult[i].ageResult.confidence = (short)(recvData[1] + (recvData[2]<<8)); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*3; + } + } + + // Gender + if(0 != (outHVCResult.executedFunc & HVC_ACTIV_GENDER_ESTIMATION)){ + if ( size >= (INT32)sizeof(UINT8)*3 ) { + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*3, recvData); + outHVCResult.fdResult.fcResult[i].genderResult.gender = (char)(recvData[0]); + outHVCResult.fdResult.fcResult[i].genderResult.confidence = (short)(recvData[1] + (recvData[2]<<8)); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*3; + } + } + + // Gaze + if(0 != (outHVCResult.executedFunc & HVC_ACTIV_GAZE_ESTIMATION)){ + if ( size >= (INT32)sizeof(UINT8)*2 ) { + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*2, recvData); + outHVCResult.fdResult.fcResult[i].gazeResult.gazeLR = (char)(recvData[0]); + outHVCResult.fdResult.fcResult[i].gazeResult.gazeUD = (char)(recvData[1]); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*2; + } + } + + // Blink + if(0 != (outHVCResult.executedFunc & HVC_ACTIV_BLINK_ESTIMATION)){ + if ( size >= (INT32)sizeof(UINT8)*4 ) { + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*4, recvData); + outHVCResult.fdResult.fcResult[i].blinkResult.ratioL = (short)(recvData[0] + (recvData[1]<<8)); + outHVCResult.fdResult.fcResult[i].blinkResult.ratioR = (short)(recvData[2] + (recvData[3]<<8)); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*4; + } + } + + // Expression + if(0 != (outHVCResult.executedFunc & HVC_ACTIV_EXPRESSION_ESTIMATION)){ + if ( size >= (INT32)sizeof(UINT8)*6 ) { + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*6, recvData); + outHVCResult.fdResult.fcResult[i].expressionResult.topExpression = -128; + outHVCResult.fdResult.fcResult[i].expressionResult.topScore = -128; + for(j = 0; j < 5; j++){ + outHVCResult.fdResult.fcResult[i].expressionResult.score[j] = (char)(recvData[j]); + if(outHVCResult.fdResult.fcResult[i].expressionResult.topScore < outHVCResult.fdResult.fcResult[i].expressionResult.score[j]){ + outHVCResult.fdResult.fcResult[i].expressionResult.topScore = outHVCResult.fdResult.fcResult[i].expressionResult.score[j]; + outHVCResult.fdResult.fcResult[i].expressionResult.topExpression = j + 1; + } + } + outHVCResult.fdResult.fcResult[i].expressionResult.degree = (char)(recvData[5]); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*6; + } + } + + // Face Recognition + if(0 != (outHVCResult.executedFunc & HVC_ACTIV_FACE_RECOGNITION)){ + if ( size >= (INT32)sizeof(UINT8)*4 ) { + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*4, recvData); + outHVCResult.fdResult.fcResult[i].recognitionResult.uid = (short)(recvData[0] + (recvData[1]<<8)); + outHVCResult.fdResult.fcResult[i].recognitionResult.confidence = (short)(recvData[2] + (recvData[3]<<8)); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*4; + } + } + } + + if(HVC_EXECUTE_IMAGE_NONE != inImageInfo){ + // Image data + if ( size >= (INT32)sizeof(UINT8)*4 ) { + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*4, recvData); + outHVCResult.image.width = (short)(recvData[0] + (recvData[1]<<8)); + outHVCResult.image.height = (short)(recvData[2] + (recvData[3]<<8)); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*4; + } + + if ( size >= (INT32)sizeof(UINT8)*outHVCResult.image.width*outHVCResult.image.height ) { + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*outHVCResult.image.width*outHVCResult.image.height, outHVCResult.image.image); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + size -= sizeof(UINT8)*outHVCResult.image.width*outHVCResult.image.height; + } + } + return ret; +} + +B5T_STATUS_T B5T007001::setThreshold(INT32 inTimeOutTime, HVC_THRESHOLD inThreshold){ + B5T_STATUS_T ret; + INT32 size = 0; + UINT8 sendData[HVC_UART_FRAME_SIZE]; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + + sendData[0] = (UINT8)(inThreshold.bdThreshold&0xff); + sendData[1] = (UINT8)((inThreshold.bdThreshold>>8)&0xff); + sendData[2] = (UINT8)(inThreshold.hdThreshold&0xff); + sendData[3] = (UINT8)((inThreshold.hdThreshold>>8)&0xff); + sendData[4] = (UINT8)(inThreshold.dtThreshold&0xff); + sendData[5] = (UINT8)((inThreshold.dtThreshold>>8)&0xff); + sendData[6] = (UINT8)(inThreshold.rsThreshold&0xff); + sendData[7] = (UINT8)((inThreshold.rsThreshold>>8)&0xff); + + //Send SetThreshold command signal + ret = HVCSendCommand(HVC_COM_SET_THRESHOLD, sizeof(UINT8)*8, sendData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + //Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + return ret; +} + +B5T_STATUS_T B5T007001::getThreshold(INT32 inTimeOutTime, HVC_THRESHOLD &outThreshold){ + B5T_STATUS_T ret; + INT32 size = 0; + UINT8 recvData[HVC_UART_FRAME_SIZE]; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + + //Send GetThreshold command signal + ret = HVCSendCommand(HVC_COM_GET_THRESHOLD, 0, NULL); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + //Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + if ( size > (INT32)sizeof(UINT8)*8 ) { + size = sizeof(UINT8)*8; + } + + //Receive data + ret = HVCReceiveData(inTimeOutTime, size, recvData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + outThreshold.bdThreshold = recvData[0] + (recvData[1]<<8); + outThreshold.hdThreshold = recvData[2] + (recvData[3]<<8); + outThreshold.dtThreshold = recvData[4] + (recvData[5]<<8); + outThreshold.rsThreshold = recvData[6] + (recvData[7]<<8); + + return ret; +} + +B5T_STATUS_T B5T007001::setSizeRange(INT32 inTimeOutTime, HVC_SIZERANGE inSizeRange){ + B5T_STATUS_T ret; + INT32 size = 0; + UINT8 sendData[HVC_UART_FRAME_SIZE]; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + + sendData[0] = (UINT8)(inSizeRange.bdMinSize&0xff); + sendData[1] = (UINT8)((inSizeRange.bdMinSize>>8)&0xff); + sendData[2] = (UINT8)(inSizeRange.bdMaxSize&0xff); + sendData[3] = (UINT8)((inSizeRange.bdMaxSize>>8)&0xff); + sendData[4] = (UINT8)(inSizeRange.hdMinSize&0xff); + sendData[5] = (UINT8)((inSizeRange.hdMinSize>>8)&0xff); + sendData[6] = (UINT8)(inSizeRange.hdMaxSize&0xff); + sendData[7] = (UINT8)((inSizeRange.hdMaxSize>>8)&0xff); + sendData[8] = (UINT8)(inSizeRange.dtMinSize&0xff); + sendData[9] = (UINT8)((inSizeRange.dtMinSize>>8)&0xff); + sendData[10] = (UINT8)(inSizeRange.dtMaxSize&0xff); + sendData[11] = (UINT8)((inSizeRange.dtMaxSize>>8)&0xff); + //Send SetSizeRange command signal + ret = HVCSendCommand(HVC_COM_SET_SIZE_RANGE, sizeof(UINT8)*12, sendData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + //Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + return ret; +} + +B5T_STATUS_T B5T007001::getSizeRange(INT32 inTimeOutTime, HVC_SIZERANGE &outSizeRange){ + B5T_STATUS_T ret; + INT32 size = 0; + UINT8 recvData[HVC_UART_FRAME_SIZE]; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + + //Send GetSizeRange command signal + ret = HVCSendCommand(HVC_COM_GET_SIZE_RANGE, 0, NULL); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + //Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + if ( size > (INT32)sizeof(UINT8)*12 ) { + size = sizeof(UINT8)*12; + } + + //Receive data + ret = HVCReceiveData(inTimeOutTime, size, recvData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + outSizeRange.bdMinSize = recvData[0] + (recvData[1]<<8); + outSizeRange.bdMaxSize = recvData[2] + (recvData[3]<<8); + outSizeRange.hdMinSize = recvData[4] + (recvData[5]<<8); + outSizeRange.hdMaxSize = recvData[6] + (recvData[7]<<8); + outSizeRange.dtMinSize = recvData[8] + (recvData[9]<<8); + outSizeRange.dtMaxSize = recvData[10] + (recvData[11]<<8); + + return ret; +} + +B5T_STATUS_T B5T007001::setFaceDetectionAngle(INT32 inTimeOutTime, INT32 inPose, INT32 inAngle){ + B5T_STATUS_T ret; + INT32 size = 0; + UINT8 sendData[HVC_UART_FRAME_SIZE]; + + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + + sendData[0] = (UINT8)(inPose&0xff); + sendData[1] = (UINT8)(inAngle&0xff); + // Send SetFaceDetectionAngle command signal + ret = HVCSendCommand(HVC_COM_SET_DETECTION_ANGLE, sizeof(UINT8)*2, sendData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + // Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + return ret; +} + +B5T_STATUS_T B5T007001::getFaceDetectionAngle(INT32 inTimeOutTime, INT32 &outPose, INT32 &outAngle){ + B5T_STATUS_T ret; + INT32 size = 0; + UINT8 recvData[HVC_UART_FRAME_SIZE]; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + + // Send GetFaceDetectionAngle signal command + ret = HVCSendCommand(HVC_COM_GET_DETECTION_ANGLE, 0, NULL); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + // Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + if ( size > (INT32)sizeof(UINT8)*2 ) { + size = sizeof(UINT8)*2; + } + + // Receive data + ret = HVCReceiveData(inTimeOutTime, size, recvData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + outPose = recvData[0]; + outAngle = recvData[1]; + + return ret; +} + +B5T_STATUS_T B5T007001::setBaudRate(INT32 inTimeOutTime, HVC_UART_BAUD_RATE_T inRate){ + B5T_STATUS_T ret; + INT32 size = 0; + UINT8 sendData[HVC_UART_FRAME_SIZE]; + mraa::Result returnValue; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + + switch(inRate){ + case HVC_UART_BAUD_RATE_9600: + sendData[0] = (UINT8)(0x00); + break; + case HVC_UART_BAUD_RATE_38400: + sendData[0] = (UINT8)(0x01); + break; + case HVC_UART_BAUD_RATE_115200: + sendData[0] = (UINT8)(0x02); + break; + case HVC_UART_BAUD_RATE_230400: + sendData[0] = (UINT8)(0x03); + break; + case HVC_UART_BAUD_RATE_460800: + sendData[0] = (UINT8)(0x04); + break; + case HVC_UART_BAUD_RATE_921600: + sendData[0] = (UINT8)(0x05); + break; + default: + return B5T_STATUS_INVALID_INPUT; + } + + //Send SetBaudRate command signal + ret = HVCSendCommand(HVC_COM_SET_BAUDRATE, sizeof(UINT8), sendData); + if(ret != B5T_STATUS_SUCCESS){ + throw std::runtime_error(std::string(__FUNCTION__) + + ": failed to set baudrate" ); + } + + //Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + throw std::runtime_error(std::string(__FUNCTION__) + + ": failed to set baudrate" ); + } + //Update baudrate for connected UART + returnValue = mUart->setBaudRate(inRate); + if(returnValue != mraa::SUCCESS){ + throw std::runtime_error(std::string(__FUNCTION__) + + ": failed to set baudrate" ); + } + return ret; +} + +B5T_STATUS_T B5T007001::getRegisteredUsersInfo(INT32 inTimeOutTime, std::vector &outUserList, std::vector &outDataList){ + B5T_STATUS_T ret; + UINT8 userID = 0; + UINT8 dataID = 0; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + + //Clear output data if exist + outUserList.clear(); + outDataList.clear(); + + for(userID=0; userID < MAX_USER_NUM; userID++){ + ret = getUserData(inTimeOutTime, userID, dataID); + //printf("DEBUG: HVCGetUserData userID=(%d) dataID=(%d) status = (%d)\n", userID, dataID); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + if(dataID != 0){ + //printf("Adding userId = (%d) dataId = (%d)\n", userID, dataID); + outUserList.push_back(userID); + outDataList.push_back(dataID); + } + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::addUser(INT32 inTimeOutTime, UINT8 inUserID, UINT8 inDataID, HVC_IMAGE &outImage){ + B5T_STATUS_T ret; + UINT8 tmpDataID; + + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + //Add or Modify user + ret = HVCRegistration(inTimeOutTime, inUserID, inDataID, outImage); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + //Check for successful user add + ret = getUserData(inTimeOutTime, inUserID, tmpDataID); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + if(!(tmpDataID & (1 << inDataID))){ + std::cerr << std::string(__FUNCTION__) << ": failed for userID = " << inUserID << "And dataID = " << inDataID << std::endl; + return B5T_STATUS_USER_ADD_FAILED; + } + return ret; +} + +B5T_STATUS_T B5T007001::getUserData(INT32 inTimeOutTime, UINT8 inUserID, UINT8 &outDataNo){ + B5T_STATUS_T ret; + INT32 size = 0; + UINT8 sendData[8]; + UINT8 recvData[8]; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + + //Send Get Registration Info signal command + sendData[0] = (UINT8)(inUserID&0xff); + sendData[1] = (UINT8)((inUserID>>8)&0xff); + ret = HVCSendCommand(HVC_COM_GET_PERSON_DATA, sizeof(UINT8)*2, sendData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + //Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + if (size > (INT32)sizeof(UINT8)*2 ) { + size = sizeof(UINT8)*2; + } + + // Receive data + ret = HVCReceiveData(inTimeOutTime, size, recvData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + outDataNo = recvData[0] + (recvData[1]<<8); + return ret; + +} +B5T_STATUS_T B5T007001::saveAlbumToHost(INT32 inTimeOutTime, UINT8 *outAlbumData, INT32 &outAlbumDataSize){ + B5T_STATUS_T ret; + INT32 size = 0; + + UINT8 *tmpAlbumData = NULL;; + if(NULL == outAlbumData){ + std::cerr << std::string(__FUNCTION__) << ": Invalid input" << std::endl; + return B5T_STATUS_INVALID_INPUT; + } + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SAVE_ALBUM_TIMEOUT; + } + //Send Save Album signal command + ret = HVCSendCommand(HVC_COM_SAVE_ALBUM, 0, NULL); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + if ( size >= (INT32)sizeof(UINT8)*8 + HVC_ALBUM_SIZE_MIN ) { + outAlbumDataSize = size; + tmpAlbumData = outAlbumData; + + do{ + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*4, tmpAlbumData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + tmpAlbumData += sizeof(UINT8)*4; + + ret = HVCReceiveData(inTimeOutTime, sizeof(UINT8)*4, tmpAlbumData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + tmpAlbumData += sizeof(UINT8)*4; + + ret = HVCReceiveData(inTimeOutTime, size - sizeof(UINT8)*8, tmpAlbumData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + }while(0); + } + return ret; +} + +B5T_STATUS_T B5T007001::loadAlbumFromHost(INT32 inTimeOutTime, UINT8 *inAlbumData, INT32 inAlbumDataSize){ + B5T_STATUS_T ret; + INT32 i; + INT32 size = 0; + + if((NULL == inAlbumData) || (0 == inAlbumDataSize)){ + std::cerr << std::string(__FUNCTION__) << ": Invalid input" << std::endl; + return B5T_STATUS_INVALID_INPUT; + } + if(inTimeOutTime < 0){ + inTimeOutTime = UART_LOAD_ALBUM_TIMEOUT; + } + UINT8 *pSendData = NULL; + pSendData = (UINT8*)malloc(SEND_HEAD_NUM + 4 + inAlbumDataSize); + + // Send Save Album signal command + // Create header + pSendData[SEND_HEAD_SYNCBYTE] = (UINT8)0xFE; + pSendData[SEND_HEAD_COMMANDNO] = (UINT8)HVC_COM_LOAD_ALBUM; + pSendData[SEND_HEAD_DATALENGTHLSB] = (UINT8)4; + pSendData[SEND_HEAD_DATALENGTHMSB] = (UINT8)0; + + pSendData[SEND_HEAD_NUM + 0] = (UINT8)(inAlbumDataSize & 0x000000ff); + pSendData[SEND_HEAD_NUM + 1] = (UINT8)((inAlbumDataSize >> 8) & 0x000000ff); + pSendData[SEND_HEAD_NUM + 2] = (UINT8)((inAlbumDataSize >> 16) & 0x000000ff); + pSendData[SEND_HEAD_NUM + 3] = (UINT8)((inAlbumDataSize >> 24) & 0x000000ff); + + for(i = 0; i < inAlbumDataSize; i++){ + pSendData[SEND_HEAD_NUM + 4 + i] = inAlbumData[i]; + } + // Send command signal + ret = UARTSendData(SEND_HEAD_NUM+4+inAlbumDataSize, pSendData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code =" << ret << std::endl; + free(pSendData); + return ret; + } + free(pSendData); + // Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + return ret; +} + +B5T_STATUS_T B5T007001::saveAlbumToROM(INT32 inTimeOutTime){ + B5T_STATUS_T ret; + INT32 size = 0; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SAVE_ALBUM_ROM_TIMEOUT; + } + + //Send Write Album signal command + ret = HVCSendCommand(HVC_COM_WRITE_ALBUM, 0, NULL); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + //Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + return ret; +} + +B5T_STATUS_T B5T007001::deleteUserData(INT32 inTimeOutTime, UINT8 inUserID, UINT8 inDataID){ + B5T_STATUS_T ret; + INT32 size = 0; + UINT8 sendData[HVC_UART_FRAME_SIZE]; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + + // Send Delete Data signal command + sendData[0] = (UINT8)(inUserID&0xff); + sendData[1] = (UINT8)((inUserID>>8)&0xff); + sendData[2] = (UINT8)(inDataID&0xff); + ret = HVCSendCommand(HVC_COM_DELETE_DATA, sizeof(UINT8)*3, sendData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + //Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + return ret; +} + +B5T_STATUS_T B5T007001::deleteUser(INT32 inTimeOutTime, UINT8 inUserID){ + B5T_STATUS_T ret; + INT32 size = 0; + UINT8 sendData[HVC_UART_FRAME_SIZE]; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + + // Send Delete User signal command + sendData[0] = (UINT8)(inUserID&0xff); + sendData[1] = (UINT8)((inUserID>>8)&0xff); + ret = HVCSendCommand(HVC_COM_DELETE_USER, sizeof(UINT8)*2, sendData); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + // Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + return ret; +} + +B5T_STATUS_T B5T007001::deleteUserAll(INT32 inTimeOutTime){ + B5T_STATUS_T ret; + INT32 size = 0; + if(inTimeOutTime < 0){ + inTimeOutTime = UART_SETTING_TIMEOUT; + } + + // Send Delete All signal command + ret = HVCSendCommand(HVC_COM_DELETE_ALL, 0, NULL); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + // Receive header + ret = HVCReceiveHeader(inTimeOutTime, size); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::setSTBStatus(STB_UINT32 inFlag){ + B5T_STATUS_T ret= B5T_STATUS_SUCCESS; + + //Flag 0 means disable STB + if(inFlag == 0){ + stbDeInit(); + mStbStatus = 0; + return ret; + } +#if DEBUG_PRINT + std::cout << "DEBUG: inFlag" << unsigned(inFlag) << std::endl; +#endif + ret = stbInit(inFlag); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + ret = stbSetTrRetryCount(STB_RETRYCOUNT_DEFAULT); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + ret = stbSetTrSteadinessParam(STB_POSSTEADINESS_DEFAULT, STB_SIZESTEADINESS_DEFAULT); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + ret = stbSetPeThresholdUse(STB_PE_THRESHOLD_DEFAULT); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + ret = stbSetPeAngleUse(STB_PE_ANGLEUDMIN_DEFAULT, STB_PE_ANGLEUDMAX_DEFAULT, STB_PE_ANGLELRMIN_DEFAULT, STB_PE_ANGLELRMAX_DEFAULT); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + ret = stbSetPeCompleteFrameCount(STB_PE_FRAME_DEFAULT); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + ret = stbSetFrThresholdUse(STB_FR_THRESHOLD_DEFAULT); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + ret = stbSetFrAngleUse(STB_FR_ANGLEUDMIN_DEFAULT, STB_FR_ANGLEUDMAX_DEFAULT, STB_FR_ANGLELRMIN_DEFAULT, STB_FR_ANGLELRMAX_DEFAULT); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + ret = stbSetFrCompleteFrameCount(STB_FR_FRAME_DEFAULT); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + ret = stbSetFrMinRatio(STB_FR_RATIO_DEFAULT); + if(ret != B5T_STATUS_SUCCESS){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return ret; + } + + mStbStatus = inFlag; + return ret; +} + +B5T_STATUS_T B5T007001::getSTBStatus(STB_INT32 &outStatus){ + B5T_STATUS_T ret= B5T_STATUS_SUCCESS; + outStatus = mStbStatus; + return ret; +} + +B5T_STATUS_T B5T007001::stbInit(STB_UINT32 inFuncFlag) +{ + if(NULL != mSTBHandle){ + STB_DeleteHandle(mSTBHandle); + mSTBHandle = NULL; + } + + mSTBHandle = STB_CreateHandle(inFuncFlag); + if(NULL == mSTBHandle){ + return B5T_STATUS_STB_ERR_INITIALIZE; + } + return B5T_STATUS_SUCCESS; +} + +void B5T007001::stbDeInit(void) +{ + if(NULL != mSTBHandle){ + STB_DeleteHandle(mSTBHandle); + mSTBHandle = NULL; + } +} + +B5T_STATUS_T B5T007001::stbExec(STB_INT32 inActiveFunc, HVC_RESULT inResult, STB_INT32 *outSTBFaceCount, STB_FACE **outSTBFaceResult, STB_INT32 *outSTBBodyCount, STB_BODY **outSTBBodyResult) +{ + STB_INT32 ret; + B5T_STATUS_T retStatus=B5T_STATUS_SUCCESS; + STB_FRAME_RESULT frameRes; + + mFaceCount = 0; + mBodyCount = 0; + stbGetFrameResult(inActiveFunc, inResult, &frameRes); + do{ + // Set frame information (Detection Result) + ret = STB_SetFrameResult(mSTBHandle, &frameRes); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + retStatus = B5T_STATUS_STB_FAILURE; + break; + } + + // STB Execution + ret = STB_Execute(mSTBHandle); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + retStatus = B5T_STATUS_STB_FAILURE; + break; + } + + // Get STB Result + ret = STB_GetFaces(mSTBHandle, (STB_UINT32 *)&mFaceCount, mFace); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + retStatus = B5T_STATUS_STB_FAILURE; + break; + } + + ret = STB_GetBodies(mSTBHandle, (STB_UINT32 *)&mBodyCount, mBody); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + retStatus = B5T_STATUS_STB_FAILURE; + break; + } + }while(0); + if(retStatus == B5T_STATUS_SUCCESS){ + *outSTBFaceCount = mFaceCount; + *outSTBFaceResult = mFace; + *outSTBBodyCount = mBodyCount; + *outSTBBodyResult = mBody; + } + return retStatus; +} + +B5T_STATUS_T B5T007001::stbClear(void) +{ + STB_INT32 ret; + ret = STB_ClearFrameResults(mSTBHandle); + if(ret != STB_NORMAL){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbSetTrRetryCount(STB_INT32 inMaxRetryCount){ + STB_INT32 ret; + ret = STB_SetTrRetryCount(mSTBHandle, inMaxRetryCount); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbGetTrRetryCount(STB_INT32 *outMaxRetryCount){ + STB_INT32 ret; + ret = STB_GetTrRetryCount(mSTBHandle, outMaxRetryCount); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbSetTrSteadinessParam(STB_INT32 inPosSteadinessParam, STB_INT32 inSizeSteadinessParam){ + STB_INT32 ret; + ret = STB_SetTrSteadinessParam(mSTBHandle, inPosSteadinessParam, inSizeSteadinessParam); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbGetTrSteadinessParam(STB_INT32 *outPosSteadinessParam, STB_INT32 *outSizeSteadinessParam){ + STB_INT32 ret; + ret = STB_GetTrSteadinessParam(mSTBHandle, outPosSteadinessParam, outSizeSteadinessParam); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbSetPeThresholdUse(STB_INT32 inThreshold){ + STB_INT32 ret; + ret = STB_SetPeThresholdUse(mSTBHandle, inThreshold); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbGetPeThresholdUse(STB_INT32 *outThreshold){ + STB_INT32 ret; + ret = STB_GetPeThresholdUse(mSTBHandle, outThreshold); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbSetPeAngleUse(STB_INT32 inMinUDAngle, STB_INT32 inMaxUDAngle, STB_INT32 inMinLRAngle, STB_INT32 inMaxLRAngle){ + STB_INT32 ret; + ret = STB_SetPeAngleUse(mSTBHandle, inMinUDAngle, inMaxUDAngle, inMinLRAngle, inMaxLRAngle); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbGetPeAngleUse(STB_INT32 *outMinUDAngle, STB_INT32 *outMaxUDAngle, STB_INT32 *outMinLRAngle, STB_INT32 *outMaxLRAngle){ + STB_INT32 ret; + ret = STB_GetPeAngleUse(mSTBHandle, outMinUDAngle, outMaxUDAngle, outMinLRAngle, outMaxLRAngle); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbSetPeCompleteFrameCount(STB_INT32 inCompCount){ + STB_INT32 ret; + ret = STB_SetPeCompleteFrameCount(mSTBHandle, inCompCount); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbGetPeCompleteFrameCount(STB_INT32 *outCompCount){ + STB_INT32 ret; + ret = STB_GetPeCompleteFrameCount(mSTBHandle, outCompCount); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbSetFrThresholdUse(STB_INT32 inThreshold){ + STB_INT32 ret; + ret = STB_SetFrThresholdUse(mSTBHandle, inThreshold); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbGetFrThresholdUse(STB_INT32 *outThreshold){ + STB_INT32 ret; + ret = STB_GetFrThresholdUse(mSTBHandle, outThreshold); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbSetFrAngleUse(STB_INT32 inMinUDAngle, STB_INT32 inMaxUDAngle, STB_INT32 inMinLRAngle, STB_INT32 inMaxLRAngle){ + STB_INT32 ret; + ret = STB_SetFrAngleUse(mSTBHandle, inMinUDAngle, inMaxUDAngle, inMinLRAngle, inMaxLRAngle); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbGetFrAngleUse(STB_INT32 *outMinUDAngle, STB_INT32 *outMaxUDAngle, STB_INT32 *outMinLRAngle, STB_INT32 *outMaxLRAngle){ + STB_INT32 ret; + ret = STB_GetFrAngleUse(mSTBHandle, outMinUDAngle, outMaxUDAngle, outMinLRAngle, outMaxLRAngle); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbSetFrCompleteFrameCount(STB_INT32 inFrameCount){ + STB_INT32 ret; + ret = STB_SetFrCompleteFrameCount(mSTBHandle, inFrameCount); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbGetFrCompleteFrameCount(STB_INT32 *outFrameCount){ + STB_INT32 ret; + ret = STB_GetFrCompleteFrameCount(mSTBHandle, outFrameCount); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbSetFrMinRatio(STB_INT32 inMinRatio){ + STB_INT32 ret; + ret = STB_SetFrMinRatio(mSTBHandle, inMinRatio); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbGetFrMinRatio(STB_INT32 *outMinRatio){ + STB_INT32 ret; + ret = STB_GetFrMinRatio(mSTBHandle, outMinRatio); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbGetFrameResult(STB_INT32 inActiveFunc, const HVC_RESULT inResult, STB_FRAME_RESULT *outFrameResult){ + UINT8 i; + + // Body Detection + outFrameResult->bodys.nCount = inResult.bdResult.num; + if(inActiveFunc & HVC_ACTIV_BODY_DETECTION){ + for(i = 0; i < inResult.bdResult.num; i++){ + DETECT_RESULT dtRes = inResult.bdResult.bdResult[i]; + outFrameResult->bodys.body[i].center.nX = dtRes.posX; + outFrameResult->bodys.body[i].center.nY = dtRes.posY; + outFrameResult->bodys.body[i].nSize = dtRes.size; + outFrameResult->bodys.body[i].nConfidence = dtRes.confidence; + } + } + + outFrameResult->faces.nCount = inResult.fdResult.num; + for(i = 0; i < inResult.fdResult.num; i++){ + // Face Detection + if(inActiveFunc & HVC_ACTIV_FACE_DETECTION){ + DETECT_RESULT dtRes = inResult.fdResult.fcResult[i].dtResult; + outFrameResult->faces.face[i].center.nX = dtRes.posX; + outFrameResult->faces.face[i].center.nY = dtRes.posY; + outFrameResult->faces.face[i].nSize = dtRes.size; + outFrameResult->faces.face[i].nConfidence = dtRes.confidence; + } + // Face Direction + if(inActiveFunc & HVC_ACTIV_FACE_DIRECTION){ + DIR_RESULT dirRes = inResult.fdResult.fcResult[i].dirResult; + outFrameResult->faces.face[i].direction.nUD = dirRes.pitch; + outFrameResult->faces.face[i].direction.nLR = dirRes.yaw; + outFrameResult->faces.face[i].direction.nRoll = dirRes.roll; + outFrameResult->faces.face[i].direction.nConfidence = dirRes.confidence; + } + else { + outFrameResult->faces.face[i].direction.nUD = 0; + outFrameResult->faces.face[i].direction.nLR = 0; + outFrameResult->faces.face[i].direction.nRoll = 0; + outFrameResult->faces.face[i].direction.nConfidence = 0; + } + + // Age + if(inActiveFunc & HVC_ACTIV_AGE_ESTIMATION){ + AGE_RESULT ageRes = inResult.fdResult.fcResult[i].ageResult; + outFrameResult->faces.face[i].age.nAge = ageRes.age; + outFrameResult->faces.face[i].age.nConfidence = ageRes.confidence; + } + else { + outFrameResult->faces.face[i].age.nAge = -128; + outFrameResult->faces.face[i].age.nConfidence = -128; + } + + // Gender + if(inActiveFunc & HVC_ACTIV_GENDER_ESTIMATION){ + GENDER_RESULT genderRes = inResult.fdResult.fcResult[i].genderResult; + outFrameResult->faces.face[i].gender.nGender = genderRes.gender; + outFrameResult->faces.face[i].gender.nConfidence = genderRes.confidence; + } + else { + outFrameResult->faces.face[i].gender.nGender = -128; + outFrameResult->faces.face[i].gender.nConfidence = -128; + } + + // Face recognition + if(inActiveFunc & HVC_ACTIV_FACE_RECOGNITION){ + RECOGNITION_RESULT recogRes = inResult.fdResult.fcResult[i].recognitionResult; + outFrameResult->faces.face[i].recognition.nUID = recogRes.uid; + outFrameResult->faces.face[i].recognition.nScore = recogRes.confidence; + } + else { + outFrameResult->faces.face[i].recognition.nUID = -128; + outFrameResult->faces.face[i].recognition.nScore = -128; + } + // Gaze + if(inActiveFunc & HVC_ACTIV_GAZE_ESTIMATION){ + GAZE_RESULT gazeRes = inResult.fdResult.fcResult[i].gazeResult; + outFrameResult->faces.face[i].gaze.nLR = gazeRes.gazeLR; + outFrameResult->faces.face[i].gaze.nUD = gazeRes.gazeUD; + } + else{ + outFrameResult->faces.face[i].gaze.nLR = -128; + outFrameResult->faces.face[i].gaze.nUD = -128; + } + // Blink + if(inActiveFunc & HVC_ACTIV_BLINK_ESTIMATION){ + BLINK_RESULT blinkRes = inResult.fdResult.fcResult[i].blinkResult; + outFrameResult->faces.face[i].blink.nLeftEye = blinkRes.ratioL; + outFrameResult->faces.face[i].blink.nRightEye = blinkRes.ratioR; + } + else{ + outFrameResult->faces.face[i].blink.nLeftEye = -128; + outFrameResult->faces.face[i].blink.nRightEye = -128; + } + // Expression + if(inActiveFunc & HVC_ACTIV_EXPRESSION_ESTIMATION){ + UINT8 count=0; + EXPRESSION_RESULT exprRes = inResult.fdResult.fcResult[i].expressionResult; + for(count=0; count < 5;count++){ + outFrameResult->faces.face[i].expression.anScore[count]= exprRes.score[count]; + } + outFrameResult->faces.face[i].expression.nDegree = exprRes.degree; + } + else{ + outFrameResult->faces.face[i].expression.anScore[0]= -128; + outFrameResult->faces.face[i].expression.nDegree = -128; + } + } + return B5T_STATUS_SUCCESS; +} + +B5T_STATUS_T B5T007001::stbGetVersion(STB_INT8* outMajorVersion, STB_INT8* outMinorVersion){ + STB_INT32 ret; + ret = STB_GetVersion(outMajorVersion, outMinorVersion); + if(STB_NORMAL != ret){ + std::cerr << std::string(__FUNCTION__) << ": failed with error code:" << ret << std::endl; + return B5T_STATUS_STB_FAILURE; + } + return B5T_STATUS_SUCCESS; +} diff --git a/src/b5t007001/b5t007001.hpp b/src/b5t007001/b5t007001.hpp new file mode 100644 index 00000000..a77b9e16 --- /dev/null +++ b/src/b5t007001/b5t007001.hpp @@ -0,0 +1,852 @@ +/* +* Author: Takashi Kakiuchi +* Copyright (c) 2019 Omron Electronic Components - Americas +* +* Permission is hereby granted, free of charge, to any person obtaining a copy of +* this software and associated documentation files (the "Software"), to deal in +* the Software without restriction, including without limitation the rights to +* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +* the Software, and to permit persons to whom the Software is furnished to do so, +* subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in all +* copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#pragma once + + +#include //Required for c++ standard IO +#include // Required for string +#include //Required for UART +#include //Required for vector +#include "STBAPI.h" //Required for STB +#include "STBCommonDef.h" //Required for STB + +/** + * MACROS and enum + */ +#define HVC_ALBUM_SIZE_MIN 32 +#define HVC_ALBUM_SIZE_MAX 816032 + +/** + * Execute detection flags + */ +#define HVC_ACTIV_BODY_DETECTION 0x00000001 +#define HVC_ACTIV_HAND_DETECTION 0x00000002 +#define HVC_ACTIV_FACE_DETECTION 0x00000004 +#define HVC_ACTIV_FACE_DIRECTION 0x00000008 +#define HVC_ACTIV_AGE_ESTIMATION 0x00000010 +#define HVC_ACTIV_GENDER_ESTIMATION 0x00000020 +#define HVC_ACTIV_GAZE_ESTIMATION 0x00000040 +#define HVC_ACTIV_BLINK_ESTIMATION 0x00000080 +#define HVC_ACTIV_EXPRESSION_ESTIMATION 0x00000100 +#define HVC_ACTIV_FACE_RECOGNITION 0x00000200 + +#define HVC_EXECUTE_IMAGE_NONE 0x00000000 +#define HVC_EXECUTE_IMAGE_QVGA 0x00000001 +#define HVC_EXECUTE_IMAGE_QVGA_HALF 0x00000002 + +#define DEFAULT_UART_NUM 0 //This can be overwritten by application for custom number in constructure. +#define MAX_USER_NUM 100 //Maximum user number +#define UART_SETTING_TIMEOUT 1000 //HVC setting command signal timeout period +#define UART_EXECUTE_TIMEOUT ((10+10+6+3+15+15+1+1+15+10)*1000) +#define UART_SAVE_ALBUM_TIMEOUT 860000 // HVC save album command signal timeout period +#define UART_LOAD_ALBUM_TIMEOUT 860000 // HVC load album command signal timeout period +#define UART_SAVE_ALBUM_ROM_TIMEOUT 150000 // HVC save album to ROM command timeout period +#define STB_MAX_NUM 35 + +typedef unsigned char UINT8; // 8 bit Unsigned Integer +typedef int INT32; //32 bit Signed Integer +typedef unsigned int UINT32; //32 bit Signed Integer +typedef char INT8; //32 bit Signed Integer +typedef std::string STRING; //String + +#define STB_RETRYCOUNT_DEFAULT 2 //Retry Count for STB +#define STB_POSSTEADINESS_DEFAULT 30 //Position Steadiness for STB +#define STB_SIZESTEADINESS_DEFAULT 30 //Size Steadiness for STB +#define STB_PE_FRAME_DEFAULT 10 //Complete Frame Count for property estimation in STB +#define STB_PE_ANGLEUDMIN_DEFAULT -15 //Up/Down face angle minimum value for property estimation in STB +#define STB_PE_ANGLEUDMAX_DEFAULT 20 //Up/Down face angle maximum value for property estimation in STB +#define STB_PE_ANGLELRMIN_DEFAULT -20 //Left/Right face angle minimum value for property estimation in STB +#define STB_PE_ANGLELRMAX_DEFAULT 20 //Left/Right face angle maximum value for property estimation in STB +#define STB_PE_THRESHOLD_DEFAULT 1 //Threshold for property estimation in STB +#define STB_FR_FRAME_DEFAULT 5 //Complete Frame Count for recognition in STB +#define STB_FR_RATIO_DEFAULT 60 //Account Ratio for recognition in STB +#define STB_FR_ANGLEUDMIN_DEFAULT -15 //Up/Down face angle minimum value for recognition in STB +#define STB_FR_ANGLEUDMAX_DEFAULT 20 //Up/Down face angle maximum value for recognition in STB +#define STB_FR_ANGLELRMIN_DEFAULT -20 //Left/Right face angle maximum value for recognition in STB +#define STB_FR_ANGLELRMAX_DEFAULT 20 //Left/Right face angle minimum value for recognition in STB +#define STB_FR_THRESHOLD_DEFAULT 1 //Threshold for recognition in STB + + + +/** + * B5T_STATUS enum + * An Enum contains status code of operations + */ +typedef enum B5T_STATUS{ +B5T_STATUS_SUCCESS =0, // Success +B5T_STATUS_WRITE_FAILED, // MRAA library UART write failed +B5T_STATUS_READ_FAILED, // MRAA library UART read failed +B5T_STATUS_READ_TIMEOUT, // MRAA library UART read timeour occurs +B5T_STATUS_HEADER_INVALID, // Sensor FW returned invalid header +B5T_STATUS_INVALID_INPUT, // Invalid input +B5T_STATUS_FW_INTERNAL_ERROR, // HVC firmware error +B5T_STATUS_USER_ADD_FAILED, // User add failed +B5T_STATUS_STB_FAILURE, // STB failure +B5T_STATUS_STB_ERR_INITIALIZE, // STB library init failed +}B5T_STATUS_T; + + +/** + * HVC_UART_BAUD_RATE_T enum + * An enum contains values of supported UART baud rate + */ +typedef enum{ +HVC_UART_BAUD_RATE_9600 = 9600, +HVC_UART_BAUD_RATE_38400 = 38400, +HVC_UART_BAUD_RATE_115200 = 115200, +HVC_UART_BAUD_RATE_230400 = 230400, +HVC_UART_BAUD_RATE_460800 = 460800, +HVC_UART_BAUD_RATE_921600 = 921600, +}HVC_UART_BAUD_RATE_T; + + +/** + * Expression + */ +typedef enum { + EX_NEUTRAL = 1, + EX_HAPPINESS, + EX_SURPRISE, + EX_ANGER, + EX_SADNESS +}EXPRESSION; + +/** + *Struct Device model and version info + */ +typedef struct { + UINT8 string[12]; + UINT8 major; + UINT8 minor; + UINT8 relese; + UINT8 revision[4]; +}HVC_VERSION; + +/** + *Detection result + */ +typedef struct{ + INT32 posX; //Center x-coordinate + INT32 posY; //Center y-coordinate + INT32 size; //Size + INT32 confidence; //Degree of confidence +}DETECT_RESULT; + +/** + *Face direction + */ +typedef struct{ + INT32 yaw; //Yaw angle + INT32 pitch; //Pitch angle + INT32 roll; //Roll angle + INT32 confidence; //Degree of confidence +}DIR_RESULT; + +/** + *Age + */ +typedef struct{ + INT32 age; //Age + INT32 confidence; //Degree of confidence +}AGE_RESULT; + +/** + * Gender + */ +typedef struct{ + INT32 gender; //Gender + INT32 confidence; //Degree of confidence +}GENDER_RESULT; + +/** + *Gaze + */ +typedef struct{ + INT32 gazeLR; //Yaw angle + INT32 gazeUD; //Pitch angle +}GAZE_RESULT; + +/** + *Blink + */ +typedef struct{ + INT32 ratioL; //Left eye blink result + INT32 ratioR; //Right eye blink result +}BLINK_RESULT; + +/** + *Expression + */ +typedef struct{ + INT32 topExpression; //Top expression + INT32 topScore; //Top score + INT32 score[5]; //Score of 5 expression + INT32 degree; //Negative-positive degree +}EXPRESSION_RESULT; + +/** + *Face Recognition + */ +typedef struct{ + INT32 uid; //User ID + INT32 confidence; //Degree of confidence +}RECOGNITION_RESULT; + +/** + *Face Detection & Estimations result + */ +typedef struct{ + DETECT_RESULT dtResult; //Face detection result + DIR_RESULT dirResult; //Face direction estimation result + AGE_RESULT ageResult; //Age Estimation result + GENDER_RESULT genderResult; //Gender Estimation result + GAZE_RESULT gazeResult; //Gaze Estimation result + BLINK_RESULT blinkResult; //Blink Estimation result + EXPRESSION_RESULT expressionResult; //Expression Estimation result + RECOGNITION_RESULT recognitionResult; //Face Recognition result +}FACE_RESULT; + +/** + *Human Body Detection results + */ +typedef struct{ + UINT8 num; //Number of Detection + DETECT_RESULT bdResult[35]; //Detection result +}BD_RESULT; + +/** + *Hand Detection results + */ +typedef struct{ + UINT8 num; //Number of Detection + DETECT_RESULT hdResult[35]; //Detection result +}HD_RESULT; + +/** + *Face Detection & Estimations results + */ +typedef struct{ + UINT8 num; //Number of Detection + FACE_RESULT fcResult[35]; //Detection & Estimations result +}FD_RESULT; + +/** + *Image data + */ +typedef struct{ + INT32 width; + INT32 height; + UINT8 image[320*240]; +}HVC_IMAGE; + +/** + * Result data of Execute command + */ +typedef struct{ + INT32 executedFunc; //Execution flag + BD_RESULT bdResult; //Human Body Detection results + HD_RESULT hdResult; //Hand Detection results + FD_RESULT fdResult; //Face Detection & Estimations results + HVC_IMAGE image; //Image data +}HVC_RESULT; + +/** + *Threshold of confidence + */ +typedef struct{ + INT32 bdThreshold; //Threshold of confidence of Human Body Detection + INT32 hdThreshold; //Threshold of confidence of Hand Detection + INT32 dtThreshold; //Threshold of confidence of Face Detection + INT32 rsThreshold; //Threshold of confidence of Face Recognition +}HVC_THRESHOLD; + +/** + *Detection size + */ +typedef struct{ + INT32 bdMinSize; //Minimum detection size of Human Body Detection + INT32 bdMaxSize; //Maximum detection size of Human Body Detection + INT32 hdMinSize; //Minimum detection size of Hand Detection + INT32 hdMaxSize; //Maximum detection size of Hand Detection + INT32 dtMinSize; //Minimum detection size of Face Detection + INT32 dtMaxSize; //Maximum detection size of Face Detection +}HVC_SIZERANGE; + + +/*=========================================================================*/ + +namespace upm { + /** + * @brief Mems HVC Sensors + * @defgroup b5t007001 libupm-b5t007001 + * @ingroup --add group + */ + /** + * @library b5t007001 + * @sensor b5t007001 + * @comname Omron HVC sensors + * @type --add type + * @man omron + * @con UART + * @web --add weblink + * + * @brief API for the Omron B5T007001 HVC sensors interface + * + * It is connected via a UART Interface. + * + * @snippet b5t007001.cxx Interesting + */ + class B5T007001{ + public : + /** + * B5T007001 object constructor + * + * @param uart UART to use. Default value is DEFAULT_UART_NUM whenver not specified manually. + * @param inRate UART baudrate. Default value is HVC_UART_BAUD_RATE_9600 whenever not specified manually. + */ + B5T007001(UINT8 uart=DEFAULT_UART_NUM, HVC_UART_BAUD_RATE_T inRate=HVC_UART_BAUD_RATE_9600); + + /** + * B5T007001 object destructure + * + */ + ~B5T007001(); + + /** + * Get HVC version information + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param outVersion Version data + * @return One of the D6T_STATUS_T values + */ + B5T_STATUS_T getVersion(INT32 inTimeOutTime, HVC_VERSION &outVersion); + + /** + * Set HVC camera angle + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inAngleNo Camera angle number + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T setCameraAngle(INT32 inTimeOutTime, UINT8 inAngleNo); + + /** + * Get HVC camera angle + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param outAngleNo Camera angle number + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T getCameraAngle(INT32 inTimeOutTime, UINT8 &outAngleNo); + + /** + * Execute Detection for given parameters + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inExec Execution parameter for face detection or hand detection etc + * @param inImageInfo Output image designation + * @param outHVCResult Result data + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T executeDetection(INT32 inTimeOutTime, INT32 inExec, INT32 inImageInfo, HVC_RESULT &outHVCResult); + + /** + * Execute Detection for given parameters and return information with STB results + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inExec Execution parameter for face detection or hand detection etc + * @param inImageInfo Output image designation + * @param outHVCResult Result data + * @param outSTBFaceCount STB Face count + * @param outSTBFaceResult STB Face result + * @param outSTBBodyCount STB Body count + * @param outSTBBodyResult STB Body result + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T executeDetection(INT32 inTimeOutTime, INT32 inExec, INT32 inImageInfo, HVC_RESULT &outHVCResult,INT32 *outSTBFaceCount, STB_FACE **outSTBFaceResult,INT32 *outSTBBodyCount,STB_BODY **outSTBBodyResult); + + /** + * Set the threshold value for Human Body Detection, Hand Detection, Face Detection and/or Face Recognition + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inThreshold Threshold value + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T setThreshold(INT32 inTimeOutTime, HVC_THRESHOLD inThreshold); + + /** + * Get the threshold value for Human Body Detection, Hand Detection, Face Detection and/or Face Recognition + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param outThreshold Threshold value + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T getThreshold(INT32 inTimeOutTime, HVC_THRESHOLD &outThreshold); + + /** + * Set the detection size of Human Body Detection, Hand Detection, Face Detection + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inSizeRange SizeRange value + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T setSizeRange(INT32 inTimeOutTime, HVC_SIZERANGE inSizeRange); + + /** + * Get the detection size of Human Body Detection, Hand Detection, Face Detection + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param outSizeRange SizeRange value + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T getSizeRange(INT32 inTimeOutTime, HVC_SIZERANGE &outSizeRange); + + /** + * Set the face angle for Face Detection, i.e. the yaw and roll angle range to be detected + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inPose Yaw angle range + * @param inAngle Roll angle range + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T setFaceDetectionAngle(INT32 inTimeOutTime, INT32 inPose, INT32 inAngle); + + /** + * Get the face angle for Face Detection + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param outPose Yaw angle range + * @param outAngle Roll angle range + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T getFaceDetectionAngle(INT32 inTimeOutTime, INT32 &outPose, INT32 &outAngle); + + /** + * Set the UART baudrate + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inRate UART baud rate + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T setBaudRate(INT32 inTimeOutTime, HVC_UART_BAUD_RATE_T inRate); + + /** + * Get registered userIDs and dataIDs + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param outUserList User ID list + * @param outDataList Data ID list + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T getRegisteredUsersInfo(INT32 inTimeOutTime, std::vector &outUserList, std::vector &outDataList); + /** + * Add/Register new user + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inUserID User ID (0-99) + * @param inDataID Data ID (0-9) + * @param outImage Image info + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T addUser(INT32 inTimeOutTime, UINT8 inUserID, UINT8 inDataID, HVC_IMAGE &outImage); + + /** + * Delete specific user data for specific user id + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inUserID User ID (0-99) + * @param inDataID Data ID (0-9) + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T deleteUserData(INT32 inTimeOutTime, UINT8 inUserID, UINT8 inDataID); + + /** + * Delete specific user + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inUserID User ID (0-99) + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T deleteUser(INT32 inTimeOutTime, UINT8 inUserID); + + /** + * Delete all users + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T deleteUserAll(INT32 inTimeOutTime); + + /** + * Get Registration Info (Face Recognition) + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inUserID User ID (0-99) + * @param outDataNo Registration Info + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T getUserData(INT32 inTimeOutTime, UINT8 inUserID, UINT8 &outDataNo); + + /** + * Save Album from HVC device to Host + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param outAlbumData Album data + * @param outAlbumDataSize Album data size + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T saveAlbumToHost(INT32 inTimeOutTime, UINT8 *outAlbumData, INT32 &outAlbumDataSize); + + /** + * Load Album from Host to HVC device + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inAlbumData Album data + * @param inAlbumDataSize Album data size + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T loadAlbumFromHost(INT32 inTimeOutTime, UINT8 *inAlbumData, INT32 inAlbumDataSize); + + /** + * Save Album from HVC RAM to ROM memory + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T saveAlbumToROM(INT32 inTimeOutTime); + + /** + * Set Stabilization status + * + * @param inFlag STB init flags + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T setSTBStatus(STB_UINT32 inFlag); + + /** + * Get stabilization status + * + * @param outStatus Enable/Disable status + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T getSTBStatus(STB_INT32 &outStatus); + + /** + * Clear stabilization frame results + * + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbClear(void); + + /** + * Set maximum retry count for STB results + * + * @param inMaxRetryCount Maximum retry count + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbSetTrRetryCount(STB_INT32 inMaxRetryCount); + + /** + * Get maximum retry count for STB results + * + * @param outMaxRetryCount Maximum retry count + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbGetTrRetryCount(STB_INT32 *outMaxRetryCount); + + /** + * Set rectangle steadiness tracking parameter + * + * @param inPosSteadinessParam Rectangle position steadiness parameter + * @param inSizeSteadinessParam Rectangle size steadiness parameter + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbSetTrSteadinessParam(STB_INT32 inPosSteadinessParam, STB_INT32 inSizeSteadinessParam); + + /** + * Get rectangle steadiness tracking parameter + * + * @param outPosSteadinessParam Rectangle position steadiness parameter + * @param outSizeSteadinessParam Rectangle size steadiness parameter + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbGetTrSteadinessParam(STB_INT32 *outPosSteadinessParam, STB_INT32 *outSizeSteadinessParam); + + /** + * Set estimation result stabilizing threshold value + * + * @param inThreshold Face direction confidence threshold value + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbSetPeThresholdUse(STB_INT32 inThreshold); + + /** + * Get estimation result stabilizing threshold value + * + * @param inThreshold Face direction confidence threshold value + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbGetPeThresholdUse(STB_INT32 *outThreshold); + + /** + * Set estimation result stablizing angle + * + * @param inMinUDAngle Minimum up-down angle of face + * @param inMaxUDAngle Maximum up-down angle of face + * @param inMinLRAngle Minimum left-right angle of face + * @param inMaxLRAngle Maximum left-right angle of face + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbSetPeAngleUse(STB_INT32 inMinUDAngle, STB_INT32 inMaxUDAngle, STB_INT32 inMinLRAngle, STB_INT32 inMaxLRAngle); + + /** + * Get estimation result stablizing angle + * + * @param outMinUDAngle Minimum up-down angle of face + * @param outMaxUDAngle Maximum up-down angle of face + * @param outMinLRAngle Minimum left-right angle of face + * @param outMaxLRAngle Maximum left-right angle of face + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbGetPeAngleUse(STB_INT32 *outMinUDAngle, STB_INT32 *outMaxUDAngle, STB_INT32 *outMinLRAngle, STB_INT32 *outMaxLRAngle); + + /** + * Get age/gender esitmation complete frame count + * + * @param inCompCount The number of previous frames applying to fix the result + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbSetPeCompleteFrameCount(STB_INT32 inCompCount); + + /** + * Set age/gender esitmation complete frame count + * + * @param outCompCount The number of previous frames applying to fix the result + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbGetPeCompleteFrameCount(STB_INT32 *outCompCount); + + /** + * Set recognition stabilizing threshold value + * + * @param inThreshold Face direction confidence threshold value + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbSetFrThresholdUse(STB_INT32 inThreshold); + + /** + * Get recognition stabilizing threshold value + * + * @param outThreshold Face direction confidence threshold value + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbGetFrThresholdUse(STB_INT32 *outThreshold); + + /** + * Get recognition stabilizing angle + * + * @param inMinUDAngle Minimum up-down angle of face + * @param inMaxUDAngle Maximum up-down angle of face + * @param inMinLRAngle Minimum left-right angle of face + * @param inMaxLRAngle Maximum left-right angle of face + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbSetFrAngleUse(STB_INT32 inMinUDAngle, STB_INT32 inMaxUDAngle, STB_INT32 inMinLRAngle, STB_INT32 inMaxLRAngle); + + /** + * Set recognition stabilizing angle + * + * @param outMinUDAngle Minimum up-down angle of face + * @param outMaxUDAngle Maximum up-down angle of face + * @param outMinLRAngle Minimum left-right angle of face + * @param outMaxLRAngle Maximum left-right angle of face + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbGetFrAngleUse(STB_INT32 *outMinUDAngle, STB_INT32 *outMaxUDAngle, STB_INT32 *outMinLRAngle, STB_INT32 *outMaxLRAngle); + + /** + * Get recognition stablizing complete frame count + * + * @param inFrameCount The number of previous frames applying to fix the result + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbSetFrCompleteFrameCount(STB_INT32 inFrameCount); + + /** + * Set recognition stablizing complete frame count + * + * @param outFrameCount The number of previous frames applying to fix the result + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbGetFrCompleteFrameCount(STB_INT32 *outFrameCount); + + /** + * Get recognition minimum account ratio + * + * @param inMinRatio Recognition minimum account ratio + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbSetFrMinRatio(STB_INT32 inMinRatio); + + /** + * Set recognition minimum account ratio + * + * @param outMinRatio Recognition minimum account ratio + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbGetFrMinRatio(STB_INT32 *outMinRatio); + + /** + * Get Stb version + * + * @param outMajorVersion Major version number + * @param outMinorVersion Minor version number + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbGetVersion(STB_INT8* outMajorVersion, STB_INT8* outMinorVersion); + + private: + mraa::Uart* mUart; + INT32 mStbStatus; + HSTB mSTBHandle; + int mFaceCount; + STB_FACE mFace[STB_MAX_NUM]; + int mBodyCount; + STB_BODY mBody[STB_MAX_NUM]; + + /** + * UART send command + * + * @param inDataSize Data Size + * @param inData Data + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T UARTSendData(INT32 inDataSize, const UINT8 *inData); + + /** + * UART Receive Data + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inDataSize Data Size + * @param outResult Received Data + * @param isSyncRequired Check for sync byte + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T UARTReceiveData(INT32 inTimeOutTime, INT32 inDataSize, UINT8 *outResult, UINT8 isSyncRequired=0); + + /** + * HVC send command + * + * @param inCommandNo Command Number + * @param inDataSize Data Size + * @param inData Data + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T HVCSendCommand(UINT8 inCommandNo, INT32 inDataSize, UINT8 *inData); + + /** + * HVC Receive Data + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inDataSize Data Size + * @param outResult Received Data + * @param inCommandNo Command Number + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T HVCReceiveData(INT32 inTimeOutTime, INT32 inDataSize, UINT8 *outResult); + + /** + * HVC Receive Header + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param outDataSize Data Size + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T HVCReceiveHeader(INT32 inTimeOutTime, INT32 &outDataSize); + + /** + * HVC registration + * + * @param inTimeOutTime Timeout time (ms). If negative, recommended default timeout is used. + * @param inUserID User ID + * @param inDataID Data ID + * @param outImage Out image data + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T HVCRegistration(INT32 inTimeOutTime, INT32 inUserID, INT32 inDataID, HVC_IMAGE &outImage); + + /** + * Clear data on RX line of UART + * + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T UARTRxIgnoreAllData(void); + + /** + * Init stabilization library + * + * @param inFuncFlag init flag + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbInit(STB_UINT32 inFuncFlag); + + /** + * Deinit stabilization library + * + * @return One of the B5T_STATUS_T values + */ + void stbDeInit(void); + + /** + * Execute stabilization + * + * @param inActiveFunc Active functions + * @param inResult HVC_RESULT info for stabilization + * @param outSTBFaceCount STB face count + * @param outSTBFaceResult STB face results + * @param outSTBBodyCount STB body count + * @param outSTBBodyResult STB body results + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbExec(STB_INT32 inActiveFunc, HVC_RESULT inResult, STB_INT32 *outSTBFaceCount, STB_FACE **outSTBFaceResult, STB_INT32 *outSTBBodyCount, STB_BODY **outSTBBodyResult); + /** + * Get stabilization frame result + * + * @param inActiveFunc Active functions + * @param inResult HVC_RESULT info for stabilization + * @param outFrameResult Stabilization frame results + * @return One of the B5T_STATUS_T values + */ + B5T_STATUS_T stbGetFrameResult(STB_INT32 inActiveFunc, HVC_RESULT inResult, STB_FRAME_RESULT *outFrameResult); + + /* + * Copy Constructor + */ + B5T007001(const B5T007001&); + + /** + * Operator Overloading + */ + B5T007001& operator=(const B5T007001&); + }; +} diff --git a/src/b5t007001/b5t007001.i b/src/b5t007001/b5t007001.i new file mode 100644 index 00000000..6f869a4e --- /dev/null +++ b/src/b5t007001/b5t007001.i @@ -0,0 +1,19 @@ +#ifdef SWIGPYTHON +%module (package="upm") b5t007001 +#endif + +%include "../common_top.i" + +/* BEGIN Java syntax ------------------------------------------------------- */ +#ifdef SWIGJAVA +JAVA_JNI_LOADLIBRARY(javaupm_b5t007001) +#endif +/* END Java syntax */ + +/* BEGIN Common SWIG syntax ------------------------------------------------- */ +%{ +#include "b5t007001.hpp" +%} + +%include "b5t007001.hpp" +/* END Common SWIG syntax * \ No newline at end of file diff --git a/src/b5t007001/b5t007001.json b/src/b5t007001/b5t007001.json new file mode 100644 index 00000000..f0a6690f --- /dev/null +++ b/src/b5t007001/b5t007001.json @@ -0,0 +1,28 @@ +{ + "Library": "b5t007001", + "Description": "Omron B5T Human Vision Component (HVC-P2)", + "Sensor Class": { + "B5T007001": { + "Name": "API for B5T007001 Sensor Module", + "Description": "This is the UPM Module for the Omron Human Vision Component", + "Aliases": ["HVC-P2"], + "Categories": ["USB"], + "Connections": ["USB and UART"], + "Project Type": ["sensor"], + "Manufacturers": ["Omron"], + "Examples": { + "C++": ["b5t007001_register.cxx"] + "C++": ["b5t007001_sample.cxx"] + }, + "Platforms": { + "Intel Edison": { + "Notes": ["Might need omron human vision component sensor HVC-P2"] + } + }, + "Urls": { + "Product Pages": ["https://www.components.omron.com/mobile/hvc_p2"], + "Datasheets": ["https://omronfs.omron.com/en_US/ecb/products/pdf/en-b5t.pdf"] + } + } + } +} \ No newline at end of file diff --git a/src/b5t007001/stblib/CMakeCache.txt b/src/b5t007001/stblib/CMakeCache.txt new file mode 100644 index 00000000..47052dc9 --- /dev/null +++ b/src/b5t007001/stblib/CMakeCache.txt @@ -0,0 +1,317 @@ +# This is the CMakeCache file. +# For build in directory: /home/pi/upm/src/b5t007001/stblib +# It was generated by CMake: /usr/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//For backwards compatibility, what version of CMake commands and +// syntax should this version of CMake try to support. +CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.4 + +//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or +// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. +CMAKE_BUILD_TYPE:STRING= + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//CXX compiler +CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ + +//Flags used by the compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release builds for minimum +// size. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the compiler during release builds with debug info. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//C compiler +CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc + +//Flags used by the compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release builds for minimum +// size. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the compiler during release builds with debug info. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Flags used by the linker. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make + +//Flags used by the linker during the creation of modules. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=Project + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Flags used by the linker during the creation of dll's. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Single output directory for building all executables. +EXECUTABLE_OUTPUT_PATH:PATH= + +//Single output directory for building all libraries. +LIBRARY_OUTPUT_PATH:PATH= + +//Value Computed by CMake +Project_BINARY_DIR:STATIC=/home/pi/upm/src/b5t007001/stblib + +//Value Computed by CMake +Project_SOURCE_DIR:STATIC=/home/pi/upm/src/b5t007001/stblib + +//Dependencies for target +stblib_LIB_DEPENDS:STATIC= + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/home/pi/upm/src/b5t007001/stblib +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=7 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=2 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/usr/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/home/pi/upm/src/b5t007001/stblib +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.7 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 + diff --git a/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeCCompiler.cmake b/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeCCompiler.cmake new file mode 100644 index 00000000..ecea7569 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeCCompiler.cmake @@ -0,0 +1,68 @@ +set(CMAKE_C_COMPILER "/usr/bin/cc") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "GNU") +set(CMAKE_C_COMPILER_VERSION "6.3.0") +set(CMAKE_C_COMPILER_WRAPPER "") +set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") +set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert") +set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes") +set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros") +set(CMAKE_C11_COMPILE_FEATURES "c_static_assert") + +set(CMAKE_C_PLATFORM_ID "Linux") +set(CMAKE_C_SIMULATE_ID "") +set(CMAKE_C_SIMULATE_VERSION "") + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_COMPILER_IS_GNUCC 1) +set(CMAKE_C_COMPILER_LOADED 1) +set(CMAKE_C_COMPILER_WORKS TRUE) +set(CMAKE_C_ABI_COMPILED TRUE) +set(CMAKE_COMPILER_IS_MINGW ) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_C_COMPILER_ENV_VAR "CC") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_C_COMPILER_ID_RUN 1) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) +set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_C_LINKER_PREFERENCE 10) + +# Save compiler ABI information. +set(CMAKE_C_SIZEOF_DATA_PTR "4") +set(CMAKE_C_COMPILER_ABI "ELF") +set(CMAKE_C_LIBRARY_ARCHITECTURE "arm-linux-gnueabihf") + +if(CMAKE_C_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_C_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +endif() + +if(CMAKE_C_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "arm-linux-gnueabihf") +endif() + +set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "c") +set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/arm-linux-gnueabihf/6;/usr/lib/arm-linux-gnueabihf;/usr/lib;/lib/arm-linux-gnueabihf") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeCXXCompiler.cmake b/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeCXXCompiler.cmake new file mode 100644 index 00000000..71d1bc5e --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeCXXCompiler.cmake @@ -0,0 +1,69 @@ +set(CMAKE_CXX_COMPILER "/usr/bin/c++") +set(CMAKE_CXX_COMPILER_ARG1 "") +set(CMAKE_CXX_COMPILER_ID "GNU") +set(CMAKE_CXX_COMPILER_VERSION "6.3.0") +set(CMAKE_CXX_COMPILER_WRAPPER "") +set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14") +set(CMAKE_CXX_COMPILE_FEATURES "cxx_template_template_parameters;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") +set(CMAKE_CXX98_COMPILE_FEATURES "cxx_template_template_parameters") +set(CMAKE_CXX11_COMPILE_FEATURES "cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") +set(CMAKE_CXX14_COMPILE_FEATURES "cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") + +set(CMAKE_CXX_PLATFORM_ID "Linux") +set(CMAKE_CXX_SIMULATE_ID "") +set(CMAKE_CXX_SIMULATE_VERSION "") + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_COMPILER_IS_GNUCXX 1) +set(CMAKE_CXX_COMPILER_LOADED 1) +set(CMAKE_CXX_COMPILER_WORKS TRUE) +set(CMAKE_CXX_ABI_COMPILED TRUE) +set(CMAKE_COMPILER_IS_MINGW ) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_CXX_COMPILER_ID_RUN 1) +set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP) +set(CMAKE_CXX_LINKER_PREFERENCE 30) +set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) + +# Save compiler ABI information. +set(CMAKE_CXX_SIZEOF_DATA_PTR "4") +set(CMAKE_CXX_COMPILER_ABI "ELF") +set(CMAKE_CXX_LIBRARY_ARCHITECTURE "arm-linux-gnueabihf") + +if(CMAKE_CXX_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_CXX_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") +endif() + +if(CMAKE_CXX_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "arm-linux-gnueabihf") +endif() + +set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;c") +set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/arm-linux-gnueabihf/6;/usr/lib/arm-linux-gnueabihf;/usr/lib;/lib/arm-linux-gnueabihf") +set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeDetermineCompilerABI_C.bin b/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeDetermineCompilerABI_C.bin new file mode 100755 index 00000000..a67974bb Binary files /dev/null and b/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeDetermineCompilerABI_C.bin differ diff --git a/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeDetermineCompilerABI_CXX.bin b/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeDetermineCompilerABI_CXX.bin new file mode 100755 index 00000000..26e2bc16 Binary files /dev/null and b/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeDetermineCompilerABI_CXX.bin differ diff --git a/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeSystem.cmake b/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeSystem.cmake new file mode 100644 index 00000000..7501baee --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/3.7.2/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Linux-4.19.57-v7+") +set(CMAKE_HOST_SYSTEM_NAME "Linux") +set(CMAKE_HOST_SYSTEM_VERSION "4.19.57-v7+") +set(CMAKE_HOST_SYSTEM_PROCESSOR "armv7l") + + + +set(CMAKE_SYSTEM "Linux-4.19.57-v7+") +set(CMAKE_SYSTEM_NAME "Linux") +set(CMAKE_SYSTEM_VERSION "4.19.57-v7+") +set(CMAKE_SYSTEM_PROCESSOR "armv7l") + +set(CMAKE_CROSSCOMPILING "FALSE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/src/b5t007001/stblib/CMakeFiles/3.7.2/CompilerIdC/CMakeCCompilerId.c b/src/b5t007001/stblib/CMakeFiles/3.7.2/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 00000000..512e3606 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/3.7.2/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,561 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif +#if defined(__CLASSIC_C__) +/* cv-qualifiers did not exist in K&R C */ +# define const +# define volatile +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif + /* __INTEL_COMPILER = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) +# define COMPILER_ID "Fujitsu" + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__BCC__) +# define COMPILER_ID "Bruce" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" + +#elif defined(__ARMCC_VERSION) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(SDCC) +# define COMPILER_ID "SDCC" + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) + +#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) +# define COMPILER_ID "MIPSpro" +# if defined(_SGI_COMPILER_VERSION) + /* _SGI_COMPILER_VERSION = VRP */ +# define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100) +# define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10) +# define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10) +# else + /* _COMPILER_VERSION = VRP */ +# define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100) +# define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10) +# define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__sgi) +# define COMPILER_ID "MIPSpro" + +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXE) || defined(__CRAYXC) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) +# define PLATFORM_ID "IRIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number components. */ +#ifdef COMPILER_VERSION_MAJOR +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + + +#if !defined(__STDC__) +# if defined(_MSC_VER) && !defined(__clang__) +# define C_DIALECT "90" +# else +# define C_DIALECT +# endif +#elif __STDC_VERSION__ >= 201000L +# define C_DIALECT "11" +#elif __STDC_VERSION__ >= 199901L +# define C_DIALECT "99" +#else +# define C_DIALECT "90" +#endif +const char* info_language_dialect_default = + "INFO" ":" "dialect_default[" C_DIALECT "]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +# if defined(__CLASSIC_C__) +int main(argc, argv) int argc; char *argv[]; +# else +int main(int argc, char* argv[]) +# endif +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXE) || defined(__CRAYXC) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/src/b5t007001/stblib/CMakeFiles/3.7.2/CompilerIdC/a.out b/src/b5t007001/stblib/CMakeFiles/3.7.2/CompilerIdC/a.out new file mode 100755 index 00000000..c15b035a Binary files /dev/null and b/src/b5t007001/stblib/CMakeFiles/3.7.2/CompilerIdC/a.out differ diff --git a/src/b5t007001/stblib/CMakeFiles/3.7.2/CompilerIdCXX/CMakeCXXCompilerId.cpp b/src/b5t007001/stblib/CMakeFiles/3.7.2/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 00000000..a6e6bede --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/3.7.2/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,533 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__COMO__) +# define COMPILER_ID "Comeau" + /* __COMO_VERSION__ = VRR */ +# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) +# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) + +#elif defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif + /* __INTEL_COMPILER = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" +# if __SUNPRO_CC >= 0x5100 + /* __SUNPRO_CC = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# endif + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + /* __HP_aCC = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + /* __DECCXX_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) + +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 +# define COMPILER_ID "XL" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) +# define COMPILER_ID "Fujitsu" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" + +#elif defined(__ARMCC_VERSION) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) +# define COMPILER_ID "MIPSpro" +# if defined(_SGI_COMPILER_VERSION) + /* _SGI_COMPILER_VERSION = VRP */ +# define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100) +# define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10) +# define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10) +# else + /* _COMPILER_VERSION = VRP */ +# define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100) +# define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10) +# define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__sgi) +# define COMPILER_ID "MIPSpro" + +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXE) || defined(__CRAYXC) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) +# define PLATFORM_ID "IRIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number components. */ +#ifdef COMPILER_VERSION_MAJOR +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + + +const char* info_language_dialect_default = "INFO" ":" "dialect_default[" +#if __cplusplus >= 201402L + "14" +#elif __cplusplus >= 201103L + "11" +#else + "98" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXE) || defined(__CRAYXC) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} diff --git a/src/b5t007001/stblib/CMakeFiles/3.7.2/CompilerIdCXX/a.out b/src/b5t007001/stblib/CMakeFiles/3.7.2/CompilerIdCXX/a.out new file mode 100755 index 00000000..2c3be7f9 Binary files /dev/null and b/src/b5t007001/stblib/CMakeFiles/3.7.2/CompilerIdCXX/a.out differ diff --git a/src/b5t007001/stblib/CMakeFiles/CMakeDirectoryInformation.cmake b/src/b5t007001/stblib/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 00000000..f346af27 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.7 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/pi/upm/src/b5t007001/stblib") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/pi/upm/src/b5t007001/stblib") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/src/b5t007001/stblib/CMakeFiles/CMakeOutput.log b/src/b5t007001/stblib/CMakeFiles/CMakeOutput.log new file mode 100644 index 00000000..2baad80a --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/CMakeOutput.log @@ -0,0 +1,542 @@ +The system is: Linux - 4.19.57-v7+ - armv7l +Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. +Compiler: /usr/bin/cc +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out" + +The C compiler identification is GNU, found in "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/3.7.2/CompilerIdC/a.out" + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. +Compiler: /usr/bin/c++ +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out" + +The CXX compiler identification is GNU, found in "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/3.7.2/CompilerIdCXX/a.out" + +Determining if the C compiler works passed with the following output: +Change Dir: /home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_a62dc/fast" +/usr/bin/make -f CMakeFiles/cmTC_a62dc.dir/build.make CMakeFiles/cmTC_a62dc.dir/build +make[1]: Entering directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_a62dc.dir/testCCompiler.c.o +/usr/bin/cc -o CMakeFiles/cmTC_a62dc.dir/testCCompiler.c.o -c /home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp/testCCompiler.c +Linking C executable cmTC_a62dc +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a62dc.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_a62dc.dir/testCCompiler.c.o -o cmTC_a62dc -rdynamic +make[1]: Leaving directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' + + +Detecting C compiler ABI info compiled with the following output: +Change Dir: /home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_c7421/fast" +/usr/bin/make -f CMakeFiles/cmTC_c7421.dir/build.make CMakeFiles/cmTC_c7421.dir/build +make[1]: Entering directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_c7421.dir/CMakeCCompilerABI.c.o +/usr/bin/cc -o CMakeFiles/cmTC_c7421.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.7/Modules/CMakeCCompilerABI.c +Linking C executable cmTC_c7421 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c7421.dir/link.txt --verbose=1 +/usr/bin/cc -v CMakeFiles/cmTC_c7421.dir/CMakeCCompilerABI.c.o -o cmTC_c7421 -rdynamic +Using built-in specs. +COLLECT_GCC=/usr/bin/cc +COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper +Target: arm-linux-gnueabihf +Configured with: ../src/configure -v --with-pkgversion='Raspbian 6.3.0-18+rpi1+deb9u1' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf +Thread model: posix +gcc version 6.3.0 20170516 (Raspbian 6.3.0-18+rpi1+deb9u1) +COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/ +LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/6/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_c7421' '-rdynamic' '-march=armv6' '-mfloat-abi=hard' '-mfpu=vfp' '-mtls-dialect=gnu' + /usr/lib/gcc/arm-linux-gnueabihf/6/collect2 -plugin /usr/lib/gcc/arm-linux-gnueabihf/6/liblto_plugin.so -plugin-opt=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper -plugin-opt=-fresolution=/tmp/ccodk4Xp.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X --hash-style=gnu -m armelf_linux_eabi -o cmTC_c7421 /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crt1.o /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/6/crtbegin.o -L/usr/lib/gcc/arm-linux-gnueabihf/6 -L/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/6/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf CMakeFiles/cmTC_c7421.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/arm-linux-gnueabihf/6/crtend.o /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crtn.o +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_c7421' '-rdynamic' '-march=armv6' '-mfloat-abi=hard' '-mfpu=vfp' '-mtls-dialect=gnu' +make[1]: Leaving directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' + + +Parsed C implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command:"/usr/bin/make" "cmTC_c7421/fast"] + ignore line: [/usr/bin/make -f CMakeFiles/cmTC_c7421.dir/build.make CMakeFiles/cmTC_c7421.dir/build] + ignore line: [make[1]: Entering directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp'] + ignore line: [Building C object CMakeFiles/cmTC_c7421.dir/CMakeCCompilerABI.c.o] + ignore line: [/usr/bin/cc -o CMakeFiles/cmTC_c7421.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.7/Modules/CMakeCCompilerABI.c] + ignore line: [Linking C executable cmTC_c7421] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c7421.dir/link.txt --verbose=1] + ignore line: [/usr/bin/cc -v CMakeFiles/cmTC_c7421.dir/CMakeCCompilerABI.c.o -o cmTC_c7421 -rdynamic ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/cc] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper] + ignore line: [Target: arm-linux-gnueabihf] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Raspbian 6.3.0-18+rpi1+deb9u1' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf] + ignore line: [Thread model: posix] + ignore line: [gcc version 6.3.0 20170516 (Raspbian 6.3.0-18+rpi1+deb9u1) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/6/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_c7421' '-rdynamic' '-march=armv6' '-mfloat-abi=hard' '-mfpu=vfp' '-mtls-dialect=gnu'] + link line: [ /usr/lib/gcc/arm-linux-gnueabihf/6/collect2 -plugin /usr/lib/gcc/arm-linux-gnueabihf/6/liblto_plugin.so -plugin-opt=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper -plugin-opt=-fresolution=/tmp/ccodk4Xp.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X --hash-style=gnu -m armelf_linux_eabi -o cmTC_c7421 /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crt1.o /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/6/crtbegin.o -L/usr/lib/gcc/arm-linux-gnueabihf/6 -L/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/6/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf CMakeFiles/cmTC_c7421.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/arm-linux-gnueabihf/6/crtend.o /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crtn.o] + arg [/usr/lib/gcc/arm-linux-gnueabihf/6/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/arm-linux-gnueabihf/6/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/ccodk4Xp.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [--sysroot=/] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-export-dynamic] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib/ld-linux-armhf.so.3] ==> ignore + arg [-X] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [-m] ==> ignore + arg [armelf_linux_eabi] ==> ignore + arg [-o] ==> ignore + arg [cmTC_c7421] ==> ignore + arg [/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crt1.o] ==> ignore + arg [/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crti.o] ==> ignore + arg [/usr/lib/gcc/arm-linux-gnueabihf/6/crtbegin.o] ==> ignore + arg [-L/usr/lib/gcc/arm-linux-gnueabihf/6] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/6] + arg [-L/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf] + arg [-L/usr/lib/gcc/arm-linux-gnueabihf/6/../../..] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/6/../../..] + arg [-L/lib/arm-linux-gnueabihf] ==> dir [/lib/arm-linux-gnueabihf] + arg [-L/usr/lib/arm-linux-gnueabihf] ==> dir [/usr/lib/arm-linux-gnueabihf] + arg [CMakeFiles/cmTC_c7421.dir/CMakeCCompilerABI.c.o] ==> ignore + arg [-lgcc] ==> lib [gcc] + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--no-as-needed] ==> ignore + arg [-lc] ==> lib [c] + arg [-lgcc] ==> lib [gcc] + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--no-as-needed] ==> ignore + arg [/usr/lib/gcc/arm-linux-gnueabihf/6/crtend.o] ==> ignore + arg [/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crtn.o] ==> ignore + remove lib [gcc] + remove lib [gcc_s] + remove lib [gcc] + remove lib [gcc_s] + collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/6] ==> [/usr/lib/gcc/arm-linux-gnueabihf/6] + collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf] ==> [/usr/lib/arm-linux-gnueabihf] + collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/6/../../..] ==> [/usr/lib] + collapse library dir [/lib/arm-linux-gnueabihf] ==> [/lib/arm-linux-gnueabihf] + collapse library dir [/usr/lib/arm-linux-gnueabihf] ==> [/usr/lib/arm-linux-gnueabihf] + implicit libs: [c] + implicit dirs: [/usr/lib/gcc/arm-linux-gnueabihf/6;/usr/lib/arm-linux-gnueabihf;/usr/lib;/lib/arm-linux-gnueabihf] + implicit fwks: [] + + + + +Detecting C [-std=c11] compiler features compiled with the following output: +Change Dir: /home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_5e9a3/fast" +/usr/bin/make -f CMakeFiles/cmTC_5e9a3.dir/build.make CMakeFiles/cmTC_5e9a3.dir/build +make[1]: Entering directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_5e9a3.dir/feature_tests.c.o +/usr/bin/cc -std=c11 -o CMakeFiles/cmTC_5e9a3.dir/feature_tests.c.o -c /home/pi/upm/src/b5t007001/stblib/CMakeFiles/feature_tests.c +Linking C executable cmTC_5e9a3 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_5e9a3.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_5e9a3.dir/feature_tests.c.o -o cmTC_5e9a3 -rdynamic +make[1]: Leaving directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' + + + Feature record: C_FEATURE:1c_function_prototypes + Feature record: C_FEATURE:1c_restrict + Feature record: C_FEATURE:1c_static_assert + Feature record: C_FEATURE:1c_variadic_macros + + +Detecting C [-std=c99] compiler features compiled with the following output: +Change Dir: /home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_410af/fast" +/usr/bin/make -f CMakeFiles/cmTC_410af.dir/build.make CMakeFiles/cmTC_410af.dir/build +make[1]: Entering directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_410af.dir/feature_tests.c.o +/usr/bin/cc -std=c99 -o CMakeFiles/cmTC_410af.dir/feature_tests.c.o -c /home/pi/upm/src/b5t007001/stblib/CMakeFiles/feature_tests.c +Linking C executable cmTC_410af +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_410af.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_410af.dir/feature_tests.c.o -o cmTC_410af -rdynamic +make[1]: Leaving directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' + + + Feature record: C_FEATURE:1c_function_prototypes + Feature record: C_FEATURE:1c_restrict + Feature record: C_FEATURE:0c_static_assert + Feature record: C_FEATURE:1c_variadic_macros + + +Detecting C [-std=c90] compiler features compiled with the following output: +Change Dir: /home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_520d7/fast" +/usr/bin/make -f CMakeFiles/cmTC_520d7.dir/build.make CMakeFiles/cmTC_520d7.dir/build +make[1]: Entering directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_520d7.dir/feature_tests.c.o +/usr/bin/cc -std=c90 -o CMakeFiles/cmTC_520d7.dir/feature_tests.c.o -c /home/pi/upm/src/b5t007001/stblib/CMakeFiles/feature_tests.c +Linking C executable cmTC_520d7 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_520d7.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_520d7.dir/feature_tests.c.o -o cmTC_520d7 -rdynamic +make[1]: Leaving directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' + + + Feature record: C_FEATURE:1c_function_prototypes + Feature record: C_FEATURE:0c_restrict + Feature record: C_FEATURE:0c_static_assert + Feature record: C_FEATURE:0c_variadic_macros +Determining if the CXX compiler works passed with the following output: +Change Dir: /home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_71501/fast" +/usr/bin/make -f CMakeFiles/cmTC_71501.dir/build.make CMakeFiles/cmTC_71501.dir/build +make[1]: Entering directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_71501.dir/testCXXCompiler.cxx.o +/usr/bin/c++ -o CMakeFiles/cmTC_71501.dir/testCXXCompiler.cxx.o -c /home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +Linking CXX executable cmTC_71501 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_71501.dir/link.txt --verbose=1 +/usr/bin/c++ CMakeFiles/cmTC_71501.dir/testCXXCompiler.cxx.o -o cmTC_71501 -rdynamic +make[1]: Leaving directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' + + +Detecting CXX compiler ABI info compiled with the following output: +Change Dir: /home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_d1043/fast" +/usr/bin/make -f CMakeFiles/cmTC_d1043.dir/build.make CMakeFiles/cmTC_d1043.dir/build +make[1]: Entering directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_d1043.dir/CMakeCXXCompilerABI.cpp.o +/usr/bin/c++ -o CMakeFiles/cmTC_d1043.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.7/Modules/CMakeCXXCompilerABI.cpp +Linking CXX executable cmTC_d1043 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d1043.dir/link.txt --verbose=1 +/usr/bin/c++ -v CMakeFiles/cmTC_d1043.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_d1043 -rdynamic +Using built-in specs. +COLLECT_GCC=/usr/bin/c++ +COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper +Target: arm-linux-gnueabihf +Configured with: ../src/configure -v --with-pkgversion='Raspbian 6.3.0-18+rpi1+deb9u1' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf +Thread model: posix +gcc version 6.3.0 20170516 (Raspbian 6.3.0-18+rpi1+deb9u1) +COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/ +LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/6/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_d1043' '-rdynamic' '-shared-libgcc' '-march=armv6' '-mfloat-abi=hard' '-mfpu=vfp' '-mtls-dialect=gnu' + /usr/lib/gcc/arm-linux-gnueabihf/6/collect2 -plugin /usr/lib/gcc/arm-linux-gnueabihf/6/liblto_plugin.so -plugin-opt=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper -plugin-opt=-fresolution=/tmp/ccKvdwNb.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X --hash-style=gnu -m armelf_linux_eabi -o cmTC_d1043 /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crt1.o /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/6/crtbegin.o -L/usr/lib/gcc/arm-linux-gnueabihf/6 -L/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/6/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf CMakeFiles/cmTC_d1043.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/arm-linux-gnueabihf/6/crtend.o /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crtn.o +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_d1043' '-rdynamic' '-shared-libgcc' '-march=armv6' '-mfloat-abi=hard' '-mfpu=vfp' '-mtls-dialect=gnu' +make[1]: Leaving directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' + + +Parsed CXX implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command:"/usr/bin/make" "cmTC_d1043/fast"] + ignore line: [/usr/bin/make -f CMakeFiles/cmTC_d1043.dir/build.make CMakeFiles/cmTC_d1043.dir/build] + ignore line: [make[1]: Entering directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp'] + ignore line: [Building CXX object CMakeFiles/cmTC_d1043.dir/CMakeCXXCompilerABI.cpp.o] + ignore line: [/usr/bin/c++ -o CMakeFiles/cmTC_d1043.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.7/Modules/CMakeCXXCompilerABI.cpp] + ignore line: [Linking CXX executable cmTC_d1043] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d1043.dir/link.txt --verbose=1] + ignore line: [/usr/bin/c++ -v CMakeFiles/cmTC_d1043.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_d1043 -rdynamic ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/c++] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper] + ignore line: [Target: arm-linux-gnueabihf] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Raspbian 6.3.0-18+rpi1+deb9u1' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf] + ignore line: [Thread model: posix] + ignore line: [gcc version 6.3.0 20170516 (Raspbian 6.3.0-18+rpi1+deb9u1) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/6/:/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/6/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_d1043' '-rdynamic' '-shared-libgcc' '-march=armv6' '-mfloat-abi=hard' '-mfpu=vfp' '-mtls-dialect=gnu'] + link line: [ /usr/lib/gcc/arm-linux-gnueabihf/6/collect2 -plugin /usr/lib/gcc/arm-linux-gnueabihf/6/liblto_plugin.so -plugin-opt=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper -plugin-opt=-fresolution=/tmp/ccKvdwNb.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X --hash-style=gnu -m armelf_linux_eabi -o cmTC_d1043 /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crt1.o /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/6/crtbegin.o -L/usr/lib/gcc/arm-linux-gnueabihf/6 -L/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/6/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf CMakeFiles/cmTC_d1043.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/arm-linux-gnueabihf/6/crtend.o /usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crtn.o] + arg [/usr/lib/gcc/arm-linux-gnueabihf/6/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/arm-linux-gnueabihf/6/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/ccKvdwNb.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [--sysroot=/] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-export-dynamic] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib/ld-linux-armhf.so.3] ==> ignore + arg [-X] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [-m] ==> ignore + arg [armelf_linux_eabi] ==> ignore + arg [-o] ==> ignore + arg [cmTC_d1043] ==> ignore + arg [/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crt1.o] ==> ignore + arg [/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crti.o] ==> ignore + arg [/usr/lib/gcc/arm-linux-gnueabihf/6/crtbegin.o] ==> ignore + arg [-L/usr/lib/gcc/arm-linux-gnueabihf/6] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/6] + arg [-L/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf] + arg [-L/usr/lib/gcc/arm-linux-gnueabihf/6/../../..] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/6/../../..] + arg [-L/lib/arm-linux-gnueabihf] ==> dir [/lib/arm-linux-gnueabihf] + arg [-L/usr/lib/arm-linux-gnueabihf] ==> dir [/usr/lib/arm-linux-gnueabihf] + arg [CMakeFiles/cmTC_d1043.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore + arg [-lstdc++] ==> lib [stdc++] + arg [-lm] ==> lib [m] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [-lc] ==> lib [c] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [/usr/lib/gcc/arm-linux-gnueabihf/6/crtend.o] ==> ignore + arg [/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf/crtn.o] ==> ignore + remove lib [gcc_s] + remove lib [gcc] + remove lib [gcc_s] + remove lib [gcc] + collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/6] ==> [/usr/lib/gcc/arm-linux-gnueabihf/6] + collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/6/../../../arm-linux-gnueabihf] ==> [/usr/lib/arm-linux-gnueabihf] + collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/6/../../..] ==> [/usr/lib] + collapse library dir [/lib/arm-linux-gnueabihf] ==> [/lib/arm-linux-gnueabihf] + collapse library dir [/usr/lib/arm-linux-gnueabihf] ==> [/usr/lib/arm-linux-gnueabihf] + implicit libs: [stdc++;m;c] + implicit dirs: [/usr/lib/gcc/arm-linux-gnueabihf/6;/usr/lib/arm-linux-gnueabihf;/usr/lib;/lib/arm-linux-gnueabihf] + implicit fwks: [] + + + + +Detecting CXX [-std=c++14] compiler features compiled with the following output: +Change Dir: /home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_6dba5/fast" +/usr/bin/make -f CMakeFiles/cmTC_6dba5.dir/build.make CMakeFiles/cmTC_6dba5.dir/build +make[1]: Entering directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_6dba5.dir/feature_tests.cxx.o +/usr/bin/c++ -std=c++14 -o CMakeFiles/cmTC_6dba5.dir/feature_tests.cxx.o -c /home/pi/upm/src/b5t007001/stblib/CMakeFiles/feature_tests.cxx +Linking CXX executable cmTC_6dba5 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6dba5.dir/link.txt --verbose=1 +/usr/bin/c++ CMakeFiles/cmTC_6dba5.dir/feature_tests.cxx.o -o cmTC_6dba5 -rdynamic +make[1]: Leaving directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' + + + Feature record: CXX_FEATURE:1cxx_aggregate_default_initializers + Feature record: CXX_FEATURE:1cxx_alias_templates + Feature record: CXX_FEATURE:1cxx_alignas + Feature record: CXX_FEATURE:1cxx_alignof + Feature record: CXX_FEATURE:1cxx_attributes + Feature record: CXX_FEATURE:1cxx_attribute_deprecated + Feature record: CXX_FEATURE:1cxx_auto_type + Feature record: CXX_FEATURE:1cxx_binary_literals + Feature record: CXX_FEATURE:1cxx_constexpr + Feature record: CXX_FEATURE:1cxx_contextual_conversions + Feature record: CXX_FEATURE:1cxx_decltype + Feature record: CXX_FEATURE:1cxx_decltype_auto + Feature record: CXX_FEATURE:1cxx_decltype_incomplete_return_types + Feature record: CXX_FEATURE:1cxx_default_function_template_args + Feature record: CXX_FEATURE:1cxx_defaulted_functions + Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers + Feature record: CXX_FEATURE:1cxx_delegating_constructors + Feature record: CXX_FEATURE:1cxx_deleted_functions + Feature record: CXX_FEATURE:1cxx_digit_separators + Feature record: CXX_FEATURE:1cxx_enum_forward_declarations + Feature record: CXX_FEATURE:1cxx_explicit_conversions + Feature record: CXX_FEATURE:1cxx_extended_friend_declarations + Feature record: CXX_FEATURE:1cxx_extern_templates + Feature record: CXX_FEATURE:1cxx_final + Feature record: CXX_FEATURE:1cxx_func_identifier + Feature record: CXX_FEATURE:1cxx_generalized_initializers + Feature record: CXX_FEATURE:1cxx_generic_lambdas + Feature record: CXX_FEATURE:1cxx_inheriting_constructors + Feature record: CXX_FEATURE:1cxx_inline_namespaces + Feature record: CXX_FEATURE:1cxx_lambdas + Feature record: CXX_FEATURE:1cxx_lambda_init_captures + Feature record: CXX_FEATURE:1cxx_local_type_template_args + Feature record: CXX_FEATURE:1cxx_long_long_type + Feature record: CXX_FEATURE:1cxx_noexcept + Feature record: CXX_FEATURE:1cxx_nonstatic_member_init + Feature record: CXX_FEATURE:1cxx_nullptr + Feature record: CXX_FEATURE:1cxx_override + Feature record: CXX_FEATURE:1cxx_range_for + Feature record: CXX_FEATURE:1cxx_raw_string_literals + Feature record: CXX_FEATURE:1cxx_reference_qualified_functions + Feature record: CXX_FEATURE:1cxx_relaxed_constexpr + Feature record: CXX_FEATURE:1cxx_return_type_deduction + Feature record: CXX_FEATURE:1cxx_right_angle_brackets + Feature record: CXX_FEATURE:1cxx_rvalue_references + Feature record: CXX_FEATURE:1cxx_sizeof_member + Feature record: CXX_FEATURE:1cxx_static_assert + Feature record: CXX_FEATURE:1cxx_strong_enums + Feature record: CXX_FEATURE:1cxx_template_template_parameters + Feature record: CXX_FEATURE:1cxx_thread_local + Feature record: CXX_FEATURE:1cxx_trailing_return_types + Feature record: CXX_FEATURE:1cxx_unicode_literals + Feature record: CXX_FEATURE:1cxx_uniform_initialization + Feature record: CXX_FEATURE:1cxx_unrestricted_unions + Feature record: CXX_FEATURE:1cxx_user_literals + Feature record: CXX_FEATURE:1cxx_variable_templates + Feature record: CXX_FEATURE:1cxx_variadic_macros + Feature record: CXX_FEATURE:1cxx_variadic_templates + + +Detecting CXX [-std=c++11] compiler features compiled with the following output: +Change Dir: /home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_f2cb8/fast" +/usr/bin/make -f CMakeFiles/cmTC_f2cb8.dir/build.make CMakeFiles/cmTC_f2cb8.dir/build +make[1]: Entering directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_f2cb8.dir/feature_tests.cxx.o +/usr/bin/c++ -std=c++11 -o CMakeFiles/cmTC_f2cb8.dir/feature_tests.cxx.o -c /home/pi/upm/src/b5t007001/stblib/CMakeFiles/feature_tests.cxx +Linking CXX executable cmTC_f2cb8 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f2cb8.dir/link.txt --verbose=1 +/usr/bin/c++ CMakeFiles/cmTC_f2cb8.dir/feature_tests.cxx.o -o cmTC_f2cb8 -rdynamic +make[1]: Leaving directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' + + + Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers + Feature record: CXX_FEATURE:1cxx_alias_templates + Feature record: CXX_FEATURE:1cxx_alignas + Feature record: CXX_FEATURE:1cxx_alignof + Feature record: CXX_FEATURE:1cxx_attributes + Feature record: CXX_FEATURE:0cxx_attribute_deprecated + Feature record: CXX_FEATURE:1cxx_auto_type + Feature record: CXX_FEATURE:0cxx_binary_literals + Feature record: CXX_FEATURE:1cxx_constexpr + Feature record: CXX_FEATURE:0cxx_contextual_conversions + Feature record: CXX_FEATURE:1cxx_decltype + Feature record: CXX_FEATURE:0cxx_decltype_auto + Feature record: CXX_FEATURE:1cxx_decltype_incomplete_return_types + Feature record: CXX_FEATURE:1cxx_default_function_template_args + Feature record: CXX_FEATURE:1cxx_defaulted_functions + Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers + Feature record: CXX_FEATURE:1cxx_delegating_constructors + Feature record: CXX_FEATURE:1cxx_deleted_functions + Feature record: CXX_FEATURE:0cxx_digit_separators + Feature record: CXX_FEATURE:1cxx_enum_forward_declarations + Feature record: CXX_FEATURE:1cxx_explicit_conversions + Feature record: CXX_FEATURE:1cxx_extended_friend_declarations + Feature record: CXX_FEATURE:1cxx_extern_templates + Feature record: CXX_FEATURE:1cxx_final + Feature record: CXX_FEATURE:1cxx_func_identifier + Feature record: CXX_FEATURE:1cxx_generalized_initializers + Feature record: CXX_FEATURE:0cxx_generic_lambdas + Feature record: CXX_FEATURE:1cxx_inheriting_constructors + Feature record: CXX_FEATURE:1cxx_inline_namespaces + Feature record: CXX_FEATURE:1cxx_lambdas + Feature record: CXX_FEATURE:0cxx_lambda_init_captures + Feature record: CXX_FEATURE:1cxx_local_type_template_args + Feature record: CXX_FEATURE:1cxx_long_long_type + Feature record: CXX_FEATURE:1cxx_noexcept + Feature record: CXX_FEATURE:1cxx_nonstatic_member_init + Feature record: CXX_FEATURE:1cxx_nullptr + Feature record: CXX_FEATURE:1cxx_override + Feature record: CXX_FEATURE:1cxx_range_for + Feature record: CXX_FEATURE:1cxx_raw_string_literals + Feature record: CXX_FEATURE:1cxx_reference_qualified_functions + Feature record: CXX_FEATURE:0cxx_relaxed_constexpr + Feature record: CXX_FEATURE:0cxx_return_type_deduction + Feature record: CXX_FEATURE:1cxx_right_angle_brackets + Feature record: CXX_FEATURE:1cxx_rvalue_references + Feature record: CXX_FEATURE:1cxx_sizeof_member + Feature record: CXX_FEATURE:1cxx_static_assert + Feature record: CXX_FEATURE:1cxx_strong_enums + Feature record: CXX_FEATURE:1cxx_template_template_parameters + Feature record: CXX_FEATURE:1cxx_thread_local + Feature record: CXX_FEATURE:1cxx_trailing_return_types + Feature record: CXX_FEATURE:1cxx_unicode_literals + Feature record: CXX_FEATURE:1cxx_uniform_initialization + Feature record: CXX_FEATURE:1cxx_unrestricted_unions + Feature record: CXX_FEATURE:1cxx_user_literals + Feature record: CXX_FEATURE:0cxx_variable_templates + Feature record: CXX_FEATURE:1cxx_variadic_macros + Feature record: CXX_FEATURE:1cxx_variadic_templates + + +Detecting CXX [-std=c++98] compiler features compiled with the following output: +Change Dir: /home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_e6c3e/fast" +/usr/bin/make -f CMakeFiles/cmTC_e6c3e.dir/build.make CMakeFiles/cmTC_e6c3e.dir/build +make[1]: Entering directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_e6c3e.dir/feature_tests.cxx.o +/usr/bin/c++ -std=c++98 -o CMakeFiles/cmTC_e6c3e.dir/feature_tests.cxx.o -c /home/pi/upm/src/b5t007001/stblib/CMakeFiles/feature_tests.cxx +Linking CXX executable cmTC_e6c3e +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e6c3e.dir/link.txt --verbose=1 +/usr/bin/c++ CMakeFiles/cmTC_e6c3e.dir/feature_tests.cxx.o -o cmTC_e6c3e -rdynamic +make[1]: Leaving directory '/home/pi/upm/src/b5t007001/stblib/CMakeFiles/CMakeTmp' + + + Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers + Feature record: CXX_FEATURE:0cxx_alias_templates + Feature record: CXX_FEATURE:0cxx_alignas + Feature record: CXX_FEATURE:0cxx_alignof + Feature record: CXX_FEATURE:0cxx_attributes + Feature record: CXX_FEATURE:0cxx_attribute_deprecated + Feature record: CXX_FEATURE:0cxx_auto_type + Feature record: CXX_FEATURE:0cxx_binary_literals + Feature record: CXX_FEATURE:0cxx_constexpr + Feature record: CXX_FEATURE:0cxx_contextual_conversions + Feature record: CXX_FEATURE:0cxx_decltype + Feature record: CXX_FEATURE:0cxx_decltype_auto + Feature record: CXX_FEATURE:0cxx_decltype_incomplete_return_types + Feature record: CXX_FEATURE:0cxx_default_function_template_args + Feature record: CXX_FEATURE:0cxx_defaulted_functions + Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers + Feature record: CXX_FEATURE:0cxx_delegating_constructors + Feature record: CXX_FEATURE:0cxx_deleted_functions + Feature record: CXX_FEATURE:0cxx_digit_separators + Feature record: CXX_FEATURE:0cxx_enum_forward_declarations + Feature record: CXX_FEATURE:0cxx_explicit_conversions + Feature record: CXX_FEATURE:0cxx_extended_friend_declarations + Feature record: CXX_FEATURE:0cxx_extern_templates + Feature record: CXX_FEATURE:0cxx_final + Feature record: CXX_FEATURE:0cxx_func_identifier + Feature record: CXX_FEATURE:0cxx_generalized_initializers + Feature record: CXX_FEATURE:0cxx_generic_lambdas + Feature record: CXX_FEATURE:0cxx_inheriting_constructors + Feature record: CXX_FEATURE:0cxx_inline_namespaces + Feature record: CXX_FEATURE:0cxx_lambdas + Feature record: CXX_FEATURE:0cxx_lambda_init_captures + Feature record: CXX_FEATURE:0cxx_local_type_template_args + Feature record: CXX_FEATURE:0cxx_long_long_type + Feature record: CXX_FEATURE:0cxx_noexcept + Feature record: CXX_FEATURE:0cxx_nonstatic_member_init + Feature record: CXX_FEATURE:0cxx_nullptr + Feature record: CXX_FEATURE:0cxx_override + Feature record: CXX_FEATURE:0cxx_range_for + Feature record: CXX_FEATURE:0cxx_raw_string_literals + Feature record: CXX_FEATURE:0cxx_reference_qualified_functions + Feature record: CXX_FEATURE:0cxx_relaxed_constexpr + Feature record: CXX_FEATURE:0cxx_return_type_deduction + Feature record: CXX_FEATURE:0cxx_right_angle_brackets + Feature record: CXX_FEATURE:0cxx_rvalue_references + Feature record: CXX_FEATURE:0cxx_sizeof_member + Feature record: CXX_FEATURE:0cxx_static_assert + Feature record: CXX_FEATURE:0cxx_strong_enums + Feature record: CXX_FEATURE:1cxx_template_template_parameters + Feature record: CXX_FEATURE:0cxx_thread_local + Feature record: CXX_FEATURE:0cxx_trailing_return_types + Feature record: CXX_FEATURE:0cxx_unicode_literals + Feature record: CXX_FEATURE:0cxx_uniform_initialization + Feature record: CXX_FEATURE:0cxx_unrestricted_unions + Feature record: CXX_FEATURE:0cxx_user_literals + Feature record: CXX_FEATURE:0cxx_variable_templates + Feature record: CXX_FEATURE:0cxx_variadic_macros + Feature record: CXX_FEATURE:0cxx_variadic_templates diff --git a/src/b5t007001/stblib/CMakeFiles/Makefile.cmake b/src/b5t007001/stblib/CMakeFiles/Makefile.cmake new file mode 100644 index 00000000..6d19e453 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/Makefile.cmake @@ -0,0 +1,115 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.7 + +# The generator used is: +set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") + +# The top level Makefile was generated from the following files: +set(CMAKE_MAKEFILE_DEPENDS + "CMakeCache.txt" + "CMakeFiles/3.7.2/CMakeCCompiler.cmake" + "CMakeFiles/3.7.2/CMakeCXXCompiler.cmake" + "CMakeFiles/3.7.2/CMakeSystem.cmake" + "CMakeFiles/feature_tests.c" + "CMakeFiles/feature_tests.cxx" + "CMakeLists.txt" + "/usr/share/cmake-3.7/Modules/CMakeCCompiler.cmake.in" + "/usr/share/cmake-3.7/Modules/CMakeCCompilerABI.c" + "/usr/share/cmake-3.7/Modules/CMakeCInformation.cmake" + "/usr/share/cmake-3.7/Modules/CMakeCXXCompiler.cmake.in" + "/usr/share/cmake-3.7/Modules/CMakeCXXCompilerABI.cpp" + "/usr/share/cmake-3.7/Modules/CMakeCXXInformation.cmake" + "/usr/share/cmake-3.7/Modules/CMakeCommonLanguageInclude.cmake" + "/usr/share/cmake-3.7/Modules/CMakeCompilerIdDetection.cmake" + "/usr/share/cmake-3.7/Modules/CMakeDetermineCCompiler.cmake" + "/usr/share/cmake-3.7/Modules/CMakeDetermineCXXCompiler.cmake" + "/usr/share/cmake-3.7/Modules/CMakeDetermineCompileFeatures.cmake" + "/usr/share/cmake-3.7/Modules/CMakeDetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/CMakeDetermineCompilerABI.cmake" + "/usr/share/cmake-3.7/Modules/CMakeDetermineCompilerId.cmake" + "/usr/share/cmake-3.7/Modules/CMakeDetermineSystem.cmake" + "/usr/share/cmake-3.7/Modules/CMakeFindBinUtils.cmake" + "/usr/share/cmake-3.7/Modules/CMakeGenericSystem.cmake" + "/usr/share/cmake-3.7/Modules/CMakeLanguageInformation.cmake" + "/usr/share/cmake-3.7/Modules/CMakeParseArguments.cmake" + "/usr/share/cmake-3.7/Modules/CMakeParseImplicitLinkInfo.cmake" + "/usr/share/cmake-3.7/Modules/CMakeSystem.cmake.in" + "/usr/share/cmake-3.7/Modules/CMakeSystemSpecificInformation.cmake" + "/usr/share/cmake-3.7/Modules/CMakeSystemSpecificInitialize.cmake" + "/usr/share/cmake-3.7/Modules/CMakeTestCCompiler.cmake" + "/usr/share/cmake-3.7/Modules/CMakeTestCXXCompiler.cmake" + "/usr/share/cmake-3.7/Modules/CMakeTestCompilerCommon.cmake" + "/usr/share/cmake-3.7/Modules/CMakeUnixFindMake.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/ADSP-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/ARMCC-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/AppleClang-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/Borland-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/Bruce-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/Clang-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/Compaq-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/Cray-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/GHS-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/GNU-C-FeatureTests.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/GNU-C.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/GNU-CXX-FeatureTests.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/GNU-CXX.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/GNU-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/GNU.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/HP-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/HP-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/IAR-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/Intel-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/MIPSpro-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/MSVC-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/PGI-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/PathScale-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/SCO-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/SDCC-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/SunPro-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/TI-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/Watcom-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/XL-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/XL-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/zOS-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.7/Modules/Internal/FeatureTesting.cmake" + "/usr/share/cmake-3.7/Modules/Platform/Linux-Determine-CXX.cmake" + "/usr/share/cmake-3.7/Modules/Platform/Linux-GNU-C.cmake" + "/usr/share/cmake-3.7/Modules/Platform/Linux-GNU-CXX.cmake" + "/usr/share/cmake-3.7/Modules/Platform/Linux-GNU.cmake" + "/usr/share/cmake-3.7/Modules/Platform/Linux.cmake" + "/usr/share/cmake-3.7/Modules/Platform/UnixPaths.cmake" + ) + +# The corresponding makefile is: +set(CMAKE_MAKEFILE_OUTPUTS + "Makefile" + "CMakeFiles/cmake.check_cache" + ) + +# Byproducts of CMake generate step: +set(CMAKE_MAKEFILE_PRODUCTS + "CMakeFiles/3.7.2/CMakeSystem.cmake" + "CMakeFiles/3.7.2/CMakeCCompiler.cmake" + "CMakeFiles/3.7.2/CMakeCXXCompiler.cmake" + "CMakeFiles/3.7.2/CMakeCCompiler.cmake" + "CMakeFiles/3.7.2/CMakeCXXCompiler.cmake" + "CMakeFiles/CMakeDirectoryInformation.cmake" + ) + +# Dependency information for all targets: +set(CMAKE_DEPEND_INFO_FILES + "CMakeFiles/stblib.dir/DependInfo.cmake" + ) diff --git a/src/b5t007001/stblib/CMakeFiles/Makefile2 b/src/b5t007001/stblib/CMakeFiles/Makefile2 new file mode 100644 index 00000000..23547238 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/Makefile2 @@ -0,0 +1,108 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.7 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# The main recursive all target +all: + +.PHONY : all + +# The main recursive preinstall target +preinstall: + +.PHONY : preinstall + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/pi/upm/src/b5t007001/stblib + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/pi/upm/src/b5t007001/stblib + +#============================================================================= +# Target rules for target CMakeFiles/stblib.dir + +# All Build rule for target. +CMakeFiles/stblib.dir/all: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/depend + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 "Built target stblib" +.PHONY : CMakeFiles/stblib.dir/all + +# Include target in all. +all: CMakeFiles/stblib.dir/all + +.PHONY : all + +# Build rule for subdir invocation for target. +CMakeFiles/stblib.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/pi/upm/src/b5t007001/stblib/CMakeFiles 19 + $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/stblib.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/pi/upm/src/b5t007001/stblib/CMakeFiles 0 +.PHONY : CMakeFiles/stblib.dir/rule + +# Convenience name for target. +stblib: CMakeFiles/stblib.dir/rule + +.PHONY : stblib + +# clean rule for target. +CMakeFiles/stblib.dir/clean: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/clean +.PHONY : CMakeFiles/stblib.dir/clean + +# clean rule for target. +clean: CMakeFiles/stblib.dir/clean + +.PHONY : clean + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/src/b5t007001/stblib/CMakeFiles/TargetDirectories.txt b/src/b5t007001/stblib/CMakeFiles/TargetDirectories.txt new file mode 100644 index 00000000..025cddcb --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,3 @@ +/home/pi/upm/src/b5t007001/stblib/CMakeFiles/rebuild_cache.dir +/home/pi/upm/src/b5t007001/stblib/CMakeFiles/edit_cache.dir +/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir diff --git a/src/b5t007001/stblib/CMakeFiles/cmake.check_cache b/src/b5t007001/stblib/CMakeFiles/cmake.check_cache new file mode 100644 index 00000000..3dccd731 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/src/b5t007001/stblib/CMakeFiles/feature_tests.bin b/src/b5t007001/stblib/CMakeFiles/feature_tests.bin new file mode 100755 index 00000000..24cc895c Binary files /dev/null and b/src/b5t007001/stblib/CMakeFiles/feature_tests.bin differ diff --git a/src/b5t007001/stblib/CMakeFiles/feature_tests.c b/src/b5t007001/stblib/CMakeFiles/feature_tests.c new file mode 100644 index 00000000..6590dded --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/feature_tests.c @@ -0,0 +1,34 @@ + + const char features[] = {"\n" +"C_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 +"1" +#else +"0" +#endif +"c_function_prototypes\n" +"C_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +"1" +#else +"0" +#endif +"c_restrict\n" +"C_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L +"1" +#else +"0" +#endif +"c_static_assert\n" +"C_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +"1" +#else +"0" +#endif +"c_variadic_macros\n" + +}; + +int main(int argc, char** argv) { (void)argv; return features[argc]; } diff --git a/src/b5t007001/stblib/CMakeFiles/feature_tests.cxx b/src/b5t007001/stblib/CMakeFiles/feature_tests.cxx new file mode 100644 index 00000000..b93418c6 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/feature_tests.cxx @@ -0,0 +1,405 @@ + + const char features[] = {"\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L +"1" +#else +"0" +#endif +"cxx_aggregate_default_initializers\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_alias_templates\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_alignas\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_alignof\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_attributes\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_attribute_deprecated\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_auto_type\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_binary_literals\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_constexpr\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_contextual_conversions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_decltype\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_decltype_auto\n" +"CXX_FEATURE:" +#if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_decltype_incomplete_return_types\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_default_function_template_args\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_defaulted_functions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_defaulted_move_initializers\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_delegating_constructors\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_deleted_functions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_digit_separators\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_enum_forward_declarations\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_explicit_conversions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_extended_friend_declarations\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_extern_templates\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_final\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_func_identifier\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_generalized_initializers\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_generic_lambdas\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_inheriting_constructors\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_inline_namespaces\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_lambdas\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_lambda_init_captures\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_local_type_template_args\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_long_long_type\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_noexcept\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_nonstatic_member_init\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_nullptr\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_override\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_range_for\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_raw_string_literals\n" +"CXX_FEATURE:" +#if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_reference_qualified_functions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L +"1" +#else +"0" +#endif +"cxx_relaxed_constexpr\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_return_type_deduction\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_right_angle_brackets\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_rvalue_references\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_sizeof_member\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_static_assert\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_strong_enums\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && __cplusplus +"1" +#else +"0" +#endif +"cxx_template_template_parameters\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_thread_local\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_trailing_return_types\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_unicode_literals\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_uniform_initialization\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_unrestricted_unions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_user_literals\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L +"1" +#else +"0" +#endif +"cxx_variable_templates\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_variadic_macros\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_variadic_templates\n" + +}; + +int main(int argc, char** argv) { (void)argv; return features[argc]; } diff --git a/src/b5t007001/stblib/CMakeFiles/progress.marks b/src/b5t007001/stblib/CMakeFiles/progress.marks new file mode 100644 index 00000000..d6b24041 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/progress.marks @@ -0,0 +1 @@ +19 diff --git a/src/b5t007001/stblib/CMakeFiles/stblib.dir/C.includecache b/src/b5t007001/stblib/CMakeFiles/stblib.dir/C.includecache new file mode 100644 index 00000000..fa9c6a3b --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/stblib.dir/C.includecache @@ -0,0 +1,288 @@ +#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">]) + +#IncludeRegexScan: ^.*$ + +#IncludeRegexComplain: ^$ + +#IncludeRegexTransform: + +/home/pi/upm/src/b5t007001/stblib/src/STB/Interface.c +Interface.h +/home/pi/upm/src/b5t007001/stblib/src/STB/Interface.h +STBValidValue.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBValidValue.h +STBCommonDef.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBCommonDef.h +STBTracking.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBTracking.h +STBFaceInfo.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBFaceInfo.h +STBMakeResult.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBMakeResult.h + +/home/pi/upm/src/b5t007001/stblib/src/STB/Interface.h +STBTypedefInput.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBTypedefInput.h +STBHandle.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBHandle.h + +/home/pi/upm/src/b5t007001/stblib/src/STB/STBAPI.c +Interface.h +/home/pi/upm/src/b5t007001/stblib/src/STB/Interface.h +STBAPI.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBAPI.h + +/home/pi/upm/src/b5t007001/stblib/src/STB/STBAPI.h +STBTypedefInput.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBTypedefInput.h +STBTypedefOutput.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBTypedefOutput.h + +/home/pi/upm/src/b5t007001/stblib/src/STB/STBFaceInfo.c +STBCommonDef.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBCommonDef.h +STBFaceInfo.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBFaceInfo.h +STB_Debug.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STB_Debug.h +STBValidValue.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBValidValue.h + +/home/pi/upm/src/b5t007001/stblib/src/STB/STBMakeResult.c +STBMakeResult.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBMakeResult.h + +/home/pi/upm/src/b5t007001/stblib/src/STB/STBTracking.c +STBTracking.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBTracking.h +STB_Debug.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STB_Debug.h + +/home/pi/upm/src/b5t007001/stblib/src/STB/STBValidValue.c +STBValidValue.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBValidValue.h + +/home/pi/upm/src/b5t007001/stblib/src/STB/STBValidValue.h +STBTypedefInput.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBTypedefInput.h +STBCommonDef.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBCommonDef.h +STBCommonType.h +/home/pi/upm/src/b5t007001/stblib/src/STB/STBCommonType.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.c +FrInterface.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.h +STBFrAPI.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.h +STBFrTypedef.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrTypedef.h +STBCommonDef.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBCommonDef.h +STBCommonType.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBCommonType.h +STBFrValidValue.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.c +STBFrAPI.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.h +FrInterface.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.c +STBFrValidValue.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.h +STBCommonDef.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBCommonDef.h +STBCommonType.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBCommonType.h +STBFrTypedef.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrTypedef.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.c +SdkSTBFr.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.h +FrInterface.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.h +STBFrTypedef.h +/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrTypedef.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/PeInterface.c +PeInterface.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/PeInterface.h +STBPeAPI.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeAPI.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/PeInterface.h +STBPeTypedef.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeTypedef.h +STBPeValidValue.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeAPI.c +STBPeAPI.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeAPI.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeAPI.h +PeInterface.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/PeInterface.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.c +STBPeValidValue.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.h +STBCommonDef.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBCommonDef.h +STBCommonType.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBCommonType.h +STBPeTypedef.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeTypedef.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.c +SdkSTBPe.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.h +PeInterface.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/PeInterface.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.h +STBPeTypedef.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeTypedef.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.c +STBTrAPI.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.h +TrInterface.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/TrInterface.h +math.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/math.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.c +STBTrValidValue.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.h +STBCommonDef.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBCommonDef.h +STBCommonType.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBCommonType.h +STBTrTypedef.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrTypedef.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.c +SdkSTBTr.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.h +TrInterface.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/TrInterface.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.h +STBTrTypedef.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrTypedef.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/TrInterface.c +TrInterface.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/TrInterface.h +STBTrAPI.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.h + +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/TrInterface.h +STBTrTypedef.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrTypedef.h +STBCommonDef.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBCommonDef.h +STBCommonType.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBCommonType.h +STBTrValidValue.h +/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.h + +src/include/STBCommonDef.h +stdlib.h +- + +src/include/STBCommonType.h +STBTypedefOutput.h +src/include/STBTypedefOutput.h + +src/include/STBFaceInfo.h +STBTypedefInput.h +src/include/STBTypedefInput.h +STBHandle.h +src/include/STBHandle.h + +src/include/STBFrTypedef.h +STBTypedefOutput.h +src/include/STBTypedefOutput.h +STBCommonType.h +src/include/STBCommonType.h +STBCommonDef.h +src/include/STBCommonDef.h + +src/include/STBHandle.h +STBTypedefOutput.h +src/include/STBTypedefOutput.h +STBCommonType.h +src/include/STBCommonType.h +SdkSTBTr.h +src/include/SdkSTBTr.h +SdkSTBPe.h +src/include/SdkSTBPe.h +SdkSTBFr.h +src/include/SdkSTBFr.h + +src/include/STBMakeResult.h +STBHandle.h +src/include/STBHandle.h + +src/include/STBPeTypedef.h +STBTypedefOutput.h +src/include/STBTypedefOutput.h +STBCommonType.h +src/include/STBCommonType.h +STBCommonDef.h +src/include/STBCommonDef.h + +src/include/STBTrTypedef.h +STBTypedefOutput.h +src/include/STBTypedefOutput.h +STBCommonType.h +src/include/STBCommonType.h +STBCommonDef.h +src/include/STBCommonDef.h + +src/include/STBTracking.h +STBTypedefInput.h +src/include/STBTypedefInput.h +STBHandle.h +src/include/STBHandle.h + +src/include/STBTypedefInput.h + +src/include/STBTypedefOutput.h + +src/include/STB_Debug.h +assert.h +- + +src/include/SdkSTBFr.h +STBFrTypedef.h +src/include/STBFrTypedef.h + +src/include/SdkSTBPe.h +STBPeTypedef.h +src/include/STBPeTypedef.h + +src/include/SdkSTBTr.h +STBTrTypedef.h +src/include/STBTrTypedef.h + diff --git a/src/b5t007001/stblib/CMakeFiles/stblib.dir/DependInfo.cmake b/src/b5t007001/stblib/CMakeFiles/stblib.dir/DependInfo.cmake new file mode 100644 index 00000000..e3f43c59 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/stblib.dir/DependInfo.cmake @@ -0,0 +1,38 @@ +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + "C" + ) +# The set of files for implicit dependencies of each language: +set(CMAKE_DEPENDS_CHECK_C + "/home/pi/upm/src/b5t007001/stblib/src/STB/Interface.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB/Interface.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB/STBAPI.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB/STBAPI.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB/STBFaceInfo.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB/STBMakeResult.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB/STBMakeResult.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB/STBTracking.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB/STBTracking.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB/STBValidValue.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB/STBValidValue.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB_Property/PeInterface.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeAPI.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o" + "/home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/TrInterface.c" "/home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o" + ) +set(CMAKE_C_COMPILER_ID "GNU") + +# The include file search paths: +set(CMAKE_C_TARGET_INCLUDE_PATH + "src/include" + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/src/b5t007001/stblib/CMakeFiles/stblib.dir/build.make b/src/b5t007001/stblib/CMakeFiles/stblib.dir/build.make new file mode 100644 index 00000000..651c6231 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/stblib.dir/build.make @@ -0,0 +1,573 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.7 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/pi/upm/src/b5t007001/stblib + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/pi/upm/src/b5t007001/stblib + +# Include any dependencies generated for this target. +include CMakeFiles/stblib.dir/depend.make + +# Include the progress variables for this target. +include CMakeFiles/stblib.dir/progress.make + +# Include the compile flags for this target's objects. +include CMakeFiles/stblib.dir/flags.make + +CMakeFiles/stblib.dir/src/STB/Interface.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB/Interface.o: src/STB/Interface.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object CMakeFiles/stblib.dir/src/STB/Interface.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB/Interface.o -c /home/pi/upm/src/b5t007001/stblib/src/STB/Interface.c + +CMakeFiles/stblib.dir/src/STB/Interface.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB/Interface.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB/Interface.c > CMakeFiles/stblib.dir/src/STB/Interface.i + +CMakeFiles/stblib.dir/src/STB/Interface.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB/Interface.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB/Interface.c -o CMakeFiles/stblib.dir/src/STB/Interface.s + +CMakeFiles/stblib.dir/src/STB/Interface.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB/Interface.o.requires + +CMakeFiles/stblib.dir/src/STB/Interface.o.provides: CMakeFiles/stblib.dir/src/STB/Interface.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/Interface.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB/Interface.o.provides + +CMakeFiles/stblib.dir/src/STB/Interface.o.provides.build: CMakeFiles/stblib.dir/src/STB/Interface.o + + +CMakeFiles/stblib.dir/src/STB/STBAPI.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/STB/STBAPI.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building C object CMakeFiles/stblib.dir/src/STB/STBAPI.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB/STBAPI.o -c /home/pi/upm/src/b5t007001/stblib/src/STB/STBAPI.c + +CMakeFiles/stblib.dir/src/STB/STBAPI.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB/STBAPI.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB/STBAPI.c > CMakeFiles/stblib.dir/src/STB/STBAPI.i + +CMakeFiles/stblib.dir/src/STB/STBAPI.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB/STBAPI.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB/STBAPI.c -o CMakeFiles/stblib.dir/src/STB/STBAPI.s + +CMakeFiles/stblib.dir/src/STB/STBAPI.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB/STBAPI.o.requires + +CMakeFiles/stblib.dir/src/STB/STBAPI.o.provides: CMakeFiles/stblib.dir/src/STB/STBAPI.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBAPI.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB/STBAPI.o.provides + +CMakeFiles/stblib.dir/src/STB/STBAPI.o.provides.build: CMakeFiles/stblib.dir/src/STB/STBAPI.o + + +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/STB/STBFaceInfo.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building C object CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o -c /home/pi/upm/src/b5t007001/stblib/src/STB/STBFaceInfo.c + +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB/STBFaceInfo.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB/STBFaceInfo.c > CMakeFiles/stblib.dir/src/STB/STBFaceInfo.i + +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB/STBFaceInfo.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB/STBFaceInfo.c -o CMakeFiles/stblib.dir/src/STB/STBFaceInfo.s + +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o.requires + +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o.provides: CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o.provides + +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o.provides.build: CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o + + +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o: src/STB/STBMakeResult.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building C object CMakeFiles/stblib.dir/src/STB/STBMakeResult.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB/STBMakeResult.o -c /home/pi/upm/src/b5t007001/stblib/src/STB/STBMakeResult.c + +CMakeFiles/stblib.dir/src/STB/STBMakeResult.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB/STBMakeResult.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB/STBMakeResult.c > CMakeFiles/stblib.dir/src/STB/STBMakeResult.i + +CMakeFiles/stblib.dir/src/STB/STBMakeResult.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB/STBMakeResult.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB/STBMakeResult.c -o CMakeFiles/stblib.dir/src/STB/STBMakeResult.s + +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB/STBMakeResult.o.requires + +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o.provides: CMakeFiles/stblib.dir/src/STB/STBMakeResult.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBMakeResult.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB/STBMakeResult.o.provides + +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o.provides.build: CMakeFiles/stblib.dir/src/STB/STBMakeResult.o + + +CMakeFiles/stblib.dir/src/STB/STBTracking.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/STB/STBTracking.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Building C object CMakeFiles/stblib.dir/src/STB/STBTracking.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB/STBTracking.o -c /home/pi/upm/src/b5t007001/stblib/src/STB/STBTracking.c + +CMakeFiles/stblib.dir/src/STB/STBTracking.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB/STBTracking.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB/STBTracking.c > CMakeFiles/stblib.dir/src/STB/STBTracking.i + +CMakeFiles/stblib.dir/src/STB/STBTracking.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB/STBTracking.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB/STBTracking.c -o CMakeFiles/stblib.dir/src/STB/STBTracking.s + +CMakeFiles/stblib.dir/src/STB/STBTracking.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB/STBTracking.o.requires + +CMakeFiles/stblib.dir/src/STB/STBTracking.o.provides: CMakeFiles/stblib.dir/src/STB/STBTracking.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBTracking.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB/STBTracking.o.provides + +CMakeFiles/stblib.dir/src/STB/STBTracking.o.provides.build: CMakeFiles/stblib.dir/src/STB/STBTracking.o + + +CMakeFiles/stblib.dir/src/STB/STBValidValue.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB/STBValidValue.o: src/STB/STBValidValue.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Building C object CMakeFiles/stblib.dir/src/STB/STBValidValue.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB/STBValidValue.o -c /home/pi/upm/src/b5t007001/stblib/src/STB/STBValidValue.c + +CMakeFiles/stblib.dir/src/STB/STBValidValue.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB/STBValidValue.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB/STBValidValue.c > CMakeFiles/stblib.dir/src/STB/STBValidValue.i + +CMakeFiles/stblib.dir/src/STB/STBValidValue.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB/STBValidValue.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB/STBValidValue.c -o CMakeFiles/stblib.dir/src/STB/STBValidValue.s + +CMakeFiles/stblib.dir/src/STB/STBValidValue.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB/STBValidValue.o.requires + +CMakeFiles/stblib.dir/src/STB/STBValidValue.o.provides: CMakeFiles/stblib.dir/src/STB/STBValidValue.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBValidValue.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB/STBValidValue.o.provides + +CMakeFiles/stblib.dir/src/STB/STBValidValue.o.provides.build: CMakeFiles/stblib.dir/src/STB/STBValidValue.o + + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o: src/STB_FaceRecognition/FrInterface.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) "Building C object CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o -c /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.c + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.c > CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.i + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.c -o CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.s + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o.requires + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o.provides: CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o.provides + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o.provides.build: CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o + + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o: src/STB_FaceRecognition/SdkSTBFr.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_8) "Building C object CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o -c /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.c + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.c > CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.i + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.c -o CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.s + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o.requires + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o.provides: CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o.provides + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o.provides.build: CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o + + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o: src/STB_FaceRecognition/STBFrAPI.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) "Building C object CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o -c /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.c + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.c > CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.i + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.c -o CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.s + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o.requires + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o.provides: CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o.provides + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o.provides.build: CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o + + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o: src/STB_FaceRecognition/STBFrValidValue.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_10) "Building C object CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o -c /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.c + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.c > CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.i + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.c -o CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.s + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o.requires + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o.provides: CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o.provides + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o.provides.build: CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o + + +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o: src/STB_Property/PeInterface.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_11) "Building C object CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o -c /home/pi/upm/src/b5t007001/stblib/src/STB_Property/PeInterface.c + +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB_Property/PeInterface.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB_Property/PeInterface.c > CMakeFiles/stblib.dir/src/STB_Property/PeInterface.i + +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB_Property/PeInterface.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB_Property/PeInterface.c -o CMakeFiles/stblib.dir/src/STB_Property/PeInterface.s + +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o.requires + +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o.provides: CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o.provides + +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o.provides.build: CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o + + +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o: src/STB_Property/SdkSTBPe.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_12) "Building C object CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o -c /home/pi/upm/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.c + +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.c > CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.i + +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.c -o CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.s + +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o.requires + +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o.provides: CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o.provides + +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o.provides.build: CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o + + +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o: src/STB_Property/STBPeAPI.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_13) "Building C object CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o -c /home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeAPI.c + +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeAPI.c > CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.i + +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeAPI.c -o CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.s + +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o.requires + +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o.provides: CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o.provides + +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o.provides.build: CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o + + +CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o: src/STB_Property/STBPeValidValue.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_14) "Building C object CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o -c /home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.c + +CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.c > CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.i + +CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.c -o CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.s + +CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o.requires + +CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o.provides: CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o.provides + +CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o.provides.build: CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o + + +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o: src/STB_Tracker/SdkSTBTr.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_15) "Building C object CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o -c /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.c + +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.c > CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.i + +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.c -o CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.s + +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o.requires + +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o.provides: CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o.provides + +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o.provides.build: CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o + + +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o: src/STB_Tracker/STBTrAPI.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_16) "Building C object CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o -c /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.c + +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.c > CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.i + +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.c -o CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.s + +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o.requires + +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o.provides: CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o.provides + +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o.provides.build: CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o + + +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o: src/STB_Tracker/STBTrValidValue.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_17) "Building C object CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o -c /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.c + +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.c > CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.i + +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.c -o CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.s + +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o.requires + +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o.provides: CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o.provides + +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o.provides.build: CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o + + +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o: CMakeFiles/stblib.dir/flags.make +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o: src/STB_Tracker/TrInterface.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_18) "Building C object CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o -c /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/TrInterface.c + +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/TrInterface.c > CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.i + +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/TrInterface.c -o CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.s + +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o.requires: + +.PHONY : CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o.requires + +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o.provides: CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o.requires + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o.provides.build +.PHONY : CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o.provides + +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o.provides.build: CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o + + +# Object files for target stblib +stblib_OBJECTS = \ +"CMakeFiles/stblib.dir/src/STB/Interface.o" \ +"CMakeFiles/stblib.dir/src/STB/STBAPI.o" \ +"CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o" \ +"CMakeFiles/stblib.dir/src/STB/STBMakeResult.o" \ +"CMakeFiles/stblib.dir/src/STB/STBTracking.o" \ +"CMakeFiles/stblib.dir/src/STB/STBValidValue.o" \ +"CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o" \ +"CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o" \ +"CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o" \ +"CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o" \ +"CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o" \ +"CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o" \ +"CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o" \ +"CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o" \ +"CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o" \ +"CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o" \ +"CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o" \ +"CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o" + +# External object files for target stblib +stblib_EXTERNAL_OBJECTS = + +libstblib.a: CMakeFiles/stblib.dir/src/STB/Interface.o +libstblib.a: CMakeFiles/stblib.dir/src/STB/STBAPI.o +libstblib.a: CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o +libstblib.a: CMakeFiles/stblib.dir/src/STB/STBMakeResult.o +libstblib.a: CMakeFiles/stblib.dir/src/STB/STBTracking.o +libstblib.a: CMakeFiles/stblib.dir/src/STB/STBValidValue.o +libstblib.a: CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o +libstblib.a: CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o +libstblib.a: CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o +libstblib.a: CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o +libstblib.a: CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o +libstblib.a: CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o +libstblib.a: CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o +libstblib.a: CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o +libstblib.a: CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o +libstblib.a: CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o +libstblib.a: CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o +libstblib.a: CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o +libstblib.a: CMakeFiles/stblib.dir/build.make +libstblib.a: CMakeFiles/stblib.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/pi/upm/src/b5t007001/stblib/CMakeFiles --progress-num=$(CMAKE_PROGRESS_19) "Linking C static library libstblib.a" + $(CMAKE_COMMAND) -P CMakeFiles/stblib.dir/cmake_clean_target.cmake + $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/stblib.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +CMakeFiles/stblib.dir/build: libstblib.a + +.PHONY : CMakeFiles/stblib.dir/build + +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB/Interface.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB/STBAPI.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB/STBMakeResult.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB/STBTracking.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB/STBValidValue.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o.requires +CMakeFiles/stblib.dir/requires: CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o.requires + +.PHONY : CMakeFiles/stblib.dir/requires + +CMakeFiles/stblib.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/stblib.dir/cmake_clean.cmake +.PHONY : CMakeFiles/stblib.dir/clean + +CMakeFiles/stblib.dir/depend: + cd /home/pi/upm/src/b5t007001/stblib && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/pi/upm/src/b5t007001/stblib /home/pi/upm/src/b5t007001/stblib /home/pi/upm/src/b5t007001/stblib /home/pi/upm/src/b5t007001/stblib /home/pi/upm/src/b5t007001/stblib/CMakeFiles/stblib.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/stblib.dir/depend + diff --git a/src/b5t007001/stblib/CMakeFiles/stblib.dir/cmake_clean.cmake b/src/b5t007001/stblib/CMakeFiles/stblib.dir/cmake_clean.cmake new file mode 100644 index 00000000..99048e82 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/stblib.dir/cmake_clean.cmake @@ -0,0 +1,27 @@ +file(REMOVE_RECURSE + "CMakeFiles/stblib.dir/src/STB/Interface.o" + "CMakeFiles/stblib.dir/src/STB/STBAPI.o" + "CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o" + "CMakeFiles/stblib.dir/src/STB/STBMakeResult.o" + "CMakeFiles/stblib.dir/src/STB/STBTracking.o" + "CMakeFiles/stblib.dir/src/STB/STBValidValue.o" + "CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o" + "CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o" + "CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o" + "CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o" + "CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o" + "CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o" + "CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o" + "CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o" + "CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o" + "CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o" + "CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o" + "CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o" + "libstblib.pdb" + "libstblib.a" +) + +# Per-language clean rules from dependency scanning. +foreach(lang C) + include(CMakeFiles/stblib.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/src/b5t007001/stblib/CMakeFiles/stblib.dir/cmake_clean_target.cmake b/src/b5t007001/stblib/CMakeFiles/stblib.dir/cmake_clean_target.cmake new file mode 100644 index 00000000..472e07f1 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/stblib.dir/cmake_clean_target.cmake @@ -0,0 +1,3 @@ +file(REMOVE_RECURSE + "libstblib.a" +) diff --git a/src/b5t007001/stblib/CMakeFiles/stblib.dir/depend.internal b/src/b5t007001/stblib/CMakeFiles/stblib.dir/depend.internal new file mode 100644 index 00000000..0f92590b --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/stblib.dir/depend.internal @@ -0,0 +1,189 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.7 + +CMakeFiles/stblib.dir/src/STB/Interface.o + /home/pi/upm/src/b5t007001/stblib/src/STB/Interface.c + /home/pi/upm/src/b5t007001/stblib/src/STB/Interface.h + /home/pi/upm/src/b5t007001/stblib/src/STB/STBValidValue.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBFaceInfo.h + src/include/STBFrTypedef.h + src/include/STBHandle.h + src/include/STBMakeResult.h + src/include/STBPeTypedef.h + src/include/STBTrTypedef.h + src/include/STBTracking.h + src/include/STBTypedefInput.h + src/include/STBTypedefOutput.h + src/include/SdkSTBFr.h + src/include/SdkSTBPe.h + src/include/SdkSTBTr.h +CMakeFiles/stblib.dir/src/STB/STBAPI.o + /home/pi/upm/src/b5t007001/stblib/src/STB/Interface.h + /home/pi/upm/src/b5t007001/stblib/src/STB/STBAPI.c + /home/pi/upm/src/b5t007001/stblib/src/STB/STBAPI.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBFrTypedef.h + src/include/STBHandle.h + src/include/STBPeTypedef.h + src/include/STBTrTypedef.h + src/include/STBTypedefInput.h + src/include/STBTypedefOutput.h + src/include/SdkSTBFr.h + src/include/SdkSTBPe.h + src/include/SdkSTBTr.h +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o + /home/pi/upm/src/b5t007001/stblib/src/STB/STBFaceInfo.c + /home/pi/upm/src/b5t007001/stblib/src/STB/STBValidValue.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBFaceInfo.h + src/include/STBFrTypedef.h + src/include/STBHandle.h + src/include/STBPeTypedef.h + src/include/STBTrTypedef.h + src/include/STBTypedefInput.h + src/include/STBTypedefOutput.h + src/include/STB_Debug.h + src/include/SdkSTBFr.h + src/include/SdkSTBPe.h + src/include/SdkSTBTr.h +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o + /home/pi/upm/src/b5t007001/stblib/src/STB/STBMakeResult.c + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBFrTypedef.h + src/include/STBHandle.h + src/include/STBMakeResult.h + src/include/STBPeTypedef.h + src/include/STBTrTypedef.h + src/include/STBTypedefOutput.h + src/include/SdkSTBFr.h + src/include/SdkSTBPe.h + src/include/SdkSTBTr.h +CMakeFiles/stblib.dir/src/STB/STBTracking.o + /home/pi/upm/src/b5t007001/stblib/src/STB/STBTracking.c + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBFrTypedef.h + src/include/STBHandle.h + src/include/STBPeTypedef.h + src/include/STBTrTypedef.h + src/include/STBTracking.h + src/include/STBTypedefInput.h + src/include/STBTypedefOutput.h + src/include/STB_Debug.h + src/include/SdkSTBFr.h + src/include/SdkSTBPe.h + src/include/SdkSTBTr.h +CMakeFiles/stblib.dir/src/STB/STBValidValue.o + /home/pi/upm/src/b5t007001/stblib/src/STB/STBValidValue.c + /home/pi/upm/src/b5t007001/stblib/src/STB/STBValidValue.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBTypedefInput.h + src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o + /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.c + /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.h + /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.h + /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBFrTypedef.h + src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o + /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.h + /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.c + /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.h + /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBFrTypedef.h + src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o + /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.c + /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBFrTypedef.h + src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o + /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.h + /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.h + /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.c + /home/pi/upm/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBFrTypedef.h + src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o + /home/pi/upm/src/b5t007001/stblib/src/STB_Property/PeInterface.c + /home/pi/upm/src/b5t007001/stblib/src/STB_Property/PeInterface.h + /home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeAPI.h + /home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBPeTypedef.h + src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o + /home/pi/upm/src/b5t007001/stblib/src/STB_Property/PeInterface.h + /home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeAPI.c + /home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeAPI.h + /home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBPeTypedef.h + src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o + /home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.c + /home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBPeTypedef.h + src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o + /home/pi/upm/src/b5t007001/stblib/src/STB_Property/PeInterface.h + /home/pi/upm/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.h + /home/pi/upm/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.c + /home/pi/upm/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBPeTypedef.h + src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o + /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.c + /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.h + /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.h + /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/TrInterface.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBTrTypedef.h + src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o + /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.c + /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBTrTypedef.h + src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o + /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.h + /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.c + /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.h + /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/TrInterface.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBTrTypedef.h + src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o + /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.h + /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.h + /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/TrInterface.c + /home/pi/upm/src/b5t007001/stblib/src/STB_Tracker/TrInterface.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STBTrTypedef.h + src/include/STBTypedefOutput.h diff --git a/src/b5t007001/stblib/CMakeFiles/stblib.dir/depend.make b/src/b5t007001/stblib/CMakeFiles/stblib.dir/depend.make new file mode 100644 index 00000000..4f81b4df --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/stblib.dir/depend.make @@ -0,0 +1,189 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.7 + +CMakeFiles/stblib.dir/src/STB/Interface.o: src/STB/Interface.c +CMakeFiles/stblib.dir/src/STB/Interface.o: src/STB/Interface.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/STB/STBValidValue.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/include/STBFaceInfo.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/include/STBFrTypedef.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/include/STBHandle.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/include/STBMakeResult.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/include/STBPeTypedef.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/include/STBTrTypedef.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/include/STBTracking.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/include/STBTypedefInput.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/include/SdkSTBFr.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/include/SdkSTBPe.h +CMakeFiles/stblib.dir/src/STB/Interface.o: src/include/SdkSTBTr.h + +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/STB/Interface.h +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/STB/STBAPI.c +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/STB/STBAPI.h +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/include/STBFrTypedef.h +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/include/STBHandle.h +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/include/STBPeTypedef.h +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/include/STBTrTypedef.h +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/include/STBTypedefInput.h +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/include/SdkSTBFr.h +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/include/SdkSTBPe.h +CMakeFiles/stblib.dir/src/STB/STBAPI.o: src/include/SdkSTBTr.h + +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/STB/STBFaceInfo.c +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/STB/STBValidValue.h +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/include/STBFaceInfo.h +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/include/STBFrTypedef.h +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/include/STBHandle.h +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/include/STBPeTypedef.h +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/include/STBTrTypedef.h +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/include/STBTypedefInput.h +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/include/STB_Debug.h +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/include/SdkSTBFr.h +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/include/SdkSTBPe.h +CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o: src/include/SdkSTBTr.h + +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o: src/STB/STBMakeResult.c +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o: src/include/STBFrTypedef.h +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o: src/include/STBHandle.h +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o: src/include/STBMakeResult.h +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o: src/include/STBPeTypedef.h +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o: src/include/STBTrTypedef.h +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o: src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o: src/include/SdkSTBFr.h +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o: src/include/SdkSTBPe.h +CMakeFiles/stblib.dir/src/STB/STBMakeResult.o: src/include/SdkSTBTr.h + +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/STB/STBTracking.c +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/include/STBFrTypedef.h +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/include/STBHandle.h +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/include/STBPeTypedef.h +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/include/STBTrTypedef.h +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/include/STBTracking.h +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/include/STBTypedefInput.h +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/include/STBTypedefOutput.h +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/include/STB_Debug.h +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/include/SdkSTBFr.h +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/include/SdkSTBPe.h +CMakeFiles/stblib.dir/src/STB/STBTracking.o: src/include/SdkSTBTr.h + +CMakeFiles/stblib.dir/src/STB/STBValidValue.o: src/STB/STBValidValue.c +CMakeFiles/stblib.dir/src/STB/STBValidValue.o: src/STB/STBValidValue.h +CMakeFiles/stblib.dir/src/STB/STBValidValue.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB/STBValidValue.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB/STBValidValue.o: src/include/STBTypedefInput.h +CMakeFiles/stblib.dir/src/STB/STBValidValue.o: src/include/STBTypedefOutput.h + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o: src/STB_FaceRecognition/FrInterface.c +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o: src/STB_FaceRecognition/FrInterface.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o: src/STB_FaceRecognition/STBFrAPI.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o: src/STB_FaceRecognition/STBFrValidValue.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o: src/include/STBFrTypedef.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o: src/include/STBTypedefOutput.h + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o: src/STB_FaceRecognition/FrInterface.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o: src/STB_FaceRecognition/STBFrAPI.c +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o: src/STB_FaceRecognition/STBFrAPI.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o: src/STB_FaceRecognition/STBFrValidValue.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o: src/include/STBFrTypedef.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o: src/include/STBTypedefOutput.h + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o: src/STB_FaceRecognition/STBFrValidValue.c +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o: src/STB_FaceRecognition/STBFrValidValue.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o: src/include/STBFrTypedef.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o: src/include/STBTypedefOutput.h + +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o: src/STB_FaceRecognition/FrInterface.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o: src/STB_FaceRecognition/STBFrValidValue.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o: src/STB_FaceRecognition/SdkSTBFr.c +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o: src/STB_FaceRecognition/SdkSTBFr.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o: src/include/STBFrTypedef.h +CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o: src/include/STBTypedefOutput.h + +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o: src/STB_Property/PeInterface.c +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o: src/STB_Property/PeInterface.h +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o: src/STB_Property/STBPeAPI.h +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o: src/STB_Property/STBPeValidValue.h +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o: src/include/STBPeTypedef.h +CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o: src/include/STBTypedefOutput.h + +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o: src/STB_Property/PeInterface.h +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o: src/STB_Property/STBPeAPI.c +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o: src/STB_Property/STBPeAPI.h +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o: src/STB_Property/STBPeValidValue.h +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o: src/include/STBPeTypedef.h +CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o: src/include/STBTypedefOutput.h + +CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o: src/STB_Property/STBPeValidValue.c +CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o: src/STB_Property/STBPeValidValue.h +CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o: src/include/STBPeTypedef.h +CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o: src/include/STBTypedefOutput.h + +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o: src/STB_Property/PeInterface.h +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o: src/STB_Property/STBPeValidValue.h +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o: src/STB_Property/SdkSTBPe.c +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o: src/STB_Property/SdkSTBPe.h +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o: src/include/STBPeTypedef.h +CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o: src/include/STBTypedefOutput.h + +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o: src/STB_Tracker/STBTrAPI.c +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o: src/STB_Tracker/STBTrAPI.h +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o: src/STB_Tracker/STBTrValidValue.h +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o: src/STB_Tracker/TrInterface.h +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o: src/include/STBTrTypedef.h +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o: src/include/STBTypedefOutput.h + +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o: src/STB_Tracker/STBTrValidValue.c +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o: src/STB_Tracker/STBTrValidValue.h +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o: src/include/STBTrTypedef.h +CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o: src/include/STBTypedefOutput.h + +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o: src/STB_Tracker/STBTrValidValue.h +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o: src/STB_Tracker/SdkSTBTr.c +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o: src/STB_Tracker/SdkSTBTr.h +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o: src/STB_Tracker/TrInterface.h +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o: src/include/STBTrTypedef.h +CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o: src/include/STBTypedefOutput.h + +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o: src/STB_Tracker/STBTrAPI.h +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o: src/STB_Tracker/STBTrValidValue.h +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o: src/STB_Tracker/TrInterface.c +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o: src/STB_Tracker/TrInterface.h +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o: src/include/STBCommonDef.h +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o: src/include/STBCommonType.h +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o: src/include/STBTrTypedef.h +CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o: src/include/STBTypedefOutput.h + diff --git a/src/b5t007001/stblib/CMakeFiles/stblib.dir/flags.make b/src/b5t007001/stblib/CMakeFiles/stblib.dir/flags.make new file mode 100644 index 00000000..fefcdfd6 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/stblib.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.7 + +# compile C with /usr/bin/cc +C_FLAGS = -lm + +C_DEFINES = + +C_INCLUDES = -I/home/pi/upm/src/b5t007001/stblib/src/include + diff --git a/src/b5t007001/stblib/CMakeFiles/stblib.dir/link.txt b/src/b5t007001/stblib/CMakeFiles/stblib.dir/link.txt new file mode 100644 index 00000000..bc89c0c4 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/stblib.dir/link.txt @@ -0,0 +1,2 @@ +/usr/bin/ar qc libstblib.a CMakeFiles/stblib.dir/src/STB/Interface.o CMakeFiles/stblib.dir/src/STB/STBAPI.o CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o CMakeFiles/stblib.dir/src/STB/STBMakeResult.o CMakeFiles/stblib.dir/src/STB/STBTracking.o CMakeFiles/stblib.dir/src/STB/STBValidValue.o CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o +/usr/bin/ranlib libstblib.a diff --git a/src/b5t007001/stblib/CMakeFiles/stblib.dir/progress.make b/src/b5t007001/stblib/CMakeFiles/stblib.dir/progress.make new file mode 100644 index 00000000..6f2b0c73 --- /dev/null +++ b/src/b5t007001/stblib/CMakeFiles/stblib.dir/progress.make @@ -0,0 +1,20 @@ +CMAKE_PROGRESS_1 = 1 +CMAKE_PROGRESS_2 = 2 +CMAKE_PROGRESS_3 = 3 +CMAKE_PROGRESS_4 = 4 +CMAKE_PROGRESS_5 = 5 +CMAKE_PROGRESS_6 = 6 +CMAKE_PROGRESS_7 = 7 +CMAKE_PROGRESS_8 = 8 +CMAKE_PROGRESS_9 = 9 +CMAKE_PROGRESS_10 = 10 +CMAKE_PROGRESS_11 = 11 +CMAKE_PROGRESS_12 = 12 +CMAKE_PROGRESS_13 = 13 +CMAKE_PROGRESS_14 = 14 +CMAKE_PROGRESS_15 = 15 +CMAKE_PROGRESS_16 = 16 +CMAKE_PROGRESS_17 = 17 +CMAKE_PROGRESS_18 = 18 +CMAKE_PROGRESS_19 = 19 + diff --git a/src/b5t007001/stblib/CMakeLists.txt b/src/b5t007001/stblib/CMakeLists.txt new file mode 100644 index 00000000..359d527c --- /dev/null +++ b/src/b5t007001/stblib/CMakeLists.txt @@ -0,0 +1,63 @@ +set(stblib_source_files + + src/include/SdkSTBFr.h + src/include/SdkSTBPe.h + src/include/SdkSTBTr.h + src/include/STBCommonDef.h + src/include/STBCommonType.h + src/include/STB_Debug.h + src/include/STBFaceInfo.h + src/include/STBFrTypedef.h + src/include/STBHandle.h + src/include/STBMakeResult.h + src/include/STBPeTypedef.h + src/include/STBTracking.h + src/include/STBTrTypedef.h + src/include/STBTypedefInput.h + src/include/STBTypedefOutput.h + + src/STB/Interface.c + src/STB/Interface.h + src/STB/STBAPI.c + src/STB/STBAPI.h + src/STB/STBFaceInfo.c + src/STB/STBMakeResult.c + src/STB/STBTracking.c + src/STB/STBValidValue.c + src/STB/STBValidValue.h + + src/STB_FaceRecognition/FrInterface.c + src/STB_FaceRecognition/FrInterface.h + src/STB_FaceRecognition/SdkSTBFr.c + src/STB_FaceRecognition/SdkSTBFr.h + src/STB_FaceRecognition/STBFrAPI.c + src/STB_FaceRecognition/STBFrAPI.h + src/STB_FaceRecognition/STBFrValidValue.c + src/STB_FaceRecognition/STBFrValidValue.h + + src/STB_Property/PeInterface.c + src/STB_Property/PeInterface.h + src/STB_Property/SdkSTBPe.c + src/STB_Property/SdkSTBPe.h + src/STB_Property/STBPeAPI.c + src/STB_Property/STBPeAPI.h + src/STB_Property/STBPeValidValue.c + src/STB_Property/STBPeValidValue.h + + src/STB_Tracker/SdkSTBTr.c + src/STB_Tracker/SdkSTBTr.h + src/STB_Tracker/STBTrAPI.c + src/STB_Tracker/STBTrAPI.h + src/STB_Tracker/STBTrValidValue.c + src/STB_Tracker/STBTrValidValue.h + src/STB_Tracker/TrInterface.c + src/STB_Tracker/TrInterface.h + + usr_include/STBAPI.h + usr_include/STBCommonDef.h + usr_include/STBTypedef.h +) + +include_directories("src/include/") +add_library(stblib ${stblib_source_files}) +set(CMAKE_C_FLAGS "-lm") diff --git a/src/b5t007001/stblib/Makefile b/src/b5t007001/stblib/Makefile new file mode 100644 index 00000000..3e10d8a5 --- /dev/null +++ b/src/b5t007001/stblib/Makefile @@ -0,0 +1,472 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.7 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/pi/upm/src/b5t007001/stblib + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/pi/upm/src/b5t007001/stblib + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/pi/upm/src/b5t007001/stblib/CMakeFiles /home/pi/upm/src/b5t007001/stblib/CMakeFiles/progress.marks + $(MAKE) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /home/pi/upm/src/b5t007001/stblib/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + $(MAKE) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +#============================================================================= +# Target rules for targets named stblib + +# Build rule for target. +stblib: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 stblib +.PHONY : stblib + +# fast build rule for target. +stblib/fast: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/build +.PHONY : stblib/fast + +# target to build an object file +src/STB/Interface.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/Interface.o +.PHONY : src/STB/Interface.o + +# target to preprocess a source file +src/STB/Interface.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/Interface.i +.PHONY : src/STB/Interface.i + +# target to generate assembly for a file +src/STB/Interface.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/Interface.s +.PHONY : src/STB/Interface.s + +# target to build an object file +src/STB/STBAPI.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBAPI.o +.PHONY : src/STB/STBAPI.o + +# target to preprocess a source file +src/STB/STBAPI.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBAPI.i +.PHONY : src/STB/STBAPI.i + +# target to generate assembly for a file +src/STB/STBAPI.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBAPI.s +.PHONY : src/STB/STBAPI.s + +# target to build an object file +src/STB/STBFaceInfo.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBFaceInfo.o +.PHONY : src/STB/STBFaceInfo.o + +# target to preprocess a source file +src/STB/STBFaceInfo.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBFaceInfo.i +.PHONY : src/STB/STBFaceInfo.i + +# target to generate assembly for a file +src/STB/STBFaceInfo.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBFaceInfo.s +.PHONY : src/STB/STBFaceInfo.s + +# target to build an object file +src/STB/STBMakeResult.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBMakeResult.o +.PHONY : src/STB/STBMakeResult.o + +# target to preprocess a source file +src/STB/STBMakeResult.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBMakeResult.i +.PHONY : src/STB/STBMakeResult.i + +# target to generate assembly for a file +src/STB/STBMakeResult.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBMakeResult.s +.PHONY : src/STB/STBMakeResult.s + +# target to build an object file +src/STB/STBTracking.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBTracking.o +.PHONY : src/STB/STBTracking.o + +# target to preprocess a source file +src/STB/STBTracking.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBTracking.i +.PHONY : src/STB/STBTracking.i + +# target to generate assembly for a file +src/STB/STBTracking.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBTracking.s +.PHONY : src/STB/STBTracking.s + +# target to build an object file +src/STB/STBValidValue.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBValidValue.o +.PHONY : src/STB/STBValidValue.o + +# target to preprocess a source file +src/STB/STBValidValue.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBValidValue.i +.PHONY : src/STB/STBValidValue.i + +# target to generate assembly for a file +src/STB/STBValidValue.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB/STBValidValue.s +.PHONY : src/STB/STBValidValue.s + +# target to build an object file +src/STB_FaceRecognition/FrInterface.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.o +.PHONY : src/STB_FaceRecognition/FrInterface.o + +# target to preprocess a source file +src/STB_FaceRecognition/FrInterface.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.i +.PHONY : src/STB_FaceRecognition/FrInterface.i + +# target to generate assembly for a file +src/STB_FaceRecognition/FrInterface.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/FrInterface.s +.PHONY : src/STB_FaceRecognition/FrInterface.s + +# target to build an object file +src/STB_FaceRecognition/STBFrAPI.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.o +.PHONY : src/STB_FaceRecognition/STBFrAPI.o + +# target to preprocess a source file +src/STB_FaceRecognition/STBFrAPI.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.i +.PHONY : src/STB_FaceRecognition/STBFrAPI.i + +# target to generate assembly for a file +src/STB_FaceRecognition/STBFrAPI.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrAPI.s +.PHONY : src/STB_FaceRecognition/STBFrAPI.s + +# target to build an object file +src/STB_FaceRecognition/STBFrValidValue.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.o +.PHONY : src/STB_FaceRecognition/STBFrValidValue.o + +# target to preprocess a source file +src/STB_FaceRecognition/STBFrValidValue.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.i +.PHONY : src/STB_FaceRecognition/STBFrValidValue.i + +# target to generate assembly for a file +src/STB_FaceRecognition/STBFrValidValue.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/STBFrValidValue.s +.PHONY : src/STB_FaceRecognition/STBFrValidValue.s + +# target to build an object file +src/STB_FaceRecognition/SdkSTBFr.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.o +.PHONY : src/STB_FaceRecognition/SdkSTBFr.o + +# target to preprocess a source file +src/STB_FaceRecognition/SdkSTBFr.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.i +.PHONY : src/STB_FaceRecognition/SdkSTBFr.i + +# target to generate assembly for a file +src/STB_FaceRecognition/SdkSTBFr.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_FaceRecognition/SdkSTBFr.s +.PHONY : src/STB_FaceRecognition/SdkSTBFr.s + +# target to build an object file +src/STB_Property/PeInterface.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/PeInterface.o +.PHONY : src/STB_Property/PeInterface.o + +# target to preprocess a source file +src/STB_Property/PeInterface.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/PeInterface.i +.PHONY : src/STB_Property/PeInterface.i + +# target to generate assembly for a file +src/STB_Property/PeInterface.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/PeInterface.s +.PHONY : src/STB_Property/PeInterface.s + +# target to build an object file +src/STB_Property/STBPeAPI.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.o +.PHONY : src/STB_Property/STBPeAPI.o + +# target to preprocess a source file +src/STB_Property/STBPeAPI.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.i +.PHONY : src/STB_Property/STBPeAPI.i + +# target to generate assembly for a file +src/STB_Property/STBPeAPI.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/STBPeAPI.s +.PHONY : src/STB_Property/STBPeAPI.s + +# target to build an object file +src/STB_Property/STBPeValidValue.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.o +.PHONY : src/STB_Property/STBPeValidValue.o + +# target to preprocess a source file +src/STB_Property/STBPeValidValue.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.i +.PHONY : src/STB_Property/STBPeValidValue.i + +# target to generate assembly for a file +src/STB_Property/STBPeValidValue.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/STBPeValidValue.s +.PHONY : src/STB_Property/STBPeValidValue.s + +# target to build an object file +src/STB_Property/SdkSTBPe.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.o +.PHONY : src/STB_Property/SdkSTBPe.o + +# target to preprocess a source file +src/STB_Property/SdkSTBPe.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.i +.PHONY : src/STB_Property/SdkSTBPe.i + +# target to generate assembly for a file +src/STB_Property/SdkSTBPe.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Property/SdkSTBPe.s +.PHONY : src/STB_Property/SdkSTBPe.s + +# target to build an object file +src/STB_Tracker/STBTrAPI.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.o +.PHONY : src/STB_Tracker/STBTrAPI.o + +# target to preprocess a source file +src/STB_Tracker/STBTrAPI.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.i +.PHONY : src/STB_Tracker/STBTrAPI.i + +# target to generate assembly for a file +src/STB_Tracker/STBTrAPI.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/STBTrAPI.s +.PHONY : src/STB_Tracker/STBTrAPI.s + +# target to build an object file +src/STB_Tracker/STBTrValidValue.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.o +.PHONY : src/STB_Tracker/STBTrValidValue.o + +# target to preprocess a source file +src/STB_Tracker/STBTrValidValue.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.i +.PHONY : src/STB_Tracker/STBTrValidValue.i + +# target to generate assembly for a file +src/STB_Tracker/STBTrValidValue.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/STBTrValidValue.s +.PHONY : src/STB_Tracker/STBTrValidValue.s + +# target to build an object file +src/STB_Tracker/SdkSTBTr.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.o +.PHONY : src/STB_Tracker/SdkSTBTr.o + +# target to preprocess a source file +src/STB_Tracker/SdkSTBTr.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.i +.PHONY : src/STB_Tracker/SdkSTBTr.i + +# target to generate assembly for a file +src/STB_Tracker/SdkSTBTr.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/SdkSTBTr.s +.PHONY : src/STB_Tracker/SdkSTBTr.s + +# target to build an object file +src/STB_Tracker/TrInterface.o: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.o +.PHONY : src/STB_Tracker/TrInterface.o + +# target to preprocess a source file +src/STB_Tracker/TrInterface.i: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.i +.PHONY : src/STB_Tracker/TrInterface.i + +# target to generate assembly for a file +src/STB_Tracker/TrInterface.s: + $(MAKE) -f CMakeFiles/stblib.dir/build.make CMakeFiles/stblib.dir/src/STB_Tracker/TrInterface.s +.PHONY : src/STB_Tracker/TrInterface.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... rebuild_cache" + @echo "... edit_cache" + @echo "... stblib" + @echo "... src/STB/Interface.o" + @echo "... src/STB/Interface.i" + @echo "... src/STB/Interface.s" + @echo "... src/STB/STBAPI.o" + @echo "... src/STB/STBAPI.i" + @echo "... src/STB/STBAPI.s" + @echo "... src/STB/STBFaceInfo.o" + @echo "... src/STB/STBFaceInfo.i" + @echo "... src/STB/STBFaceInfo.s" + @echo "... src/STB/STBMakeResult.o" + @echo "... src/STB/STBMakeResult.i" + @echo "... src/STB/STBMakeResult.s" + @echo "... src/STB/STBTracking.o" + @echo "... src/STB/STBTracking.i" + @echo "... src/STB/STBTracking.s" + @echo "... src/STB/STBValidValue.o" + @echo "... src/STB/STBValidValue.i" + @echo "... src/STB/STBValidValue.s" + @echo "... src/STB_FaceRecognition/FrInterface.o" + @echo "... src/STB_FaceRecognition/FrInterface.i" + @echo "... src/STB_FaceRecognition/FrInterface.s" + @echo "... src/STB_FaceRecognition/STBFrAPI.o" + @echo "... src/STB_FaceRecognition/STBFrAPI.i" + @echo "... src/STB_FaceRecognition/STBFrAPI.s" + @echo "... src/STB_FaceRecognition/STBFrValidValue.o" + @echo "... src/STB_FaceRecognition/STBFrValidValue.i" + @echo "... src/STB_FaceRecognition/STBFrValidValue.s" + @echo "... src/STB_FaceRecognition/SdkSTBFr.o" + @echo "... src/STB_FaceRecognition/SdkSTBFr.i" + @echo "... src/STB_FaceRecognition/SdkSTBFr.s" + @echo "... src/STB_Property/PeInterface.o" + @echo "... src/STB_Property/PeInterface.i" + @echo "... src/STB_Property/PeInterface.s" + @echo "... src/STB_Property/STBPeAPI.o" + @echo "... src/STB_Property/STBPeAPI.i" + @echo "... src/STB_Property/STBPeAPI.s" + @echo "... src/STB_Property/STBPeValidValue.o" + @echo "... src/STB_Property/STBPeValidValue.i" + @echo "... src/STB_Property/STBPeValidValue.s" + @echo "... src/STB_Property/SdkSTBPe.o" + @echo "... src/STB_Property/SdkSTBPe.i" + @echo "... src/STB_Property/SdkSTBPe.s" + @echo "... src/STB_Tracker/STBTrAPI.o" + @echo "... src/STB_Tracker/STBTrAPI.i" + @echo "... src/STB_Tracker/STBTrAPI.s" + @echo "... src/STB_Tracker/STBTrValidValue.o" + @echo "... src/STB_Tracker/STBTrValidValue.i" + @echo "... src/STB_Tracker/STBTrValidValue.s" + @echo "... src/STB_Tracker/SdkSTBTr.o" + @echo "... src/STB_Tracker/SdkSTBTr.i" + @echo "... src/STB_Tracker/SdkSTBTr.s" + @echo "... src/STB_Tracker/TrInterface.o" + @echo "... src/STB_Tracker/TrInterface.i" + @echo "... src/STB_Tracker/TrInterface.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/src/b5t007001/stblib/cmake_install.cmake b/src/b5t007001/stblib/cmake_install.cmake new file mode 100644 index 00000000..91687b7e --- /dev/null +++ b/src/b5t007001/stblib/cmake_install.cmake @@ -0,0 +1,44 @@ +# Install script for directory: /home/pi/upm/src/b5t007001/stblib + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "/home/pi/upm/src/b5t007001/stblib/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/src/b5t007001/stblib/libstblib.a b/src/b5t007001/stblib/libstblib.a new file mode 100644 index 00000000..41b6460e Binary files /dev/null and b/src/b5t007001/stblib/libstblib.a differ diff --git a/src/b5t007001/stblib/src/STB/Interface.c b/src/b5t007001/stblib/src/STB/Interface.c new file mode 100644 index 00000000..e3bd448e --- /dev/null +++ b/src/b5t007001/stblib/src/STB/Interface.c @@ -0,0 +1,1002 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "Interface.h" +#include "STBValidValue.h" +#include "STBCommonDef.h" +#include "STBTracking.h" +#include "STBFaceInfo.h" +#include "STBMakeResult.h" + + +/*Value range check*/ +#define ISVALID_RANGE( val , min , max ) ( ( (min) <= (val) ) && ( (val) <= (max) ) ) + + +/*------------------------------------------------------------------------------------------------------------------*/ +/*IsValidValue : error check*/ +/*------------------------------------------------------------------------------------------------------------------*/ +static STB_INT32 IsValidValue( + const STB_INT32 nValue , + const STB_INT32 nLimitMin , + const STB_INT32 nLimitMax ) +{ + STB_INT32 nRet; + for( nRet = STB_ERR_INVALIDPARAM; nRet != STB_NORMAL; nRet = STB_NORMAL ) + { + if( ! ISVALID_RANGE( nValue , nLimitMin , nLimitMax ) ) + { + break; + } + } + return nRet; +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* IsValidPointer */ +/*------------------------------------------------------------------------------------------------------------------*/ +static STB_INT32 IsValidPointer( const VOID* pPointer ) +{ + STB_INT32 nRet; + for( nRet = STB_ERR_INVALIDPARAM; nRet != STB_NORMAL; nRet = STB_NORMAL ) + { + if( NULL == pPointer ){ break; } + } + return nRet; +} + +/*------------------------------------------------------------------------------------------------------------------*/ +/* GetVersion */ +/* Interface between SDK layer and functional layer */ +/* Responsible for error check and function call */ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 GetVersion( STB_INT8* pnMajorVersion , STB_INT8* pnMinorVersion ){ + STB_INT32 nRet; + + for( nRet = STB_ERR_INVALIDPARAM; nRet != STB_NORMAL; nRet = STB_NORMAL ) + { + nRet = IsValidPointer( pnMajorVersion ); + if( STB_NORMAL != nRet ) + { + break; + } + nRet = IsValidPointer( pnMinorVersion ); + if( STB_NORMAL != nRet ) + { + break; + } + *pnMajorVersion = VERSION_MAJOR; + *pnMinorVersion = VERSION_MINOR; + } + + return nRet; +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* CalcStbSize */ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_UINT32 CalcStbSize ( STBExecFlg *execFlg , STB_UINT32 nTraCntMax) +{ + STB_UINT32 retVal ; + + retVal = 0 ; + + retVal += 100 ;///Margin : alignment + + + + + retVal += sizeof( STB_TR_DET );//wSrcTr + if( execFlg->bodyTr == STB_TRUE ) + { + retVal += sizeof( TraObj ) * nTraCntMax ; // trBody + retVal += sizeof( ROI_DET ) * nTraCntMax ; // wSrcTr->bdDet + retVal += sizeof( STB_TR_RES_BODYS ) ; // wDstTrBody + retVal += sizeof( STB_TR_RES ) * nTraCntMax ; // wDstTrBody->body + } + if( execFlg->faceTr == STB_TRUE ) + { + retVal += sizeof( TraObj ) * nTraCntMax ; // trFace + retVal += sizeof( ROI_DET ) * nTraCntMax ; // wSrcTr->fcDet + retVal += sizeof( STB_TR_RES_FACES ) ; // wDstTrFace + retVal += sizeof( STB_TR_RES ) * nTraCntMax ; // wDstTrFace->face + } + if( execFlg->gen == STB_TRUE + || execFlg->age == STB_TRUE + || execFlg->fr == STB_TRUE + || execFlg->exp == STB_TRUE + || execFlg->dir == STB_TRUE + || execFlg->gaz == STB_TRUE + || execFlg->bli == STB_TRUE + ) + { + retVal += sizeof( FaceObj ) * nTraCntMax ; // infoFace + } + + + if( execFlg->gen == STB_TRUE + || execFlg->age == STB_TRUE + //|| execFlg->fr == STB_TRUE + || execFlg->exp == STB_TRUE + || execFlg->dir == STB_TRUE + || execFlg->gaz == STB_TRUE + || execFlg->bli == STB_TRUE + ) + { + retVal += sizeof( STB_PE_DET ) ; // wSrcPe + retVal += sizeof( FACE_DET ) * nTraCntMax ; // wSrcPe->fcDet + retVal += sizeof( STB_PE_RES ) ; // wDstPe + retVal += sizeof( STB_PE_FACE ) * nTraCntMax ; // wDstPe->peFace + + } + + if( execFlg->fr == STB_TRUE ) + { + retVal += sizeof( STB_FR_DET ) ; // wSrcFr + retVal += sizeof( FR_DET ) * nTraCntMax ; // wSrcFr->fcDet + retVal += sizeof( STB_FR_RES ) ; // wDstFr + retVal += sizeof( FR_RES ) * nTraCntMax ; // wDstFr->frFace + } + + + return retVal; +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* ShareStbSize */ +/*------------------------------------------------------------------------------------------------------------------*/ +void ShareStbSize ( STBHANDLE handle , STB_INT8 *stbPtr ) +{ + STB_UINT32 nTraCntMax; + + nTraCntMax = handle->nTraCntMax; + + + handle->wSrcTr = (STB_TR_DET*)stbPtr; stbPtr += ( sizeof( STB_TR_DET ) ); + if( handle->execFlg->bodyTr == STB_TRUE ) + { + handle->trBody = ( TraObj* ) stbPtr; stbPtr += ( sizeof( TraObj ) * nTraCntMax ); + handle->wSrcTr->bdDet = ( ROI_DET* ) stbPtr; stbPtr += ( sizeof( ROI_DET ) * nTraCntMax ); + handle->wDstTrBody = ( STB_TR_RES_BODYS* ) stbPtr; stbPtr += ( sizeof( STB_TR_RES_BODYS )); + handle->wDstTrBody->body = ( STB_TR_RES* ) stbPtr; stbPtr += ( sizeof( STB_TR_RES ) * nTraCntMax ); + } + if( handle->execFlg->faceTr == STB_TRUE ) + { + handle->trFace = ( TraObj* ) stbPtr; stbPtr += ( sizeof( TraObj ) * nTraCntMax ); + handle->wSrcTr->fcDet = ( ROI_DET* ) stbPtr; stbPtr += ( sizeof( ROI_DET ) * nTraCntMax ); + handle->wDstTrFace = ( STB_TR_RES_FACES* ) stbPtr; stbPtr += ( sizeof( STB_TR_RES_FACES )); + handle->wDstTrFace->face = ( STB_TR_RES* ) stbPtr; stbPtr += ( sizeof( STB_TR_RES ) * nTraCntMax ); + } + + if( handle->execFlg->gen == STB_TRUE + || handle->execFlg->age == STB_TRUE + || handle->execFlg->fr == STB_TRUE + || handle->execFlg->exp == STB_TRUE + || handle->execFlg->dir == STB_TRUE + || handle->execFlg->gaz == STB_TRUE + || handle->execFlg->bli == STB_TRUE + ) + { + handle->infoFace = ( FaceObj* ) stbPtr; stbPtr += ( sizeof( FaceObj ) * nTraCntMax ); + } + + if( handle->execFlg->gen == STB_TRUE + || handle->execFlg->age == STB_TRUE + //||| handle->execFlg->fr == STB_TRUE + || handle->execFlg->exp == STB_TRUE + || handle->execFlg->dir == STB_TRUE + || handle->execFlg->gaz == STB_TRUE + || handle->execFlg->bli == STB_TRUE + ) + { + handle->wSrcPe = ( STB_PE_DET* ) stbPtr; stbPtr += ( sizeof( STB_PE_DET ) ); + handle->wSrcPe->fcDet = ( FACE_DET* ) stbPtr; stbPtr += ( sizeof( FACE_DET ) * nTraCntMax ); + handle->wDstPe = ( STB_PE_RES* ) stbPtr; stbPtr += ( sizeof( STB_PE_RES ) ); + handle->wDstPe->peFace = ( STB_PE_FACE*) stbPtr; stbPtr += ( sizeof( STB_PE_FACE) * nTraCntMax ); + } + + if( handle->execFlg->fr == STB_TRUE ) + { + handle->wSrcFr = ( STB_FR_DET* ) stbPtr; stbPtr += ( sizeof( STB_FR_DET ) ); + handle->wSrcFr->fcDet = ( FR_DET* ) stbPtr; stbPtr += ( sizeof( FR_DET ) * nTraCntMax ); + handle->wDstFr = ( STB_FR_RES* ) stbPtr; stbPtr += ( sizeof( STB_FR_RES ) ); + handle->wDstFr->frFace = ( FR_RES* ) stbPtr; stbPtr += ( sizeof( FR_RES ) * nTraCntMax ); + } + + +} +/*------------------------------------------------------------------------------------------------------------------*/ +/*Create handle*/ +/*------------------------------------------------------------------------------------------------------------------*/ +STBHANDLE CreateHandle ( STB_UINT32 stbExecFlg ) +{ + + STBHANDLE handle; + STB_UINT32 tmpVal; + STB_UINT32 tmpFLG; + + + + /*do STB handle's malloc here*/ + handle = NULL ; + handle = ( STBHANDLE )malloc( sizeof( *handle ) ); + if( handle == NULL ) + { + return NULL;/* FAIL : Create STB handle */ + } + + /* ExecFlg */ + handle->execFlg = ( STBExecFlg* )malloc( sizeof( STBExecFlg ) ); + if( handle->execFlg == NULL ) + { + free ( handle ) ;/*Free of Malloc things at the present time*/ + return NULL ;/* FAIL : Create STB handle ExecFlg */ + } + if( ( stbExecFlg & STB_FUNC_BD )== STB_FUNC_BD ){ handle->execFlg->bodyTr = STB_TRUE ;}else{ handle->execFlg->bodyTr = STB_FALSE ;} + if( ( stbExecFlg & STB_FUNC_DT )== STB_FUNC_DT ){ handle->execFlg->faceTr = STB_TRUE ;}else{ handle->execFlg->faceTr = STB_FALSE ;} + if( ( stbExecFlg & STB_FUNC_PT )== STB_FUNC_PT ){ handle->execFlg->dir = STB_TRUE ;}else{ handle->execFlg->dir = STB_FALSE ;} + if( ( stbExecFlg & STB_FUNC_AG )== STB_FUNC_AG ){ handle->execFlg->age = STB_TRUE ;}else{ handle->execFlg->age = STB_FALSE ;} + if( ( stbExecFlg & STB_FUNC_GN )== STB_FUNC_GN ){ handle->execFlg->gen = STB_TRUE ;}else{ handle->execFlg->gen = STB_FALSE ;} + if( ( stbExecFlg & STB_FUNC_GZ )== STB_FUNC_GZ ){ handle->execFlg->gaz = STB_TRUE ;}else{ handle->execFlg->gaz = STB_FALSE ;} + if( ( stbExecFlg & STB_FUNC_BL )== STB_FUNC_BL ){ handle->execFlg->bli = STB_TRUE ;}else{ handle->execFlg->bli = STB_FALSE ;} + if( ( stbExecFlg & STB_FUNC_EX )== STB_FUNC_EX ){ handle->execFlg->exp = STB_TRUE ;}else{ handle->execFlg->exp = STB_FALSE ;} + if( ( stbExecFlg & STB_FUNC_FR )== STB_FUNC_FR ){ handle->execFlg->fr = STB_TRUE ;}else{ handle->execFlg->fr = STB_FALSE ;} + handle->execFlg->pet = STB_FALSE ; + handle->execFlg->hand = STB_FALSE ; + + + if( handle->execFlg->faceTr == STB_FALSE ) + { + if( handle->execFlg->gen == STB_TRUE + || handle->execFlg->age == STB_TRUE + || handle->execFlg->fr == STB_TRUE + || handle->execFlg->exp == STB_TRUE + || handle->execFlg->dir == STB_TRUE + || handle->execFlg->gaz == STB_TRUE + || handle->execFlg->bli == STB_TRUE + ) + { + free ( handle->execFlg );/*Free of Malloc things at the present time*/ + free ( handle );/*Free of Malloc things at the present time*/ + return NULL ;/*Invalid input parameter stbExecFlg*/ + } + } + + + /*Setting the initial value here.*/ + handle->nTraCntBody = 0; + handle->nTraCntFace = 0; + handle->nDetCntMax = DETECT_CNT_MAX ;/*A maximum number of detected(input) people*/ + handle->nTraCntMax = TRACK_CNT_MAX ;/*A maximum number of tracking(output) people*/ + handle->nExecuted = STB_FALSE ; + handle->nInitialized= STB_FALSE ; + handle->nDetCntBody = 0; + handle->nDetCntFace = 0; + handle->trFace = NULL; + handle->trBody = NULL; + handle->infoFace = NULL; + handle->wSrcTr = NULL; + handle->wDstTrFace = NULL; + handle->wDstTrBody = NULL; + handle->wSrcPe = NULL; + handle->wDstPe = NULL; + handle->wSrcFr = NULL; + handle->wDstFr = NULL; + + + /* Do Malloc to things that need Malloc in STB handle */ + handle->stbPtr = NULL ; + handle->hTrHandle = NULL ; + handle->hPeHandle = NULL ; + handle->hFrHandle = NULL ; + tmpVal = CalcStbSize ( handle->execFlg ,handle->nTraCntMax ); /*calculate necessary amount in the STB handle*/ + handle->stbPtr = ( STB_INT8 * )malloc( tmpVal ) ; /*keep necessary amount in the STB handle*/ + if( handle->stbPtr == NULL ) + { + free ( handle->execFlg );/*Free of Malloc things at the present time*/ + free ( handle );/*Free of Malloc things at the present time*/ + return NULL ; + } + ShareStbSize ( handle, handle->stbPtr); /* Malloc-area is allocated to things that need Malloc in STB handle */ + + /*Create handles for child functions*/ + tmpFLG = STB_TRUE; + if( handle->execFlg->bodyTr == STB_TRUE + || handle->execFlg->faceTr == STB_TRUE + ) + { + handle->hTrHandle = STB_Tr_CreateHandle( handle->execFlg ,handle->nDetCntMax, handle->nTraCntMax ); + if( handle->hTrHandle == NULL ){ tmpFLG = STB_FALSE; } + } + if( handle->execFlg->gen == STB_TRUE + || handle->execFlg->age == STB_TRUE + //|| handle->execFlg->fr == STB_TRUE + || handle->execFlg->exp == STB_TRUE + || handle->execFlg->dir == STB_TRUE + || handle->execFlg->gaz == STB_TRUE + || handle->execFlg->bli == STB_TRUE + ) + { + handle->hPeHandle = STB_Pe_CreateHandle( handle->execFlg ,handle->nTraCntMax ); + if( handle->hPeHandle == NULL ){ tmpFLG = STB_FALSE; } + } + if( handle->execFlg->fr == STB_TRUE ) + { + handle->hFrHandle = STB_Fr_CreateHandle( handle->nTraCntMax ); + if( handle->hFrHandle == NULL ){ tmpFLG = STB_FALSE; } + } + + if( tmpFLG == STB_FALSE ) + { + /*When Malloc failed, Free of Malloc data at the present time*/ + if( handle->hTrHandle != NULL ) { STB_Tr_DeleteHandle ( handle->hTrHandle ) ;} + if( handle->hPeHandle != NULL ) { STB_Pe_DeleteHandle ( handle->hPeHandle ) ;} + if( handle->hFrHandle != NULL ) { STB_Fr_DeleteHandle ( handle->hFrHandle ) ;} + if( handle->stbPtr != NULL ) { free ( handle->stbPtr ) ;}/*Free of Malloc things at the present time*/ + if( handle->execFlg != NULL ) { free ( handle->execFlg ) ;}/*Free of Malloc things at the present time*/ + if( handle != NULL ) { free ( handle ) ;}/*Free of Malloc things at the present time*/ + return NULL; + } + + return handle; +} +//------------------------------------------------------------------------------------------------------------------- +// DeleteHandle /*Delete handle*/ +//------------------------------------------------------------------------------------------------------------------- +STB_INT32 DeleteHandle(STBHANDLE handle) +{ + + STB_INT32 nRet; + + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + /*Malloc things here, do free*/ + if( handle->hTrHandle != NULL ) { STB_Tr_DeleteHandle ( handle->hTrHandle ) ;} + if( handle->hPeHandle != NULL ) { STB_Pe_DeleteHandle ( handle->hPeHandle ) ;} + if( handle->hFrHandle != NULL ) { STB_Fr_DeleteHandle ( handle->hFrHandle ) ;} + if( handle->stbPtr != NULL ) { free ( handle->stbPtr ) ;} + if( handle->execFlg != NULL ) { free ( handle->execFlg ) ;} + if( handle != NULL ) { free ( handle ) ;} + + + + return STB_NORMAL; +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* SetFrameResult : Get the result of stbINPUT */ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 SetFrameResult ( STBHANDLE handle , const STB_FRAME_RESULT *stbINPUTResult ) +{ + + STB_INT32 nRet; + + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL) + { + return STB_ERR_NOHANDLE; + } + + nRet = IsValidPointer(stbINPUTResult); + if(nRet != STB_NORMAL) + { + return STB_ERR_INVALIDPARAM; + } + + + /*Input value check*/ + nRet = STB_IsValidValue ( stbINPUTResult ,handle->execFlg ); + if(nRet != STB_TRUE) + { + return STB_ERR_INVALIDPARAM; + } + + + /*Clear the unexecuted state flag*/ + handle->nExecuted = STB_FALSE; + + /*Set the received result to the handle*/ + if( handle->execFlg->bodyTr == STB_TRUE ) + { + handle->nDetCntBody = stbINPUTResult->bodys.nCount; + SetTrackingObjectBody ( &(stbINPUTResult->bodys) ,handle->trBody ); + } + if( handle->execFlg->faceTr == STB_TRUE ) + { + handle->nDetCntFace = stbINPUTResult->faces.nCount; + SetTrackingObjectFace ( &(stbINPUTResult->faces) ,handle->trFace ); + } + + /*Set detection result to Face/Property/Recognition data*/ + if( handle->execFlg->gen == STB_TRUE + || handle->execFlg->age == STB_TRUE + || handle->execFlg->fr == STB_TRUE + || handle->execFlg->exp == STB_TRUE + || handle->execFlg->gaz == STB_TRUE + || handle->execFlg->dir == STB_TRUE + || handle->execFlg->bli == STB_TRUE + ) + { + SetFaceObject ( &(stbINPUTResult->faces) ,handle->infoFace ,handle->execFlg , handle->nTraCntMax ); + } + + + handle->nInitialized = STB_TRUE; + + return STB_NORMAL; +} + +/*------------------------------------------------------------------------------------------------------------------*/ +/*Execute : Main process execution*/ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 Execute ( STBHANDLE handle ) +{ + STB_INT32 nRet ; + STB_TR_DET *srcTr = handle->wSrcTr ;/*TR : input data*/ + STB_TR_RES_FACES *dstTrFace = handle->wDstTrFace;/*TR : output data*/ + STB_TR_RES_BODYS *dstTrBody = handle->wDstTrBody;/*TR : output data*/ + STB_PE_DET *srcPe = handle->wSrcPe ;/*PR : Input data*/ + STB_PE_RES *dstPe = handle->wDstPe ;/*PE : Output data*/ + STB_FR_DET *srcFr = handle->wSrcFr ;/*FR : Input data*/ + STB_FR_RES *dstFr = handle->wDstFr ;/*FR : Output data*/ + + + + /*NULL check*/ + nRet = IsValidPointer ( handle ); + if( nRet != STB_NORMAL ) + { + return STB_ERR_NOHANDLE; + } + + if( handle->nInitialized != STB_TRUE) + { + return STB_ERR_INITIALIZE; + } + handle->nInitialized = STB_FALSE; + handle->nExecuted = STB_FALSE; + + /* TR ------------------------------------------------------------------------------------------------*/ + if( handle->execFlg->faceTr == STB_TRUE ) + { + SetSrcTrFace ( handle->nDetCntFace , handle->trFace , srcTr ); /*Creation of tracking input data from handle information*/ + } + if( handle->execFlg->bodyTr == STB_TRUE ) + { + SetSrcTrBody ( handle->nDetCntBody , handle->trBody , srcTr ); /*Creation of tracking input data from handle information*/ + } + nRet = STB_Tr_SetDetect ( handle->hTrHandle , srcTr); /*Frame information settings*/ + if( nRet != STB_NORMAL) { return nRet; } + nRet = STB_Tr_Execute ( handle->hTrHandle ); /*execute tracking*/ + if( nRet != STB_NORMAL) { return nRet; } + nRet = STB_Tr_GetResult ( handle->hTrHandle , dstTrFace , dstTrBody ); /*get the tracking result*/ + if( nRet != STB_NORMAL) { return nRet; } + if( handle->execFlg->faceTr == STB_TRUE ) + { + SetTrackingInfoToFace ( dstTrFace,&(handle->nTraCntFace),handle->trFace);/*copy to handle the tracking result*/ + } + if( handle->execFlg->bodyTr == STB_TRUE ) + { + SetTrackingInfoToBody ( dstTrBody,&(handle->nTraCntBody),handle->trBody);/*copy to handle the tracking result*/ + } + + + /*Association of face information and tracking ID--------------------------------------------------------------------------------*/ + if( handle->execFlg->gen == STB_TRUE + || handle->execFlg->age == STB_TRUE + || handle->execFlg->fr == STB_TRUE + || handle->execFlg->exp == STB_TRUE + || handle->execFlg->gaz == STB_TRUE + || handle->execFlg->dir == STB_TRUE + || handle->execFlg->bli == STB_TRUE + ) + { + SetTrackingIDToFace ( handle->nTraCntFace ,handle->nDetCntFace, handle->trFace,handle->infoFace , handle->execFlg ); + } + + /* Fr ------------------------------------------------------------------------------------------------*/ + if( handle->execFlg->fr == STB_TRUE ) + { + SetFaceToFrInfo ( handle->nTraCntFace,handle->infoFace,srcFr ); /*Creation of recognition input data from handle information*/ + nRet = STB_Fr_SetDetect ( handle->hFrHandle,srcFr ); /*Pass to the recognized stabilization*/ + if(nRet != STB_NORMAL ){ return nRet; } + nRet = STB_Fr_Execute ( handle->hFrHandle ); /* Recognized stabilization execution*/ + if(nRet != STB_NORMAL ){ return nRet; } + nRet = STB_Fr_GetResult ( handle->hFrHandle,dstFr ); /*get the recognized stabilization results*/ + if(nRet != STB_NORMAL ){ return nRet; } + SetFrInfoToFace ( handle->nTraCntFace,dstFr,handle->infoFace ); /*Copy to handle the recognized stabilization results*/ + } + + /* Pe ------------------------------------------------------------------------------------------------*/ + if( handle->execFlg->gen == STB_TRUE + || handle->execFlg->age == STB_TRUE + //|| handle->execFlg->fr == STB_TRUE + || handle->execFlg->exp == STB_TRUE + || handle->execFlg->gaz == STB_TRUE + || handle->execFlg->dir == STB_TRUE + || handle->execFlg->bli == STB_TRUE + ) + { + SetFaceToPeInfo ( handle->nTraCntFace,handle->infoFace,srcPe ); /*Creation of property input data from handle information*/ + nRet = STB_Pe_SetDetect ( handle->hPeHandle,srcPe ); /*Pass to property stabilization*/ + if( nRet != STB_NORMAL ){ return nRet; } + nRet = STB_Pe_Execute ( handle->hPeHandle ); /*Property stabilization execution*/ + if( nRet != STB_NORMAL ){ return nRet; } + nRet = STB_Pe_GetResult ( handle->hPeHandle,dstPe ); /*get the property stabilization results*/ + if( nRet != STB_NORMAL ){ return nRet; } + SetPeInfoToFace ( handle->nTraCntFace,dstPe,handle->infoFace , handle->execFlg ); /*Copy to handle the property stabilization results*/ + } + + + + /*Set execution completion flag--------------------------------------------------*/ + handle->nExecuted = STB_TRUE; + + return STB_NORMAL; +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* GetFaces : Getting stabilization results of face*/ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 GetFaces(STBHANDLE handle, STB_UINT32 *face_count, STB_FACE *face ) +{ + STB_INT32 nRet , i; + + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL) + { + return STB_ERR_NOHANDLE; + } + nRet = IsValidPointer(face_count); + if(nRet != STB_NORMAL) + { + return nRet; + } + nRet = IsValidPointer(face); + if(nRet != STB_NORMAL) + { + return nRet; + } + if( handle->nExecuted != STB_TRUE) + { + return STB_ERR_INITIALIZE; + } + + /*init*/ + *face_count = 0; + for( i = 0 ; i < handle->nTraCntMax ; i++ ) + { + face[i].nDetectID = -1; + face[i].nTrackingID = -1; + face[i].center.x = 0; + face[i].center.y = 0; + face[i].nSize = 0; + face[i].conf = STB_CONF_NO_DATA ; + face[i].age.conf = STB_CONF_NO_DATA ; + face[i].age.status = STB_STATUS_NO_DATA; + face[i].age.value = -1; + face[i].blink.ratioL = -1; + face[i].blink.ratioR = -1; + face[i].blink.status = STB_STATUS_NO_DATA; + face[i].direction.conf = STB_CONF_NO_DATA ; + face[i].direction.pitch = -1; + face[i].direction.roll = -1; + face[i].direction.status = STB_STATUS_NO_DATA; + face[i].direction.yaw = -1; + face[i].expression.conf = STB_CONF_NO_DATA ; + face[i].expression.status = STB_STATUS_NO_DATA; + face[i].expression.value = -1; + face[i].gaze.conf = STB_CONF_NO_DATA ; + face[i].gaze.LR = -1; + face[i].gaze.status = STB_STATUS_NO_DATA; + face[i].gaze.UD = -1; + face[i].gender.conf = STB_CONF_NO_DATA ; + face[i].gender.status = STB_STATUS_NO_DATA; + face[i].gender.value = -1; + face[i].recognition.conf = STB_CONF_NO_DATA ; + face[i].recognition.status = STB_STATUS_NO_DATA; + face[i].recognition.value = -1; + } + + /*Set the result to the structure*/ + if( handle->execFlg->faceTr == STB_TRUE ) + { + *face_count = handle->nTraCntFace; + SetFaceToResult ( handle->nTraCntFace ,handle->trFace ,handle->infoFace ,face , handle->execFlg ); + } + + return STB_NORMAL; +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* GetBodies : Getting stabilization results of body */ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 GetBodies(STBHANDLE handle, STB_UINT32 *body_count, STB_BODY *body) +{ + STB_INT32 nRet , i; + + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + nRet = IsValidPointer(body_count); + if(nRet != STB_NORMAL){ + return nRet; + } + nRet = IsValidPointer(body); + if(nRet != STB_NORMAL){ + return nRet; + } + if( handle->nExecuted != STB_TRUE){ + return STB_ERR_INITIALIZE; + } + + + /*init*/ + *body_count = 0; + for( i = 0 ; i < handle->nTraCntMax ; i++ ) + { + body[i].nDetectID = -1; + body[i].nTrackingID = -1; + body[i].center.x = 0; + body[i].center.y = 0; + body[i].nSize = 0; + body[i].conf = STB_CONF_NO_DATA ; + } + + /*Set the result to the structure*/ + if( handle->execFlg->bodyTr == STB_TRUE ) + { + *body_count = handle->nTraCntBody; + SetBodyToResult(handle->nTraCntBody,handle->trBody, body); + } + return STB_NORMAL; +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* Clear */ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 Clear(STBHANDLE handle) +{ + STB_INT32 nRet; + + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + STB_Tr_Clear( handle->hTrHandle ); + STB_Pe_Clear( handle->hPeHandle ); + if( handle->execFlg->fr == STB_TRUE ) + { + STB_Fr_Clear( handle->hFrHandle ); + } + + handle->nInitialized = STB_FALSE; + handle->nExecuted = STB_FALSE; + + + return STB_NORMAL; + +} +/*------------------------------------------------------------------------------------------------------------------*/ +/*Setting function (wrapper for child libraries)*/ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 SetTrackingRetryCount(STBHANDLE handle, STB_INT32 nMaxRetryCount){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + return STB_Tr_SetRetryCount(handle->hTrHandle,nMaxRetryCount); +} + +STB_INT32 GetTrackingRetryCount(STBHANDLE handle, STB_INT32 *pnMaxRetryCount){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + return STB_Tr_GetRetryCount(handle->hTrHandle,pnMaxRetryCount); +} + +STB_INT32 SetTrackingSteadinessParam(STBHANDLE handle, STB_INT32 nPosSteadinessParam, STB_INT32 nSizeSteadinessParam){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + return STB_Tr_SetStedinessParam(handle->hTrHandle, nPosSteadinessParam, nSizeSteadinessParam); +} + +STB_INT32 GetTrackingSteadinessParam(STBHANDLE handle, STB_INT32 *pnPosSteadinessParam, STB_INT32 *pnSizeSteadinessParam){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + return STB_Tr_GetStedinessParam(handle->hTrHandle, pnPosSteadinessParam, pnSizeSteadinessParam); +} + +STB_INT32 SetPropertyThreshold(STBHANDLE handle, STB_INT32 nThreshold){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + if( handle->execFlg->gen == STB_TRUE + || handle->execFlg->age == STB_TRUE + || handle->execFlg->exp == STB_TRUE + || handle->execFlg->dir == STB_TRUE + || handle->execFlg->gaz == STB_TRUE + || handle->execFlg->bli == STB_TRUE + ) + { + }else + { + return STB_NORMAL; + } + + return STB_Pe_SetFaceDirThreshold(handle->hPeHandle, nThreshold); +} + +STB_INT32 GetPropertyThreshold(STBHANDLE handle, STB_INT32 *pnThreshold){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( handle->execFlg->gen == STB_TRUE + || handle->execFlg->age == STB_TRUE + || handle->execFlg->exp == STB_TRUE + || handle->execFlg->dir == STB_TRUE + || handle->execFlg->gaz == STB_TRUE + || handle->execFlg->bli == STB_TRUE + ) + { + }else + { + return STB_NORMAL; + } + return STB_Pe_GetFaceDirThreshold(handle->hPeHandle, pnThreshold); +} + +STB_INT32 SetPropertyAngle(STBHANDLE handle,STB_INT32 nMinUDAngle, STB_INT32 nMaxUDAngle, + STB_INT32 nMinLRAngle, STB_INT32 nMaxLRAngle){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( handle->execFlg->gen == STB_TRUE + || handle->execFlg->age == STB_TRUE + || handle->execFlg->exp == STB_TRUE + || handle->execFlg->dir == STB_TRUE + || handle->execFlg->gaz == STB_TRUE + || handle->execFlg->bli == STB_TRUE + ) + { + }else + { + return STB_NORMAL; + } + return STB_Pe_SetFaceDirMinMax(handle->hPeHandle, nMinUDAngle, nMaxUDAngle, nMinLRAngle, nMaxLRAngle); +} + +STB_INT32 GetPropertyAngle(STBHANDLE handle, STB_INT32 *pnMinUDAngle , STB_INT32 *pnMaxUDAngle , + STB_INT32 *pnMinLRAngle , STB_INT32 *pnMaxLRAngle ){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( handle->execFlg->gen == STB_TRUE + || handle->execFlg->age == STB_TRUE + || handle->execFlg->exp == STB_TRUE + || handle->execFlg->dir == STB_TRUE + || handle->execFlg->gaz == STB_TRUE + || handle->execFlg->bli == STB_TRUE + ) + { + }else + { + return STB_NORMAL; + } + return STB_Pe_GetFaceDirMinMax(handle->hPeHandle, pnMinUDAngle, pnMaxUDAngle, pnMinLRAngle, pnMaxLRAngle); +} +STB_INT32 SetPropertyFrameCount(STBHANDLE handle, STB_INT32 nFrameCount){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( handle->execFlg->gen == STB_TRUE + || handle->execFlg->age == STB_TRUE + || handle->execFlg->exp == STB_TRUE + || handle->execFlg->dir == STB_TRUE + || handle->execFlg->gaz == STB_TRUE + || handle->execFlg->bli == STB_TRUE + ) + { + }else + { + return STB_NORMAL; + } + return STB_Pe_SetFrameCount(handle->hPeHandle, nFrameCount); +} +STB_INT32 GetPropertyFrameCount(STBHANDLE handle, STB_INT32 *pnFrameCount){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( handle->execFlg->gen == STB_TRUE + || handle->execFlg->age == STB_TRUE + || handle->execFlg->exp == STB_TRUE + || handle->execFlg->dir == STB_TRUE + || handle->execFlg->gaz == STB_TRUE + || handle->execFlg->bli == STB_TRUE + ) + { + }else + { + return STB_NORMAL; + } + return STB_Pe_GetFrameCount(handle->hPeHandle, pnFrameCount); +} +STB_INT32 SetRecognitionThreshold(STBHANDLE handle, STB_INT32 nThreshold){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( handle->execFlg->fr == STB_FALSE ) + { + return STB_NORMAL; + } + return STB_Fr_SetFaceDirThreshold(handle->hFrHandle, nThreshold); +} +STB_INT32 GetRecognitionThreshold(STBHANDLE handle, STB_INT32 *pnThreshold){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( handle->execFlg->fr == STB_FALSE ) + { + return STB_NORMAL; + } + return STB_Fr_GetFaceDirThreshold(handle->hFrHandle, pnThreshold); +} + +STB_INT32 SetRecognitionAngle(STBHANDLE handle, STB_INT32 nMinUDAngle, STB_INT32 nMaxUDAngle, + STB_INT32 nMinLRAngle, STB_INT32 nMaxLRAngle){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( handle->execFlg->fr == STB_FALSE ) + { + return STB_NORMAL; + } + return STB_Fr_SetFaceDirMinMax(handle->hFrHandle, nMinUDAngle, nMaxUDAngle, nMinLRAngle , nMaxLRAngle); +} + +STB_INT32 GetRecognitionAngle(STBHANDLE handle, STB_INT32 *pnMinUDAngle , STB_INT32 *pnMaxUDAngle , + STB_INT32 *pnMinLRAngle , STB_INT32 *pnMaxLRAngle){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + nRet = IsValidPointer(pnMinUDAngle); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + nRet = IsValidPointer(pnMaxUDAngle); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + nRet = IsValidPointer(pnMinLRAngle); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + nRet = IsValidPointer(pnMaxLRAngle); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + + if( handle->execFlg->fr == STB_FALSE ) + { + return STB_NORMAL; + } + return STB_Fr_GetFaceDirMinMax(handle->hFrHandle, pnMinUDAngle, pnMaxUDAngle, pnMinLRAngle , pnMaxLRAngle); +} + +STB_INT32 SetRecognitionFrameCount(STBHANDLE handle, STB_INT32 nFrameCount){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( handle->execFlg->fr == STB_FALSE ) + { + return STB_NORMAL; + } + return STB_Fr_SetFrameCount(handle->hFrHandle, nFrameCount); +} +STB_INT32 GetRecognitionFrameCount(STBHANDLE handle, STB_INT32 *pnFrameCount){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( handle->execFlg->fr == STB_FALSE ) + { + return STB_NORMAL; + } + return STB_Fr_GetFrameCount(handle->hFrHandle, pnFrameCount); +} + +STB_INT32 SetRecognitionRatio (STBHANDLE handle, STB_INT32 nMinRatio){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( handle->execFlg->fr == STB_FALSE ) + { + return STB_NORMAL; + } + return STB_Fr_SetMinRatio(handle->hFrHandle, nMinRatio); +} +STB_INT32 GetRecognitionRatio (STBHANDLE handle, STB_INT32 *pnMinRatio){ + STB_INT32 nRet; + /*NULL check*/ + nRet = IsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( handle->execFlg->fr == STB_FALSE ) + { + return STB_NORMAL; + } + return STB_Fr_GetMinRatio(handle->hFrHandle, pnMinRatio); +} diff --git a/src/b5t007001/stblib/src/STB/Interface.h b/src/b5t007001/stblib/src/STB/Interface.h new file mode 100644 index 00000000..8db58e0c --- /dev/null +++ b/src/b5t007001/stblib/src/STB/Interface.h @@ -0,0 +1,68 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#if !defined( _INTERFACE_H_ ) +#define _INTERFACE_H_ +#include "STBTypedefInput.h" +#include "STBHandle.h" + +#define VERSION_MAJOR ( 1 ) +#define VERSION_MINOR ( 1 ) + +#define DETECT_CNT_MAX ( 35 ) /*A maximum number of detected(input) people*/ +#define TRACK_CNT_MAX ( 35 ) /*A maximum number of tracking(output) people*/ + +#ifdef __cplusplus +extern "C" { +#endif + +/*-------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 GetVersion (STB_INT8* pnMajorVersion , STB_INT8* pnMinorVersion ); +STBHANDLE CreateHandle (STB_UINT32 stbExecFlg ); +STB_INT32 DeleteHandle (STBHANDLE handle); +STB_INT32 SetFrameResult (STBHANDLE handle,const STB_FRAME_RESULT *stbINPUTResult); +STB_INT32 Execute (STBHANDLE handle); +/*-------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 GetFaces (STBHANDLE handle, STB_UINT32 *face_count, STB_FACE face[35]); +STB_INT32 GetBodies (STBHANDLE handle, STB_UINT32 *body_count, STB_BODY body[35]); +STB_INT32 Clear (STBHANDLE handle); +/*-------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 SetTrackingRetryCount (STBHANDLE handle, STB_INT32 nMaxRetryCount ); +STB_INT32 GetTrackingRetryCount (STBHANDLE handle, STB_INT32 *pnMaxRetryCount ); +STB_INT32 SetTrackingSteadinessParam (STBHANDLE handle, STB_INT32 nPosSteadinessParam , STB_INT32 nSizeSteadinessParam ); +STB_INT32 GetTrackingSteadinessParam (STBHANDLE handle, STB_INT32 *pnPosSteadinessParam , STB_INT32 *pnSizeSteadinessParam ); +/*-------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 SetPropertyThreshold (STBHANDLE handle, STB_INT32 nThreshold ); +STB_INT32 GetPropertyThreshold (STBHANDLE handle, STB_INT32 *pnThreshold ); +STB_INT32 SetPropertyAngle (STBHANDLE handle, STB_INT32 nMinUDAngle , STB_INT32 nMaxUDAngle ,STB_INT32 nMinLRAngle , STB_INT32 nMaxLRAngle ); +STB_INT32 GetPropertyAngle (STBHANDLE handle, STB_INT32 *pnMinUDAngle , STB_INT32 *pnMaxUDAngle ,STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle ); +STB_INT32 SetPropertyFrameCount (STBHANDLE handle, STB_INT32 nFrameCount ); +STB_INT32 GetPropertyFrameCount (STBHANDLE handle, STB_INT32 *pnFrameCount ); +/*-------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 SetRecognitionThreshold (STBHANDLE handle, STB_INT32 nThreshold ); +STB_INT32 GetRecognitionThreshold (STBHANDLE handle, STB_INT32 *pnThreshold ); +STB_INT32 SetRecognitionAngle (STBHANDLE handle, STB_INT32 nMinUDAngle , STB_INT32 nMaxUDAngle ,STB_INT32 nMinLRAngle , STB_INT32 nMaxLRAngle ); +STB_INT32 GetRecognitionAngle (STBHANDLE handle, STB_INT32 *pnMinUDAngle , STB_INT32 *pnMaxUDAngle ,STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle ); +STB_INT32 SetRecognitionFrameCount (STBHANDLE handle, STB_INT32 nFrameCount ); +STB_INT32 GetRecognitionFrameCount (STBHANDLE handle, STB_INT32 *pnFrameCount ); +STB_INT32 SetRecognitionRatio (STBHANDLE handle, STB_INT32 nFrameShare ); +STB_INT32 GetRecognitionRatio (STBHANDLE handle, STB_INT32 *pnFrameShare ); +/*-------------------------------------------------------------------------------------------------------------------*/ +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/b5t007001/stblib/src/STB/STBAPI.c b/src/b5t007001/stblib/src/STB/STBAPI.c new file mode 100644 index 00000000..1c2d5894 --- /dev/null +++ b/src/b5t007001/stblib/src/STB/STBAPI.c @@ -0,0 +1,112 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "Interface.h" +#include "STBAPI.h" + + +/*This layer only defines the API function */ + +/*get the version*/ +STB_INT32 STB_GetVersion(STB_INT8* pnMajorVersion, STB_INT8* pnMinorVersion){ + return GetVersion(pnMajorVersion, pnMinorVersion); +} +/*Create/Delete handle*/ +HSTB STB_CreateHandle(STB_UINT32 stbExecFlg){ + return (HSTB)CreateHandle(stbExecFlg); +} +VOID STB_DeleteHandle(HSTB handle){ + DeleteHandle((STBHANDLE)handle); +} +/*set frame information*/ +STB_INT32 STB_SetFrameResult(HSTB handle, const STB_FRAME_RESULT *stbINPUTResult){ + return SetFrameResult((STBHANDLE)handle, stbINPUTResult); +} +STB_INT32 STB_ClearFrameResults(HSTB handle){ + return Clear((STBHANDLE)handle); +} +/*Main process execution*/ +STB_INT32 STB_Execute(HSTB handle){ + return Execute((STBHANDLE)handle); +} +/*get the result*/ +STB_INT32 STB_GetFaces(HSTB handle, STB_UINT32 *face_count, STB_FACE face[35]){ + return GetFaces((STBHANDLE)handle, face_count, face); +} +STB_INT32 STB_GetBodies(HSTB handle, STB_UINT32 *body_count, STB_BODY body[35]){ + return GetBodies((STBHANDLE)handle, body_count, body); +} + +/*Setting / Getting Function for tracking*/ +STB_INT32 STB_SetTrRetryCount(HSTB hHandle, STB_INT32 nMaxRetryCount){ + return SetTrackingRetryCount((STBHANDLE)hHandle, nMaxRetryCount); +} +STB_INT32 STB_GetTrRetryCount(HSTB hHandle, STB_INT32 *pnMaxRetryCount){ + return GetTrackingRetryCount((STBHANDLE)hHandle, pnMaxRetryCount); +} +STB_INT32 STB_SetTrSteadinessParam(HSTB hHandle, STB_INT32 nPosSteadinessParam, STB_INT32 nSizeSteadinessParam){ + return SetTrackingSteadinessParam((STBHANDLE)hHandle, nPosSteadinessParam, nSizeSteadinessParam); +} +STB_INT32 STB_GetTrSteadinessParam(HSTB hHandle, STB_INT32 *pnPosSteadinessParam, STB_INT32 *pnSizeSteadinessParam){ + return GetTrackingSteadinessParam((STBHANDLE)hHandle, pnPosSteadinessParam, pnSizeSteadinessParam); +} + +/*Setting / Getting Function for property*/ +STB_INT32 STB_SetPeThresholdUse(HSTB hHandle, STB_INT32 nThreshold){ + return SetPropertyThreshold((STBHANDLE)hHandle, nThreshold); +} +STB_INT32 STB_GetPeThresholdUse(HSTB hHandle, STB_INT32 *pnThreshold){ + return GetPropertyThreshold((STBHANDLE)hHandle, pnThreshold); +} +STB_INT32 STB_SetPeAngleUse(HSTB hHandle, STB_INT32 nMinUDAngle, STB_INT32 nMaxUDAngle, STB_INT32 nMinLRAngle, STB_INT32 nMaxLRAngle ){ + return SetPropertyAngle((STBHANDLE)hHandle, nMinUDAngle, nMaxUDAngle, nMinLRAngle, nMaxLRAngle); +} +STB_INT32 STB_GetPeAngleUse(HSTB hHandle, STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle, STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle ){ + return GetPropertyAngle((STBHANDLE)hHandle, pnMinUDAngle, pnMaxUDAngle, pnMinLRAngle, pnMaxLRAngle); +} +STB_INT32 STB_SetPeCompleteFrameCount(HSTB hHandle, STB_INT32 nFrameCount){ + return SetPropertyFrameCount((STBHANDLE)hHandle, nFrameCount); +} +STB_INT32 STB_GetPeCompleteFrameCount(HSTB hHandle, STB_INT32 *pnFrameCount){ + return GetPropertyFrameCount((STBHANDLE)hHandle, pnFrameCount); +} + +/*Setting / Getting Function for recognition*/ +STB_INT32 STB_SetFrThresholdUse(HSTB hHandle, STB_INT32 nThreshold){ + return SetRecognitionThreshold((STBHANDLE)hHandle, nThreshold); +} +STB_INT32 STB_GetFrThresholdUse(HSTB hHandle, STB_INT32 *pnThreshold){ + return GetRecognitionThreshold((STBHANDLE)hHandle, pnThreshold); +} +STB_INT32 STB_SetFrAngleUse(HSTB hHandle, STB_INT32 nMinUDAngle, STB_INT32 nMaxUDAngle, STB_INT32 nMinLRAngle, STB_INT32 nMaxLRAngle ){ + return SetRecognitionAngle((STBHANDLE)hHandle, nMinUDAngle, nMaxUDAngle, nMinLRAngle, nMaxLRAngle); +} +STB_INT32 STB_GetFrAngleUse(HSTB hHandle, STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle, STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle ){ + return GetRecognitionAngle((STBHANDLE)hHandle, pnMinUDAngle, pnMaxUDAngle, pnMinLRAngle, pnMaxLRAngle); +} +STB_INT32 STB_SetFrCompleteFrameCount(HSTB hHandle, STB_INT32 nFrameCount){ + return SetRecognitionFrameCount((STBHANDLE)hHandle, nFrameCount); +} +STB_INT32 STB_GetFrCompleteFrameCount(HSTB hHandle, STB_INT32 *pnFrameCount){ + return GetRecognitionFrameCount((STBHANDLE)hHandle, pnFrameCount); +} +STB_INT32 STB_SetFrMinRatio(HSTB hHandle, STB_INT32 nFrameRatio){ + return SetRecognitionRatio((STBHANDLE)hHandle, nFrameRatio); +} +STB_INT32 STB_GetFrMinRatio(HSTB hHandle, STB_INT32 *pnFrameRatio){ + return GetRecognitionRatio((STBHANDLE)hHandle, pnFrameRatio); +} + diff --git a/src/b5t007001/stblib/src/STB/STBAPI.h b/src/b5t007001/stblib/src/STB/STBAPI.h new file mode 100644 index 00000000..7d8cc800 --- /dev/null +++ b/src/b5t007001/stblib/src/STB/STBAPI.h @@ -0,0 +1,74 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#if !defined( _SDK_STB_H_ ) +#define _SDK_STB_H_ +#include "STBTypedefInput.h" +#include "STBTypedefOutput.h" + + + +#if !defined( STB_DEF_HANDLE ) + #define STB_DEF_HANDLE + typedef VOID* HSTB ; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/*Create/Delete handle*/ +STB_INT32 STB_GetVersion(STB_INT8* pnMajorVersion, STB_INT8* pnMinorVersion); +HSTB STB_CreateHandle(STB_UINT32 unUseFuncFlag); +VOID STB_DeleteHandle(HSTB hSTB); + +/*set frame information*/ +STB_INT32 STB_SetFrameResult(HSTB hSTB, const STB_FRAME_RESULT *stFrameResult); +STB_INT32 STB_ClearFrameResults(HSTB hSTB); +/*Main process execution*/ +STB_INT32 STB_Execute(HSTB hSTB); +/*get the result*/ +STB_INT32 STB_GetFaces(HSTB hSTB, STB_UINT32 *punFaceCount, STB_FACE stFace[]); +STB_INT32 STB_GetBodies(HSTB hSTB, STB_UINT32 *punBodyCount, STB_BODY stBody[]); + +/*Setting / Getting Function for tracking*/ +STB_INT32 STB_SetTrRetryCount(HSTB hSTB, STB_INT32 nMaxRetryCount); +STB_INT32 STB_GetTrRetryCount(HSTB hSTB, STB_INT32 *pnMaxRetryCount); +STB_INT32 STB_SetTrSteadinessParam(HSTB hSTB, STB_INT32 nPosSteadinessParam, STB_INT32 nSizeSteadinessParam); +STB_INT32 STB_GetTrSteadinessParam(HSTB hSTB, STB_INT32 *pnPosSteadinessParam, STB_INT32 *pnSizeSteadinessParam); +/*Setting / Getting Function for property*/ +STB_INT32 STB_SetPeThresholdUse(HSTB hSTB, STB_INT32 nThreshold); +STB_INT32 STB_GetPeThresholdUse(HSTB hSTB, STB_INT32 *pnThreshold); +STB_INT32 STB_SetPeAngleUse(HSTB hSTB, STB_INT32 nMinUDAngle, STB_INT32 nMaxUDAngle, STB_INT32 nMinLRAngle, STB_INT32 nMaxLRAngle); +STB_INT32 STB_GetPeAngleUse(HSTB hSTB, STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle, STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle); +STB_INT32 STB_SetPeCompleteFrameCount(HSTB hSTB, STB_INT32 nFrameCount); +STB_INT32 STB_GetPeCompleteFrameCount(HSTB hSTB, STB_INT32 *pnFrameCount); +/*Setting / Getting Function for recognition*/ +STB_INT32 STB_SetFrThresholdUse(HSTB hSTB, STB_INT32 nThreshold); +STB_INT32 STB_GetFrThresholdUse(HSTB hSTB, STB_INT32 *pnThreshold); +STB_INT32 STB_SetFrAngleUse(HSTB hSTB, STB_INT32 nMinUDAngle, STB_INT32 nMaxUDAngle, STB_INT32 nMinLRAngle, STB_INT32 nMaxLRAngle); +STB_INT32 STB_GetFrAngleUse(HSTB hSTB, STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle, STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle); +STB_INT32 STB_SetFrCompleteFrameCount(HSTB hSTB, STB_INT32 nFrameCount); +STB_INT32 STB_GetFrCompleteFrameCount(HSTB hSTB, STB_INT32 *pnFrameCount); +STB_INT32 STB_SetFrMinRatio(HSTB hSTB, STB_INT32 nMinRatio); +STB_INT32 STB_GetFrMinRatio(HSTB hSTB, STB_INT32 *pnMinRatio); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/b5t007001/stblib/src/STB/STBFaceInfo.c b/src/b5t007001/stblib/src/STB/STBFaceInfo.c new file mode 100644 index 00000000..d65f84c0 --- /dev/null +++ b/src/b5t007001/stblib/src/STB/STBFaceInfo.c @@ -0,0 +1,450 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "STBCommonDef.h" +#include "STBFaceInfo.h" +#include "STB_Debug.h" +#include "STBValidValue.h" + + + + +/*------------------------------------------------------------------------------------------------------------------*/ +/*CopyFace : Face information all copy*/ +/*------------------------------------------------------------------------------------------------------------------*/ +static VOID CopyFace(FaceObj *faceSrc,FaceObj *faceDst, const STBExecFlg *execFlg ) +{ + + STB_INT32 j; + + faceDst->nDetID = faceSrc->nDetID ; + faceDst->nTraID = faceSrc->nTraID ; + if( execFlg->gen == STB_TRUE ) + { + faceDst->genConf = faceSrc->genConf ; + faceDst->genStatus = faceSrc->genStatus ; + faceDst->genVal = faceSrc->genVal ; + } + if( execFlg->age == STB_TRUE ) + { + faceDst->ageConf = faceSrc->ageConf ; + faceDst->ageStatus = faceSrc->ageStatus ; + faceDst->ageVal = faceSrc->ageVal ; + } + if( execFlg->fr == STB_TRUE ) + { + faceDst->frConf = faceSrc->frConf ; + faceDst->frStatus = faceSrc->frStatus ; + faceDst->frVal = faceSrc->frVal ; + } + if( execFlg->exp == STB_TRUE ) + { + faceDst->expConf = faceSrc->expConf ; + faceDst->expStatus = faceSrc->expStatus ; + faceDst->expVal = faceSrc->expVal ; + for( j = 0 ; j < STB_EX_MAX ;j++) + { + faceDst->expScore[j] = faceSrc->expScore[j]; + } + } + if( execFlg->gaz == STB_TRUE ) + { + faceDst->gazConf = faceSrc->gazConf ; + faceDst->gazStatus = faceSrc->gazStatus ; + faceDst->gazLR = faceSrc->gazLR ; + faceDst->gazUD = faceSrc->gazUD ; + } + if( execFlg->dir == STB_TRUE ) + { + faceDst->dirConf = faceSrc->dirConf ; + faceDst->dirYaw = faceSrc->dirYaw ; + faceDst->dirRoll = faceSrc->dirRoll ; + faceDst->dirPitch = faceSrc->dirPitch ; + faceDst->dirStatus = faceSrc->dirStatus ; + } + if( execFlg->bli == STB_TRUE ) + { + faceDst->bliL = faceSrc->bliL ; + faceDst->bliR = faceSrc->bliR ; + faceDst->bliStatus = faceSrc->bliStatus ; + } + + + +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* ClearFace */ +/*------------------------------------------------------------------------------------------------------------------*/ +static VOID ClearFace ( FaceObj *face , int i , const STBExecFlg *execFlg ) +{ + STB_INT32 j; + + face[i].nDetID = -1 ; + face[i].nTraID = -1 ; + + if( execFlg->gen == STB_TRUE ) + { + face[i].genConf = STB_ERR_PE_CANNOT ; + face[i].genStatus = STB_STATUS_NO_DATA ; + face[i].genVal = STB_ERR_PE_CANNOT ; + } + if( execFlg->age == STB_TRUE ) + { + face[i].ageConf = STB_ERR_PE_CANNOT ; + face[i].ageStatus = STB_STATUS_NO_DATA ; + face[i].ageVal = STB_ERR_PE_CANNOT ; + } + if( execFlg->fr == STB_TRUE ) + { + face[i].frConf = STB_ERR_PE_CANNOT ; + face[i].frStatus = STB_STATUS_NO_DATA ; + face[i].frVal = STB_ERR_FR_CANNOT ; + } + if( execFlg->exp == STB_TRUE ) + { + face[i].expConf = STB_ERR_PE_CANNOT ; + for (j = STB_EX_NEUTRAL; j < STB_EX_MAX;j++) + { + face[i].expScore[j] = STB_ERR_PE_CANNOT ; + } + face[i].expStatus = STB_STATUS_NO_DATA ; + face[i].expVal = STB_ERR_PE_CANNOT ; + } + if( execFlg->gaz == STB_TRUE ) + { + face[i].gazConf = STB_ERR_PE_CANNOT ; + face[i].gazStatus = STB_STATUS_NO_DATA ; + face[i].gazLR = STB_ERR_PE_CANNOT ; + face[i].gazUD = STB_ERR_PE_CANNOT ; + } + if( execFlg->dir == STB_TRUE ) + { + face[i].dirConf = STB_ERR_PE_CANNOT ; + face[i].dirStatus = STB_STATUS_NO_DATA ; + face[i].dirYaw = STB_ERR_DIR_CANNOT ; + face[i].dirRoll = STB_ERR_DIR_CANNOT ; + face[i].dirPitch = STB_ERR_DIR_CANNOT ; + } + if( execFlg->bli == STB_TRUE ) + { + face[i].bliL = STB_ERR_PE_CANNOT ; + face[i].bliR = STB_ERR_PE_CANNOT ; + face[i].bliStatus = STB_STATUS_NO_DATA ; + } + +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* SetFaceObject : Copy the tracking information */ +/*------------------------------------------------------------------------------------------------------------------*/ +VOID SetFaceObject( const STB_FRAME_RESULT_FACES* stbINPUTfaces ,FaceObj *faces , const STBExecFlg *execFlg , const STB_INT32 nTraCntMax) +{ + STB_INT32 nCount; + STB_INT32 i,nIdx1; + + + nCount = stbINPUTfaces->nCount; + + + for (i = 0; i < nCount; i++) + { + faces[i].nDetID = i; + faces[i].nTraID = STB_STATUS_NO_DATA; + } + + if( execFlg->dir == STB_TRUE ) /*Face direction*/ + { + for (i = 0; i < nCount; i++) + { + faces[i].dirConf = stbINPUTfaces->face[i].direction.nConfidence; + faces[i].dirYaw = stbINPUTfaces->face[i].direction.nLR; + faces[i].dirRoll = stbINPUTfaces->face[i].direction.nRoll; + faces[i].dirPitch = stbINPUTfaces->face[i].direction.nUD; + } + } + if( execFlg->age == STB_TRUE ) /*Age*/ + { + for (i = 0; i < nCount; i++) + { + faces[i].ageConf = stbINPUTfaces->face[i].age.nConfidence; + faces[i].ageStatus = STB_STATUS_NO_DATA; + faces[i].ageVal = stbINPUTfaces->face[i].age.nAge; + } + } + if( execFlg->exp == STB_TRUE ) /*Facial expression*/ + { + for (i = 0; i < nCount; i++) + { + faces[i].expConf = -1;// not degree + for (nIdx1 = STB_EX_NEUTRAL; nIdx1 < STB_EX_MAX;nIdx1++) + { + faces[i].expScore[ nIdx1] = stbINPUTfaces->face[i].expression.anScore[nIdx1]; + } + faces[i].expStatus = STB_STATUS_NO_DATA; + faces[i].expVal = STB_EX_UNKNOWN; + } + } + if( execFlg->gen == STB_TRUE ) /*Gender*/ + { + for (i = 0; i < nCount; i++) + { + faces[i].genConf = stbINPUTfaces->face[i].gender.nConfidence; + faces[i].genStatus = STB_STATUS_NO_DATA; + faces[i].genVal = stbINPUTfaces->face[i].gender.nGender; + } + } + if( execFlg->gaz == STB_TRUE ) /*Gaze*/ + { + for (i = 0; i < nCount; i++) + { + faces[i].gazConf = stbINPUTfaces->face[i].direction.nConfidence; + faces[i].gazStatus = STB_STATUS_NO_DATA; + faces[i].gazLR = stbINPUTfaces->face[i].gaze.nLR; + faces[i].gazUD = stbINPUTfaces->face[i].gaze.nUD; + } + } + if( execFlg->fr == STB_TRUE ) /*Face recognition*/ + { + for (i = 0; i < nCount; i++) + { + faces[i].frConf = stbINPUTfaces->face[i].recognition.nScore; + faces[i].frStatus = STB_STATUS_NO_DATA; + faces[i].frVal = stbINPUTfaces->face[i].recognition.nUID; + } + } + if( execFlg->bli == STB_TRUE ) //blink + { + for (i = 0; i < nCount; i++) + { + faces[i].bliL = stbINPUTfaces->face[i].blink.nLeftEye; + faces[i].bliR = stbINPUTfaces->face[i].blink.nRightEye; + } + } + + /*The results exceeding the detection number are initialized*/ + for ( i = nCount; i < nTraCntMax; i++) + { + ClearFace ( faces , i , execFlg ); + } + +} + + +/*------------------------------------------------------------------------------------------------------------------*/ +/* SetTrackingIDToFace : Tracking result ID is linked to face information */ +/*------------------------------------------------------------------------------------------------------------------*/ +VOID SetTrackingIDToFace(STB_INT32 TrackingNum,STB_INT32 DetectNum, TraObj *track,FaceObj *faces , const STBExecFlg *execFlg ) +{ + STB_INT32 i,j; + + + /*If there is a detection result erased in the tracking result, it is deleted from the face information.*/ + for( i = 0 ; i < DetectNum; i++) + { + /*termination if no more detected results*/ + if(faces[i].nDetID < 0) + { + break; + } + + /*Search for the same ID as the detection result from the tracking result*/ + for( j = 0; j < TrackingNum ; j++) + { + if(track[j].nDetID == faces[i].nDetID) + { + faces[i].nTraID = track[j].nTraID; + break; + } + } + + if( j >= TrackingNum){ + /*If the detection ID is not included in the ID under tracking*/ + ClearFace ( faces , i , execFlg); + for(j = j + 1 ; j < DetectNum; j++) + { + if(faces[j].nDetID < 0) + { + /*Repeat until detection result disappears*/ + break; + } + /*Stuff up ahead of erasure*/ + CopyFace ( (faces+j),(faces+j-1), execFlg ); + } + } + } + /*After that, the processing for the face only during tracking (retry status)*/ + for( j = 0 ; j < TrackingNum; j++) + { + if( track[j].nDetID < 0) + { + ClearFace ( faces , i , execFlg );/*It should have been cleared but just in case*/ + faces[i].nDetID = track[j].nDetID; + faces[i].nTraID = track[j].nTraID; + i++; + } + } + + return; +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* SetFaceToPeInfo : Create input data for stabilization of property estimation from face information */ +/*------------------------------------------------------------------------------------------------------------------*/ +VOID SetFaceToPeInfo(STB_INT32 TrackingNum,FaceObj *faces,STB_PE_DET *peInfo) +{ + STB_INT32 nIdx,nIdx1; + + peInfo->num = TrackingNum; + for(nIdx=0 ; nIdx < TrackingNum;nIdx++) + { + /*tracking result*/ + peInfo->fcDet[nIdx].nDetID = faces[nIdx].nDetID ; + peInfo->fcDet[nIdx].nTraID = faces[nIdx].nTraID ; + /*Face direction estimation*/ + peInfo->fcDet[nIdx].dirDetConf = faces[nIdx].dirConf ; + peInfo->fcDet[nIdx].dirDetYaw = faces[nIdx].dirYaw ; + peInfo->fcDet[nIdx].dirDetPitch = faces[nIdx].dirPitch ; + peInfo->fcDet[nIdx].dirDetRoll = faces[nIdx].dirRoll ; + /*Age estimation*/ + peInfo->fcDet[nIdx].ageDetVal = faces[nIdx].ageVal ; + peInfo->fcDet[nIdx].ageDetConf = faces[nIdx].ageConf ; + /*Gaze estimation*/ + peInfo->fcDet[nIdx].gazDetLR = faces[nIdx].gazLR ; + peInfo->fcDet[nIdx].gazDetUD = faces[nIdx].gazUD ; + /*Gender estimation*/ + peInfo->fcDet[nIdx].genDetVal = faces[nIdx].genVal ; + peInfo->fcDet[nIdx].genDetConf = faces[nIdx].genConf ; + /*estimation of facial expression*/ + peInfo->fcDet[nIdx].expDetConf = faces[nIdx].expConf ; + for( nIdx1 = 0; nIdx1 < STB_EX_MAX; nIdx1++) + { + peInfo->fcDet[nIdx].expDetVal[nIdx1] = faces[nIdx].expScore[nIdx1]; + } + //blink + peInfo->fcDet[nIdx].bliDetL = faces[nIdx].bliL ; + peInfo->fcDet[nIdx].bliDetR = faces[nIdx].bliR ; + + + } + return; +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* SetFaceToFrInfo : Create input data for stabilization of face recognition from face information */ +/*------------------------------------------------------------------------------------------------------------------*/ +VOID SetFaceToFrInfo(STB_INT32 TrackingNum,FaceObj *faces,STB_FR_DET *frInfo) +{ + STB_INT32 nIdx; + + + frInfo->num = TrackingNum; + for(nIdx=0 ; nIdx < TrackingNum;nIdx++) + { + /*tracking result*/ + frInfo->fcDet[nIdx].nDetID = faces[nIdx].nDetID ; + frInfo->fcDet[nIdx].nTraID = faces[nIdx].nTraID ; + + /*Face direction estimation*/ + frInfo->fcDet[nIdx].dirDetConf = faces[nIdx].dirConf ; + frInfo->fcDet[nIdx].dirDetYaw = faces[nIdx].dirYaw ; + frInfo->fcDet[nIdx].dirDetPitch = faces[nIdx].dirPitch ; + frInfo->fcDet[nIdx].dirDetRoll = faces[nIdx].dirRoll ; + + /*recognition result*/ + frInfo->fcDet[nIdx].frDetConf = faces[nIdx].frConf ; + frInfo->fcDet[nIdx].frDetID = faces[nIdx].frVal ; + + } + return; +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* SetPeInfoToFace : Copy stabilization result of property estimation to face information */ +/*------------------------------------------------------------------------------------------------------------------*/ +VOID SetPeInfoToFace(STB_INT32 TrackingNum,STB_PE_RES *peInfo,FaceObj *faces, const STBExecFlg *execFlg ) +{ + STB_INT32 i,j; + + for( i = 0 ; i < TrackingNum; i++) + { + for( j = 0 ; j < TrackingNum; j++) + { + if(peInfo->peFace[j].nTraID == faces[i].nTraID ) + { + if( execFlg->gen == STB_TRUE ) + { + faces[i].genStatus = peInfo->peFace[j].gen.status ; + faces[i].genVal = peInfo->peFace[j].gen.value ; + faces[i].genConf = peInfo->peFace[j].gen.conf ; + } + if( execFlg->age == STB_TRUE ) + { + faces[i].ageStatus = peInfo->peFace[j].age.status ; + faces[i].ageVal = peInfo->peFace[j].age.value ; + faces[i].ageConf = peInfo->peFace[j].age.conf ; + } + if( execFlg->exp == STB_TRUE ) + { + faces[i].expStatus = peInfo->peFace[j].exp.status ; + faces[i].expVal = peInfo->peFace[j].exp.value ; + faces[i].expConf = peInfo->peFace[j].exp.conf ; + } + if( execFlg->gaz == STB_TRUE ) + { + faces[i].gazStatus = peInfo->peFace[j].gaz.status ; + faces[i].gazConf = peInfo->peFace[j].gaz.conf ; + faces[i].gazLR = peInfo->peFace[j].gaz.LR ; + faces[i].gazUD = peInfo->peFace[j].gaz.UD ; + } + if( execFlg->dir == STB_TRUE ) + { + faces[i].dirPitch = peInfo->peFace[j].dir.pitch ; + faces[i].dirRoll = peInfo->peFace[j].dir.roll ; + faces[i].dirYaw = peInfo->peFace[j].dir.yaw ; + faces[i].dirStatus = peInfo->peFace[j].dir.status ; + faces[i].dirConf = peInfo->peFace[j].dir.conf ; + } + if( execFlg->bli == STB_TRUE ) + { + faces[i].bliL = peInfo->peFace[j].bli.ratioL ; + faces[i].bliR = peInfo->peFace[j].bli.ratioR ; + faces[i].bliStatus = peInfo->peFace[j].bli.status ; + } + break; + } + } + } + + return; +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* SetFrInfoToFace : Copy stabilization result of face recognition to face information */ +/*------------------------------------------------------------------------------------------------------------------*/ +VOID SetFrInfoToFace(STB_INT32 TrackingNum,STB_FR_RES *frInfo,FaceObj *faces) +{ + STB_INT32 i,j; + + for( i = 0 ; i < TrackingNum; i++) + { + for( j = 0 ; j < TrackingNum; j++) + { + if(frInfo->frFace[j].nTraID == faces[i].nTraID) + { + faces[i].frStatus = frInfo->frFace[j].frRecog.status ; + faces[i].frVal = frInfo->frFace[j].frRecog.value ; + faces[i].frConf = frInfo->frFace[j].frRecog.conf ; + break; + } + } + } + return; +} \ No newline at end of file diff --git a/src/b5t007001/stblib/src/STB/STBMakeResult.c b/src/b5t007001/stblib/src/STB/STBMakeResult.c new file mode 100644 index 00000000..29addefc --- /dev/null +++ b/src/b5t007001/stblib/src/STB/STBMakeResult.c @@ -0,0 +1,119 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "STBMakeResult.h" + + +/*------------------------------------------------------------------------------------------------------------------*/ +/* SetFaceToResult */ +/*------------------------------------------------------------------------------------------------------------------*/ +VOID SetFaceToResult ( STB_INT32 TraCnt , TraObj* trObj , FaceObj* faceObj, STB_FACE* result, const STBExecFlg* execFlg ) +{ + STB_INT32 i,j; + STB_INT32 tmpFlg; + + tmpFlg = execFlg->gen + || execFlg->age + || execFlg->fr + || execFlg->exp + || execFlg->dir + || execFlg->gaz + || execFlg->bli ; + + + for( i = 0; i < TraCnt; i++) + { + result[i].nDetectID = trObj[i].nDetID ; + result[i].nTrackingID = trObj[i].nTraID ; + result[i].center.x = trObj[i].pos .x ; + result[i].center.y = trObj[i].pos .y ; + result[i].nSize = trObj[i].size ; + result[i].conf = trObj[i].conf ; + + if( tmpFlg ) + { + for( j = 0; j < TraCnt; j++) + { + if( trObj[i].nTraID == faceObj[j].nTraID ) + { + if( execFlg->age == STB_TRUE ) + { + result[i].age.status = faceObj[j].ageStatus ; + result[i].age.value = faceObj[j].ageVal ; + result[i].age.conf = faceObj[j].ageConf ; + } + if( execFlg->bli == STB_TRUE ) + { + result[i].blink.ratioL = faceObj[j].bliL ; + result[i].blink.ratioR = faceObj[j].bliR ; + result[i].blink.status = faceObj[j].bliStatus ; + } + if( execFlg->dir == STB_TRUE ) + { + result[i].direction.pitch = faceObj[j].dirPitch ; + result[i].direction.roll = faceObj[j].dirRoll ; + result[i].direction.yaw = faceObj[j].dirYaw ; + result[i].direction.status = faceObj[j].dirStatus ; + result[i].direction.conf = faceObj[j].dirConf ; + } + if( execFlg->exp == STB_TRUE ) + { + result[i].expression.status = faceObj[j].expStatus ; + result[i].expression.value = faceObj[j].expVal ; + result[i].expression.conf = faceObj[j].expConf ; + } + if( execFlg->gaz == STB_TRUE ) + { + result[i].gaze.status = faceObj[j].gazStatus ; + result[i].gaze.LR = faceObj[j].gazLR ; + result[i].gaze.UD = faceObj[j].gazUD ; + result[i].gaze.conf = faceObj[j].gazConf ; + } + if( execFlg->gen == STB_TRUE ) + { + result[i].gender.status = faceObj[j].genStatus ; + result[i].gender.value = faceObj[j].genVal ; + result[i].gender.conf = faceObj[j].genConf ; + } + if( execFlg->fr == STB_TRUE ) + { + result[i].recognition.status = faceObj[j].frStatus ; + result[i].recognition.value = faceObj[j].frVal ; + result[i].recognition.conf = faceObj[j].frConf ; + } + break; + }//if( trObj[i].nTraID == faceObj[j].nTraID ) + }//for( j = 0; j < TraCnt; j++) + }//if( tmpFlg ) + }//for( i = 0; i < TraCnt; i++) +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* SetBodyToResult */ +/*------------------------------------------------------------------------------------------------------------------*/ +VOID SetBodyToResult(STB_INT32 TraCnt,TraObj* trObj, STB_BODY* result) +{ + STB_INT32 i; + for( i = 0; i < TraCnt; i++) + { + result[i].nDetectID = trObj[i].nDetID ; + result[i].nTrackingID = trObj[i].nTraID ; + result[i].center.x = trObj[i].pos.x ; + result[i].center.y = trObj[i].pos.y ; + result[i].nSize = trObj[i].size ; + result[i].conf = trObj[i].conf ; + } + +} diff --git a/src/b5t007001/stblib/src/STB/STBTracking.c b/src/b5t007001/stblib/src/STB/STBTracking.c new file mode 100644 index 00000000..3d727407 --- /dev/null +++ b/src/b5t007001/stblib/src/STB/STBTracking.c @@ -0,0 +1,138 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "STBTracking.h" +#include "STB_Debug.h" + +/*------------------------------------------------------------------------------------------------------------------*/ +/* SetTrackingObjectBody */ +/*------------------------------------------------------------------------------------------------------------------*/ +VOID SetTrackingObjectBody(const STB_FRAME_RESULT_BODYS* stbINPUTbodys,TraObj *bodys) +{ + + STB_INT32 nCount; + STB_INT32 i; + + + /*make the human body information*/ + nCount = stbINPUTbodys->nCount; + + for ( i = 0; i < nCount; i++) + { + bodys[i].nDetID = i; + bodys[i].pos.x = stbINPUTbodys->body[i].center.nX ; + bodys[i].pos.y = stbINPUTbodys->body[i].center.nY ; + bodys[i].conf = stbINPUTbodys->body[i].nConfidence; + bodys[i].size = stbINPUTbodys->body[i].nSize ; + bodys[i].nTraID = STB_STATUS_NO_DATA; + } + +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* SetTrackingObjectFace */ +/*------------------------------------------------------------------------------------------------------------------*/ +VOID SetTrackingObjectFace ( const STB_FRAME_RESULT_FACES *stbINPUTfaces ,TraObj *faces ) +{ + + STB_INT32 nCount; + STB_INT32 i; + + + /*make the human body information*/ + nCount = stbINPUTfaces->nCount; + for ( i = 0; i < nCount; i++) + { + faces[i].nDetID = i; + faces[i].pos.x = stbINPUTfaces->face[i].center.nX ; + faces[i].pos.y = stbINPUTfaces->face[i].center.nY ; + faces[i].conf = stbINPUTfaces->face[i].nConfidence; + faces[i].size = stbINPUTfaces->face[i].nSize ; + faces[i].nTraID = STB_STATUS_NO_DATA; + } + +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* SetSrcTrFace */ +/*------------------------------------------------------------------------------------------------------------------*/ +VOID SetSrcTrFace ( STB_INT32 nDetCntFace , TraObj *trFace, STB_TR_DET *trSrcInfo) +{ + STB_INT32 i; + + trSrcInfo->fcNum = nDetCntFace; + for( i = 0; i < nDetCntFace; i++) + { + trSrcInfo->fcDet[i].conf = trFace[i].conf ; + trSrcInfo->fcDet[i].posX = trFace[i].pos .x ; + trSrcInfo->fcDet[i].posY = trFace[i].pos .y ; + trSrcInfo->fcDet[i].size = trFace[i].size ; + } +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* SetSrcTrBody */ +/*------------------------------------------------------------------------------------------------------------------*/ +VOID SetSrcTrBody ( STB_INT32 nDetCntBody , TraObj *trBody, STB_TR_DET *trSrcInfo) +{ + STB_INT32 i; + + trSrcInfo->bdNum = nDetCntBody; + + for( i = 0; i < nDetCntBody; i++) + { + trSrcInfo->bdDet[i].conf = trBody[i].conf ; + trSrcInfo->bdDet[i].posX = trBody[i].pos .x ; + trSrcInfo->bdDet[i].posY = trBody[i].pos .y ; + trSrcInfo->bdDet[i].size = trBody[i].size ; + } +} + +/*------------------------------------------------------------------------------------------------------------------*/ +/* SetTrackingInfoToFace : Reflect tracking result in structure of detection result */ +/*------------------------------------------------------------------------------------------------------------------*/ +VOID SetTrackingInfoToFace( STB_TR_RES_FACES *fdResult ,STB_INT32 *pnTrackingNum ,TraObj *faces ) +{ + STB_INT32 nIdx; + + *pnTrackingNum = fdResult->cnt; + for (nIdx = 0; nIdx < *pnTrackingNum; nIdx++) + { + faces[nIdx].nDetID = fdResult->face[nIdx].nDetID ; + faces[nIdx].nTraID = fdResult->face[nIdx].nTraID ; + faces[nIdx].pos .x = fdResult->face[nIdx].pos.x ; + faces[nIdx].pos .y = fdResult->face[nIdx].pos.y ; + faces[nIdx].size = fdResult->face[nIdx].size ; + faces[nIdx].conf = fdResult->face[nIdx].conf ; + } + + return; +} + +VOID SetTrackingInfoToBody(STB_TR_RES_BODYS *bdResult,STB_INT32 *pnTrackingNum,TraObj *bodys) +{ + STB_INT32 nIdx; + + *pnTrackingNum = bdResult->cnt; + for (nIdx = 0; nIdx < *pnTrackingNum; nIdx++) + { + bodys[nIdx].nDetID = bdResult->body[nIdx].nDetID ; + bodys[nIdx].nTraID = bdResult->body[nIdx].nTraID ; + bodys[nIdx].pos .x = bdResult->body[nIdx].pos.x ; + bodys[nIdx].pos .y = bdResult->body[nIdx].pos.y ; + bodys[nIdx].size = bdResult->body[nIdx].size ; + bodys[nIdx].conf = bdResult->body[nIdx].conf ; + } + + return; +} \ No newline at end of file diff --git a/src/b5t007001/stblib/src/STB/STBValidValue.c b/src/b5t007001/stblib/src/STB/STBValidValue.c new file mode 100644 index 00000000..65b24d1d --- /dev/null +++ b/src/b5t007001/stblib/src/STB/STBValidValue.c @@ -0,0 +1,138 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "STBValidValue.h" + +/*Value range check*/ +#define IS_OUT_RANGE( val , min , max ) ( ( (val) < (min) ) || ( (max) < (val) ) ) +#define IS_OUT_VALUE( val , min , max , accept ) ( IS_OUT_RANGE( val , min , max ) && ( (val) != (accept) ) ) +#define IS_OUT_FR_UID( val , min , max , acceptA , acceptB , acceptC ) ( IS_OUT_RANGE( val , min , max ) && ( (val) != (acceptA) ) && ( (val) != (acceptB) ) && ( (val) != (acceptC) ) ) +#define IS_OUT_FR_SCORE( val , min , max , acceptA , acceptB ) ( IS_OUT_RANGE( val , min , max ) && ( (val) != (acceptA) ) && ( (val) != (acceptB) ) ) + +/*------------------------------------------------------------------------------------------------------------------*/ +/* STB_IsValidValue */ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 STB_IsValidValue(const STB_FRAME_RESULT *input, STBExecFlg *execFlg) +{ + STB_INT32 i ,j; + + + + if( execFlg->bodyTr == STB_TRUE ) + { + if( IS_OUT_RANGE( input->bodys.nCount , STB_BODY_CNT_MIN , STB_BODY_CNT_MAX ) ){ return STB_FALSE;} + for( i = 0 ; i < input->bodys.nCount ; i++) + { + if( IS_OUT_RANGE( input->bodys.body[i].center.nX , STB_BODY_XY_MIN , STB_BODY_XY_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->bodys.body[i].center.nY , STB_BODY_XY_MIN , STB_BODY_XY_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->bodys.body[i].nSize , STB_BODY_SIZE_MIN , STB_BODY_SIZE_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->bodys.body[i].nConfidence , STB_BODY_CONF_MIN , STB_BODY_CONF_MAX ) ){ return STB_FALSE;} + } + + } + + if( execFlg->faceTr == STB_TRUE ) + { + if( IS_OUT_RANGE( input->faces.nCount , STB_FACE_CNT_MIN , STB_FACE_CNT_MAX ) ){ return STB_FALSE;} + for( i = 0 ; i < input->faces.nCount ; i++) + { + if( IS_OUT_RANGE( input->faces.face[i].center.nX , STB_FACE_XY_MIN , STB_FACE_XY_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->faces.face[i].center.nY , STB_FACE_XY_MIN , STB_FACE_XY_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->faces.face[i].nSize , STB_FACE_SIZE_MIN , STB_FACE_SIZE_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->faces.face[i].nConfidence , STB_FACE_CONF_MIN , STB_FACE_CONF_MAX ) ){ return STB_FALSE;} + } + } + + if( execFlg->gen == STB_TRUE + || execFlg->age == STB_TRUE + || execFlg->fr == STB_TRUE + || execFlg->exp == STB_TRUE + || execFlg->dir == STB_TRUE + || execFlg->gaz == STB_TRUE + || execFlg->bli == STB_TRUE + ) + { + for( i = 0 ; i < input->faces.nCount ; i++) + { + if( IS_OUT_RANGE( input->faces.face[i].direction.nLR , STB_FACE_DIR_LR_MIN , STB_FACE_DIR_LR_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->faces.face[i].direction.nUD , STB_FACE_DIR_UD_MIN , STB_FACE_DIR_UD_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->faces.face[i].direction.nRoll , STB_FACE_DIR_ROLL_MIN , STB_FACE_DIR_ROLL_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->faces.face[i].direction.nConfidence , STB_FACE_DIR_CONF_MIN , STB_FACE_DIR_CONF_MAX ) ){ return STB_FALSE;} + } + } + + + if( execFlg->age == STB_TRUE ) + { + for( i = 0 ; i < input->faces.nCount ; i++) + { + if( IS_OUT_VALUE( input->faces.face[i].age.nAge , STB_FACE_AGE_VAL_MIN , STB_FACE_AGE_VAL_MAX ,STB_ERR_PE_CANNOT ) ){ return STB_FALSE;} + if( IS_OUT_VALUE( input->faces.face[i].age.nConfidence , STB_FACE_AGE_CONF_MIN , STB_FACE_AGE_CONF_MAX ,STB_ERR_PE_CANNOT ) ){ return STB_FALSE;} + } + } + + if( execFlg->gen == STB_TRUE ) + { + for( i = 0 ; i < input->faces.nCount ; i++) + { + if( IS_OUT_VALUE( input->faces.face[i].gender.nGender , STB_FACE_GEN_VAL_MIN , STB_FACE_GEN_VAL_MAX ,STB_ERR_PE_CANNOT ) ){ return STB_FALSE;} + if( IS_OUT_VALUE( input->faces.face[i].gender.nConfidence , STB_FACE_GEN_CONF_MIN , STB_FACE_GEN_CONF_MAX ,STB_ERR_PE_CANNOT ) ){ return STB_FALSE;} + } + } + + if( execFlg->gaz == STB_TRUE ) + { + for( i = 0 ; i < input->faces.nCount ; i++) + { + if( IS_OUT_VALUE( input->faces.face[i].gaze.nLR , STB_FACE_GAZE_LR_MIN , STB_FACE_GAZE_LR_MAX ,STB_ERR_PE_CANNOT ) ){ return STB_FALSE;} + if( IS_OUT_VALUE( input->faces.face[i].gaze.nUD , STB_FACE_GAZE_UD_MIN , STB_FACE_GAZE_UD_MAX ,STB_ERR_PE_CANNOT ) ){ return STB_FALSE;} + } + } + + if( execFlg->bli == STB_TRUE ) + { + for( i = 0 ; i < input->faces.nCount ; i++) + { + if( IS_OUT_VALUE( input->faces.face[i].blink.nLeftEye , STB_FACE_BLI_L_MIN , STB_FACE_BLI_L_MAX ,STB_ERR_PE_CANNOT) ){ return STB_FALSE;} + if( IS_OUT_VALUE( input->faces.face[i].blink.nRightEye , STB_FACE_BLI_R_MIN , STB_FACE_BLI_R_MAX ,STB_ERR_PE_CANNOT) ){ return STB_FALSE;} + } + } + + if( execFlg->exp == STB_TRUE ) + { + for( i = 0 ; i < input->faces.nCount ; i++) + { + if( IS_OUT_VALUE( input->faces.face[i].expression.nDegree , STB_FACE_EXP_DEG_MIN , STB_FACE_EXP_DEG_MAX ,STB_ERR_PE_CANNOT) ){ return STB_FALSE;} + for( j = 0 ; j < STB_EX_MAX ; j++) + { + if( IS_OUT_VALUE( input->faces.face[i].expression.anScore[j] ,STB_FACE_EXP_SCORE_MIN , STB_FACE_EXP_SCORE_MAX ,STB_ERR_PE_CANNOT) ){ return STB_FALSE;} + } + + } + } + + if( execFlg->fr == STB_TRUE ) + { + for( i = 0 ; i < input->faces.nCount ; i++) + { + if( IS_OUT_FR_UID( input->faces.face[i].recognition.nUID , STB_FACE_FR_UID_MIN , STB_FACE_FR_UID_MAX ,STB_ERR_FR_CANNOT ,STB_ERR_FR_NOID ,STB_ERR_FR_NOALBUM ) ){ return STB_FALSE;} + if( IS_OUT_FR_SCORE( input->faces.face[i].recognition.nScore , STB_FACE_FR_SCORE_MIN , STB_FACE_FR_SCORE_MAX ,STB_ERR_FR_CANNOT ,STB_ERR_FR_NOALBUM) ){ return STB_FALSE;} + } + } + + + return STB_TRUE; +} \ No newline at end of file diff --git a/src/b5t007001/stblib/src/STB/STBValidValue.h b/src/b5t007001/stblib/src/STB/STBValidValue.h new file mode 100644 index 00000000..0ccb7b8e --- /dev/null +++ b/src/b5t007001/stblib/src/STB/STBValidValue.h @@ -0,0 +1,94 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef STBVALIDVALUE_H__ +#define STBVALIDVALUE_H__ + +#include "STBTypedefInput.h" +#include "STBCommonDef.h" +#include "STBCommonType.h" + +/*-------------------------------------------------------------------*/ +/*Threshold for checking input value*/ +/*-------------------------------------------------------------------*/ +#define STB_BODY_CNT_MIN 0 // body +#define STB_BODY_CNT_MAX 35 +#define STB_BODY_XY_MIN 0 +#define STB_BODY_XY_MAX 8191 +#define STB_BODY_SIZE_MIN 20 +#define STB_BODY_SIZE_MAX 8192 +#define STB_BODY_CONF_MIN 0 +#define STB_BODY_CONF_MAX 1000 +#define STB_FACE_CNT_MIN 0 // face +#define STB_FACE_CNT_MAX 35 +#define STB_FACE_XY_MIN 0 +#define STB_FACE_XY_MAX 8191 +#define STB_FACE_SIZE_MIN 20 +#define STB_FACE_SIZE_MAX 8192 +#define STB_FACE_CONF_MIN 0 +#define STB_FACE_CONF_MAX 1000 +#define STB_FACE_DIR_LR_MIN -180 +#define STB_FACE_DIR_LR_MAX 179 +#define STB_FACE_DIR_UD_MIN -180 +#define STB_FACE_DIR_UD_MAX 179 +#define STB_FACE_DIR_ROLL_MIN -180 +#define STB_FACE_DIR_ROLL_MAX 179 +#define STB_FACE_DIR_CONF_MIN 0 +#define STB_FACE_DIR_CONF_MAX 1000 +#define STB_FACE_AGE_VAL_MIN 0 +#define STB_FACE_AGE_VAL_MAX 75 +#define STB_FACE_AGE_CONF_MIN 0 +#define STB_FACE_AGE_CONF_MAX 1000 +#define STB_FACE_GEN_VAL_MIN 0 +#define STB_FACE_GEN_VAL_MAX 1 +#define STB_FACE_GEN_CONF_MIN 0 +#define STB_FACE_GEN_CONF_MAX 1000 +#define STB_FACE_GAZE_LR_MIN -90 +#define STB_FACE_GAZE_LR_MAX 90 +#define STB_FACE_GAZE_UD_MIN -90 +#define STB_FACE_GAZE_UD_MAX 90 +#define STB_FACE_BLI_L_MIN 1 +#define STB_FACE_BLI_L_MAX 1000 +#define STB_FACE_BLI_R_MIN 1 +#define STB_FACE_BLI_R_MAX 1000 +#define STB_FACE_EXP_SCORE_MIN 0 +#define STB_FACE_EXP_SCORE_MAX 100 /* not 1000 */ +#define STB_FACE_EXP_DEG_MIN -100 +#define STB_FACE_EXP_DEG_MAX 100 +#define STB_FACE_FR_UID_MIN 0 +#define STB_FACE_FR_UID_MAX 499 +#define STB_FACE_FR_SCORE_MIN 0 +#define STB_FACE_FR_SCORE_MAX 1000 + +/*-------------------------------------------------------------------*/ +/*Permitted input value*/ +/*-------------------------------------------------------------------*/ +#define STB_ERR_PE_CANNOT -128 /*Estimation is not possible.*/ +#define STB_ERR_FR_CANNOT -128 /*Recognition impossible*/ +#define STB_ERR_FR_NOID -1 /*No corresponding ID*/ +#define STB_ERR_FR_NOALBUM -127 /*Not-registered in Album*/ +/*-------------------------------------------------------------------*/ +/*For collaboration with child library*/ +/*-------------------------------------------------------------------*/ +#define STB_ERR_DIR_CANNOT -256 /*Unable to angle estimation*/ + +/*-------------------------------------------------------------------*/ +/* Func */ +/*-------------------------------------------------------------------*/ +STB_INT32 STB_IsValidValue(const STB_FRAME_RESULT *input, STBExecFlg *execFlg); + +#endif /* COMMONDEF_H__ */ + diff --git a/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.c b/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.c new file mode 100644 index 00000000..9e47c9ee --- /dev/null +++ b/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.c @@ -0,0 +1,509 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "FrInterface.h" +#include "STBFrAPI.h" + +/*Value range check*/ +#define ISVALID_RANGE( val , min , max ) ( ( (min) <= (val) ) && ( (val) <= (max) ) ) + +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*error check*/ +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +static STB_INT32 FrIsValidValue( + const STB_INT32 nValue , + const STB_INT32 nLimitMin , + const STB_INT32 nLimitMax ) +{ + STB_INT32 nRet; + for( nRet = STB_ERR_INVALIDPARAM; nRet != STB_NORMAL; nRet = STB_NORMAL ){ + if( ! ISVALID_RANGE( nValue , nLimitMin , nLimitMax ) ){ break; } + } + return nRet; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +static STB_INT32 FrIsValidPointer( const VOID* pPointer ) +{ + STB_INT32 nRet; + for( nRet = STB_ERR_INVALIDPARAM; nRet != STB_NORMAL; nRet = STB_NORMAL ){ + if( NULL == pPointer ){ break; } + } + return nRet; +} + +/*------------------------------------------------------------------------------------------------------------------*/ +/* CalcFrSize */ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_UINT32 CalcFrSize ( STB_UINT32 nTraCntMax ) +{ + STB_UINT32 retVal ; + + retVal = 0 ; + + retVal += 100 ;///Margin : alignment + + + + retVal += sizeof( FR_DET ) * nTraCntMax ; // frDet.fcDet + retVal += sizeof( STB_FR_DET ) * STB_FR_BACK_MAX ; // frDetRec + retVal += sizeof( FR_DET ) * nTraCntMax * nTraCntMax ; // frDetRec[t].fcDet + retVal += sizeof( FR_RES ) * nTraCntMax ; // frRes.frFace + + return retVal; +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* ShareFrSize */ +/*------------------------------------------------------------------------------------------------------------------*/ +void ShareFrSize ( FRHANDLE handle ) +{ + + STB_UINT32 t; + STB_INT8 *stbPtr = handle->frPtr ; + STB_UINT32 nTraCntMax = handle->frCntMax ; + + handle->frDet.fcDet = ( FR_DET* ) stbPtr; stbPtr += ( sizeof( FR_DET ) * nTraCntMax ); + handle->frDetRec = ( STB_FR_DET* ) stbPtr; stbPtr += ( sizeof( STB_FR_DET ) * STB_FR_BACK_MAX); + for( t = 0 ; t < STB_FR_BACK_MAX ; t++ ) + { + handle->frDetRec[t].fcDet = ( FR_DET* ) stbPtr; stbPtr += ( sizeof( FR_DET ) * nTraCntMax ); + } + handle->frRes.frFace = ( FR_RES * ) stbPtr; stbPtr += ( sizeof( FR_RES ) * nTraCntMax ); + +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Create handle*/ +FRHANDLE FrCreateHandle( const STB_INT32 nTraCntMax ) + +{ + + FRHANDLE handle; + STB_INT32 t , i ; + STB_INT32 tmpVal; + + + + if( nTraCntMax < 1 || STB_FR_TRA_CNT_MAX < nTraCntMax ) + { + return NULL; + } + + /*do handle's Malloc here*/ + handle = (FRHANDLE)malloc(sizeof(*handle)); + if(handle == NULL) + { + return NULL; + } + + + /*initial value---------------------------------------------------------------------*/ + handle->frFaceDirUDMax = STB_FR_DIR_MAX_UD_INI ; + handle->frFaceDirUDMin = STB_FR_DIR_MIN_UD_INI ; + handle->frFaceDirLRMax = STB_FR_DIR_MAX_LR_INI ; + handle->frFaceDirLRMin = STB_FR_DIR_MIN_LR_INI ; + handle->frCntMax = nTraCntMax ;//Maximum number of tracking people + handle->frFaceDirThr = STB_FR_DIR_THR_INI ;//If the confidence of Face direction estimation doesn't exceed the reference value, the recognition result isn't trusted. + handle->frFrameCount = STB_FR_FRAME_CNT_INI ; + handle->frFrameRatio = STB_FR_FRAME_RATIO_INI ; + handle->frPtr = NULL; + handle->frDet.num = 0; + handle->frDet.fcDet = NULL; + handle->frDetRec = NULL; + handle->frRes.frCnt = 0; + handle->frRes.frFace = NULL; + + tmpVal = CalcFrSize ( nTraCntMax ); /*calculate necessary amount in the Fr handle*/ + handle->frPtr = NULL; + handle->frPtr = ( STB_INT8 * )malloc( tmpVal ); /*keeping necessary amount in the Fr handle*/ + if( handle->frPtr == NULL ) + { + free ( handle->frPtr ); + free ( handle ); + return NULL; + } + + /* Malloc-area is allocated to things that need Malloc in FR handle */ + ShareFrSize ( handle ); + + + + + for( t = 0 ; t < STB_FR_BACK_MAX ; t++ ) + { + handle->frDetRec [ t ].num = 0; + for( i = 0 ; i < handle->frCntMax ; i++ ) + { + handle->frDetRec [ t ].fcDet[i].nDetID = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].nTraID = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].dirDetPitch = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].dirDetRoll = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].dirDetYaw = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].frDetConf = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].frDetID = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].frDetConf = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].frStatus = STB_STATUS_NO_DATA ; + + } + } + + return handle; +} + +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Delete handle*/ +STB_INT32 FrDeleteHandle(FRHANDLE handle){ + STB_INT32 nRet; + + /*NULL check*/ + nRet = FrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return nRet; + } + + free ( handle->frPtr ); + free ( handle ); + + return nRet; +} + + +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Set the result*/ +STB_INT32 FrSetDetect(FRHANDLE handle,const STB_FR_DET *stbFrDet){ + + STB_INT32 nRet; + STB_INT32 i; + + /*NULL check*/ + nRet = FrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + nRet = FrIsValidPointer(stbFrDet); + if(nRet != STB_NORMAL){ + return nRet; + } + + /*Input value check*/ + nRet = STB_FrIsValidValue ( stbFrDet ); + if(nRet != STB_TRUE) + { + return STB_ERR_INVALIDPARAM; + } + + + /*Set the received result to the handle*/ + /* Face */ + if( stbFrDet->num > handle->frCntMax ) + { + return STB_ERR_PROCESSCONDITION; + } + handle->frDet.num = stbFrDet->num; + for( i = 0 ; i < handle->frDet.num ; i++ ) + { + + handle->frDet.fcDet[i].nDetID = stbFrDet->fcDet[i].nDetID ; + handle->frDet.fcDet[i].nTraID = stbFrDet->fcDet[i].nTraID ; + handle->frDet.fcDet[i].dirDetPitch = stbFrDet->fcDet[i].dirDetPitch; + handle->frDet.fcDet[i].dirDetRoll = stbFrDet->fcDet[i].dirDetRoll ; + handle->frDet.fcDet[i].dirDetYaw = stbFrDet->fcDet[i].dirDetYaw ; + handle->frDet.fcDet[i].dirDetConf = stbFrDet->fcDet[i].dirDetConf ; + handle->frDet.fcDet[i].frDetID = stbFrDet->fcDet[i].frDetID ; + handle->frDet.fcDet[i].frDetConf = stbFrDet->fcDet[i].frDetConf ; + + } + + + + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Main process execution*/ +STB_INT32 FrExecute(FRHANDLE handle){ + STB_INT32 nRet; + /*NULL check*/ + nRet = FrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + /*Main processing here*/ + nRet = StbFrExec ( handle ); + + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Get-Function of results*/ +STB_INT32 FrGetResult(FRHANDLE handle,STB_FR_RES* frResult){ + STB_INT32 nRet; + int i; + + /*NULL check*/ + nRet = FrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + nRet = FrIsValidPointer(frResult); + if(nRet != STB_NORMAL){ + return nRet; + } + + /*Get result from handle*/ + frResult->frCnt = handle->frRes.frCnt ; + for( i = 0 ; i < frResult->frCnt ; i++ ){ + frResult->frFace[i].nTraID = handle->frRes.frFace[i].nTraID ; + frResult->frFace[i].frRecog.value = handle->frRes.frFace[i].frRecog.value ; + frResult->frFace[i].frRecog.status = handle->frRes.frFace[i].frRecog.status ; + frResult->frFace[i].frRecog.conf = handle->frRes.frFace[i].frRecog.conf ; + } + + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 FrSetFaceDirMinMax(FRHANDLE handle , STB_INT32 nMinUDAngle , STB_INT32 nMaxUDAngle ,STB_INT32 nMinLRAngle , STB_INT32 nMaxLRAngle) +{ + + STB_INT32 nRet; + /*NULL check*/ + nRet = FrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + if( nMinUDAngle < STB_FR_DIR_MIN_UD_MIN || STB_FR_DIR_MIN_UD_MAX < nMinUDAngle) + { + return STB_ERR_INVALIDPARAM; + } + if( nMaxUDAngle < STB_FR_DIR_MAX_UD_MIN || STB_FR_DIR_MAX_UD_MAX < nMaxUDAngle) + { + return STB_ERR_INVALIDPARAM; + } + if( nMaxUDAngle < nMinUDAngle) + { + return STB_ERR_INVALIDPARAM; + } + + + if( nMinLRAngle < STB_FR_DIR_MIN_LR_MIN || STB_FR_DIR_MIN_LR_MAX < nMinLRAngle) + { + return STB_ERR_INVALIDPARAM; + } + if( nMaxLRAngle < STB_FR_DIR_MAX_LR_MIN || STB_FR_DIR_MAX_LR_MAX < nMaxLRAngle) + { + return STB_ERR_INVALIDPARAM; + } + if( nMaxLRAngle < nMinLRAngle) + { + return STB_ERR_INVALIDPARAM; + } + + + handle->frFaceDirUDMin = nMinUDAngle; + handle->frFaceDirUDMax = nMaxUDAngle; + handle->frFaceDirLRMin = nMinLRAngle; + handle->frFaceDirLRMax = nMaxLRAngle; + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 FrGetFaceDirMinMax(FRHANDLE handle , STB_INT32 *pnMinUDAngle , STB_INT32 *pnMaxUDAngle ,STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle ) +{ + STB_INT32 nRet; + /*NULL check*/ + nRet = FrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + nRet = FrIsValidPointer(pnMinUDAngle); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + nRet = FrIsValidPointer(pnMaxUDAngle); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + nRet = FrIsValidPointer(pnMinLRAngle); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + nRet = FrIsValidPointer(pnMaxLRAngle); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + + + *pnMinUDAngle = handle->frFaceDirUDMin ; + *pnMaxUDAngle = handle->frFaceDirUDMax ; + *pnMinLRAngle = handle->frFaceDirLRMin ; + *pnMaxLRAngle = handle->frFaceDirLRMax ; + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 FrClear ( FRHANDLE handle ) +{ + //clear processing + + STB_INT32 t , i ; + STB_INT32 nRet; + + /*NULL check*/ + nRet = FrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + for( t = 0 ; t < STB_FR_BACK_MAX ; t++ ) + { + handle->frDetRec [ t ].num = 0; + for( i = 0 ; i < handle->frCntMax ; i++ ) + { + handle->frDetRec [ t ].fcDet[i].nDetID = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].nTraID = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].dirDetPitch = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].dirDetRoll = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].dirDetYaw = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].dirDetConf = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].frDetID = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].frDetConf = STB_STATUS_NO_DATA ; + handle->frDetRec [ t ].fcDet[i].frStatus = STB_STATUS_NO_DATA ; + + } + } + return STB_NORMAL; + + +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 FrSetFaceDirThreshold(FRHANDLE handle , STB_INT32 threshold ) +{ + STB_INT32 nRet; + /*NULL check*/ + nRet = FrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + if( threshold < STB_FR_DIR_THR_MIN || STB_FR_DIR_THR_MAX < threshold) + { + return STB_ERR_INVALIDPARAM; + } + handle->frFaceDirThr = threshold; + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 FrGetFaceDirThreshold(FRHANDLE handle , STB_INT32* threshold ) +{ + STB_INT32 nRet; + + /*NULL check*/ + nRet = FrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + nRet = FrIsValidPointer(threshold); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + + *threshold = handle->frFaceDirThr ; + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 FrSetFrameCount(FRHANDLE handle , STB_INT32 nFrameCount ) +{ + + STB_INT32 nRet; + /*NULL check*/ + nRet = FrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( nFrameCount < STB_FR_FRAME_CNT_MIN || STB_FR_FRAME_CNT_MAX < nFrameCount) + { + return STB_ERR_INVALIDPARAM; + } + handle->frFrameCount = nFrameCount; + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 FrGetFrameCount(FRHANDLE handle , STB_INT32* nFrameCount ) +{ + STB_INT32 nRet; + /*NULL check*/ + nRet = FrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + nRet = FrIsValidPointer(nFrameCount); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + + *nFrameCount = handle->frFrameCount ; + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 FrSetMinRatio(FRHANDLE handle , STB_INT32 nMinRatio ) +{ + STB_INT32 nRet; + /*NULL check*/ + nRet = FrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( nMinRatio < STB_FR_FRAME_RATIO_MIN || STB_FR_FRAME_RATIO_MAX < nMinRatio) + { + return STB_ERR_INVALIDPARAM; + } + handle->frFrameRatio = nMinRatio; + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 FrGetMinRatio(FRHANDLE handle , STB_INT32* nMinRatio ) +{ + STB_INT32 nRet; + /*NULL check*/ + nRet = FrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + nRet = FrIsValidPointer(nMinRatio); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + + *nMinRatio = handle->frFrameRatio ; + return STB_NORMAL; +} diff --git a/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.h b/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.h new file mode 100644 index 00000000..7e001b50 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_FaceRecognition/FrInterface.h @@ -0,0 +1,121 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#if !defined( _INTERFACE_H_ ) +#define _INTERFACE_H_ + +#include "STBFrTypedef.h" +#include "STBCommonDef.h" +#include "STBCommonType.h" +#include "STBFrValidValue.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// +/////////// Define ////////////// +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// + + +#define STB_FR_BACK_MAX 20 /* refer to past "STB_BACK_MAX" frames of results */ + +#define STB_FR_TRA_CNT_MAX 35 + +#define STB_FR_INVALID_UID -999 + +#define STB_FR_DIR_MIN_UD_INI -15 +#define STB_FR_DIR_MIN_UD_MIN -90 +#define STB_FR_DIR_MIN_UD_MAX 90 + +#define STB_FR_DIR_MAX_UD_INI 20 +#define STB_FR_DIR_MAX_UD_MIN -90 +#define STB_FR_DIR_MAX_UD_MAX 90 + +#define STB_FR_DIR_MIN_LR_INI -30 +#define STB_FR_DIR_MIN_LR_MIN -90 +#define STB_FR_DIR_MIN_LR_MAX 90 + +#define STB_FR_DIR_MAX_LR_INI 30 +#define STB_FR_DIR_MAX_LR_MIN -90 +#define STB_FR_DIR_MAX_LR_MAX 90 + +#define STB_FR_DIR_THR_INI 300 +#define STB_FR_DIR_THR_MIN 0 +#define STB_FR_DIR_THR_MAX 1000 + +#define STB_FR_FRAME_CNT_INI 5 +#define STB_FR_FRAME_CNT_MIN 0 +#define STB_FR_FRAME_CNT_MAX 20 + +#define STB_FR_FRAME_RATIO_INI 60 +#define STB_FR_FRAME_RATIO_MIN 0 +#define STB_FR_FRAME_RATIO_MAX 100 + +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// +/////////// Struct ////////////// +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// +typedef struct tagFRHANDLE { + + STB_INT8 *frPtr ; + + /* param */ + STB_INT32 frCntMax ;//Maximum number of tracking people + STB_INT32 frFaceDirUDMax ;//The face on top/down allowable range max. + STB_INT32 frFaceDirUDMin ;//The face on top/down allowable range min. + STB_INT32 frFaceDirLRMax ;//The face on left /right side allowable range max. + STB_INT32 frFaceDirLRMin ;//The face on left /right side allowable range min. + STB_INT32 frFaceDirThr ;//If the confidence of Face direction estimation doesn't exceed the reference value, the recognition result isn't trusted. + STB_INT32 frFrameCount ; + STB_INT32 frFrameRatio ; + /* FR_Face */ + STB_FR_DET frDet ;//Present data before the stabilization(input). + STB_FR_DET *frDetRec ;//past data before the stabilization + STB_FR_RES frRes ;//present data after the stabilization(output) + +} *FRHANDLE; + + +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// +/////////// Func ////////////// +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// +FRHANDLE FrCreateHandle ( const STB_INT32 nTraCntMax ); +STB_INT32 FrDeleteHandle ( FRHANDLE handle); +STB_INT32 FrSetDetect ( FRHANDLE handle,const STB_FR_DET *stbPeDet); +STB_INT32 FrExecute ( FRHANDLE handle); +STB_INT32 FrClear ( FRHANDLE handle ); +STB_INT32 FrGetResult ( FRHANDLE handle , STB_FR_RES* peResult); + +STB_INT32 FrSetFaceDirMinMax( FRHANDLE handle , STB_INT32 nMinUDAngle , STB_INT32 nMaxUDAngle ,STB_INT32 nMinLRAngle , STB_INT32 nMaxLRAngle); +STB_INT32 FrGetFaceDirMinMax( FRHANDLE handle , STB_INT32 *pnMinUDAngle , STB_INT32 *pnMaxUDAngle ,STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle ); +STB_INT32 FrSetFaceDirThreshold ( FRHANDLE handle , STB_INT32 threshold ); +STB_INT32 FrGetFaceDirThreshold ( FRHANDLE handle , STB_INT32* threshold ); +STB_INT32 FrSetFrameCount ( FRHANDLE handle , STB_INT32 nFrameCount ); +STB_INT32 FrGetFrameCount ( FRHANDLE handle , STB_INT32* nFrameCount ); +STB_INT32 FrSetMinRatio ( FRHANDLE handle , STB_INT32 nMinRatio ); +STB_INT32 FrGetMinRatio ( FRHANDLE handle , STB_INT32* nMinRatio ); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.c b/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.c new file mode 100644 index 00000000..2a26fa54 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.c @@ -0,0 +1,326 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "STBFrAPI.h" + +/*---------------------------------------------------------------------*/ +// FrSlideFacesRec +/*---------------------------------------------------------------------*/ +void FrSlideFacesRec ( STB_FR_DET *facesRec ) +{ + STB_INT32 t , i ; + + for( t = STB_FR_BACK_MAX - 2 ; t >= 0 ; t-- ) + { + facesRec [ t + 1 ].num = facesRec[ t + 0 ].num; + for( i = 0 ; i < facesRec [ t + 1 ].num ; i++ ) + { + facesRec [ t + 1 ].fcDet[i].nDetID = facesRec [ t ].fcDet[i].nDetID ; + facesRec [ t + 1 ].fcDet[i].nTraID = facesRec [ t ].fcDet[i].nTraID ; + + facesRec [ t + 1 ].fcDet[i].dirDetPitch = facesRec [ t ].fcDet[i].dirDetPitch ; + facesRec [ t + 1 ].fcDet[i].dirDetRoll = facesRec [ t ].fcDet[i].dirDetRoll ; + facesRec [ t + 1 ].fcDet[i].dirDetYaw = facesRec [ t ].fcDet[i].dirDetYaw ; + facesRec [ t + 1 ].fcDet[i].dirDetConf = facesRec [ t ].fcDet[i].dirDetConf ; + facesRec [ t + 1 ].fcDet[i].frDetID = facesRec [ t ].fcDet[i].frDetID ; + facesRec [ t + 1 ].fcDet[i].frDetConf = facesRec [ t ].fcDet[i].frDetConf ; + facesRec [ t + 1 ].fcDet[i].frStatus = facesRec [ t ].fcDet[i].frStatus ; + + } + } +} +/*---------------------------------------------------------------------*/ +// FrCurFaces +/*---------------------------------------------------------------------*/ +void FrCurFaces ( STB_FR_DET *facesRec , STB_FR_DET *srcFace ) +{ + STB_INT32 i ; + + + facesRec [ 0 ].num = srcFace->num; + for( i = 0 ; i < facesRec [ 0 ].num ; i++ ) + { + facesRec [ 0 ].fcDet[i].nDetID = srcFace->fcDet[i].nDetID ; + facesRec [ 0 ].fcDet[i].nTraID = srcFace->fcDet[i].nTraID ; + facesRec [ 0 ].fcDet[i].dirDetPitch = srcFace->fcDet[i].dirDetPitch ; + facesRec [ 0 ].fcDet[i].dirDetRoll = srcFace->fcDet[i].dirDetRoll ; + facesRec [ 0 ].fcDet[i].dirDetYaw = srcFace->fcDet[i].dirDetYaw ; + facesRec [ 0 ].fcDet[i].dirDetConf = srcFace->fcDet[i].dirDetConf ; + facesRec [ 0 ].fcDet[i].frDetID = srcFace->fcDet[i].frDetID ; + facesRec [ 0 ].fcDet[i].frDetConf = srcFace->fcDet[i].frDetConf ; + facesRec [ 0 ].fcDet[i].frStatus = STB_STATUS_NO_DATA ; + + } + +} + + +/*---------------------------------------------------------------------*/ +// FrStbFaceEasy +/*---------------------------------------------------------------------*/ +void +FrStbFaceEasy + ( + STB_FR_RES* peRes , + STB_FR_DET* peRec , + STB_INT32 dirThr , + STB_INT32 dirUDMax , + STB_INT32 dirUDMin , + STB_INT32 dirLRMax , + STB_INT32 dirLRMin , + STB_INT32 frmCnt , + STB_INT32 frmRatio + + + ) +{ + STB_INT32 i, t, k; + STB_INT32 trID; + STB_INT32 recCnt; + STB_INT32 recUID [STB_FR_BACK_MAX]; + STB_INT32 recConf [STB_FR_BACK_MAX]; + + STB_INT32 accUID [STB_FR_BACK_MAX]; + STB_INT32 accCnt [STB_FR_BACK_MAX]; + STB_INT32 accKind; + STB_INT32 tmpUID; + STB_INT32 tmpCnt; + STB_INT32 tmpConf; + STB_INT32 topUID; + STB_INT32 topCnt; + STB_STATUS preStatus ; + STB_INT32 preUID ; + STB_INT32 preConf ; + + + for( t = 0; t < STB_FR_BACK_MAX ; t++) + { + recUID [t] = STB_FR_INVALID_UID; + recConf [t] = 0; + accUID [t] = STB_FR_INVALID_UID; + accCnt [t] = 0; + } + + + /*Checking the past data here, fill in all peRes.*/ + /*do stabilization processing each tracking person*/ + + peRes->frCnt = peRec[0].num; + for( k = 0; k < peRes->frCnt; k++) + { + /*Tracking person number in the through frame*/ + trID = peRec[0].fcDet[k].nTraID; + + // peRes Add ------------------------------------------------------------------------------------------------- + peRes->frFace[k].nTraID = trID; + + + //in case of unregistered album for present UID(no album files) + if( peRec[0].fcDet[k].frDetID == STB_ERR_FR_NOALBUM ) + { + peRes->frFace[k].frRecog.value = STB_ERR_FR_NOALBUM ; + peRes->frFace[k].frRecog.status = STB_STATUS_NO_DATA ; + peRes->frFace[k].frRecog.conf = STB_CONF_NO_DATA ; + peRec[0].fcDet[k].frDetID = STB_ERR_FR_NOALBUM ; + peRec[0].fcDet[k].frStatus = STB_STATUS_NO_DATA ; + peRec[0].fcDet[k].frDetConf = STB_CONF_NO_DATA ; + continue; + } + + // preStatus ------------------------------------------------------------------------------------------------- + preStatus = STB_STATUS_NO_DATA ; + preUID = STB_FR_INVALID_UID ; + preConf = 0 ; + for( i = 0; i < peRec[1].num ; i++) + { + if( peRec[1].fcDet[i].nTraID == trID ) + { + preUID = peRec[1].fcDet[i].frDetID ; + preStatus = peRec[1].fcDet[i].frStatus ; + preConf = peRec[1].fcDet[i].frDetConf ; + break; + } + } + + + // ------------------------------------------------------------------------------------------------- + // ------------------------------------------------------------------------------------------------- + if ( preStatus == STB_STATUS_NO_DATA //stabilization impossible: no data of the relevant people + || preStatus == STB_STATUS_CALCULATING //during stabilization : a number of data for relevant people aren't enough(a number of frames that relevant people are taken) + ) + { + // ------------------------------------------------------------------------------------------------- + //Setting "recUID" to past data of Tracking ID(trID) : (Up to "frmCnt") + // ------------------------------------------------------------------------------------------------- + recCnt = 0; + for( t = 0; t < STB_FR_BACK_MAX ; t++) //previous t frame + { + for( i = 0; i < peRec[t].num ; i++) //a number of tracking people(previous t frame) + { + if( + peRec [ t ].fcDet[i].nTraID == trID //the same tracking number + && peRec [ t ].fcDet[i].nDetID >= 0 //not lost + && peRec [ t ].fcDet[i].dirDetConf >= dirThr // Face angle : confidence + && peRec [ t ].fcDet[i].dirDetPitch >= dirUDMin // Face angle : pitch + && peRec [ t ].fcDet[i].dirDetPitch <= dirUDMax // Face angle : pitch + && peRec [ t ].fcDet[i].dirDetYaw >= dirLRMin // Face angle : yaw + && peRec [ t ].fcDet[i].dirDetYaw <= dirLRMax // Face angle : yaw + && peRec [ t ].fcDet[i].frDetID != STB_ERR_FR_CANNOT //Recognition impossible + && peRec [ t ].fcDet[i].frDetID != STB_ERR_FR_NOALBUM // Not-registered in Album + ) + { + recUID [ recCnt ] = peRec [ t ].fcDet[ i ].frDetID ; + recConf[ recCnt ] = peRec [ t ].fcDet[ i ].frDetConf; + recCnt++; + break; + } + } + if( recCnt == frmCnt ) + { + break ;//Maximum number is frmCnt + } + } + // ------------------------------------------------------------------------------------------------- + // tmpConf + // ------------------------------------------------------------------------------------------------- + tmpConf = 0; + for( i = 0 ; i < recCnt ; i++) + { + tmpConf += recConf[ i ]; + } + if( recCnt > 0 ) + { + tmpConf /= recCnt; + }else + { + tmpConf = 0 ; + } + // ------------------------------------------------------------------------------------------------- + //Create a cumulative frequency distribution of recUID and set it to accUID [accKind] accCnt [accKind]. + //AccCnt [i] pieces of data (in the past) determined to be "accUID [i]". + // ------------------------------------------------------------------------------------------------- + accKind = 0; + for(;;) + { + tmpUID = STB_FR_INVALID_UID; + for( i = 0 ; i < recCnt ; i++) + { + if( recUID[ i ] != STB_FR_INVALID_UID ) + { + tmpUID = recUID[ i ]; + break; + } + } + if( tmpUID == STB_FR_INVALID_UID ) + { + break; + } + tmpCnt = 0; + for( i = 0 ; i < recCnt ; i++) + { + if( recUID[ i ] == tmpUID ) + { + recUID[ i ] = STB_FR_INVALID_UID ; + tmpCnt++; + } + } + accUID[accKind] = tmpUID; + accCnt[accKind] = tmpCnt; + accKind++; + } + // ------------------------------------------------------------------------------------------------- + //Find the ID whose frequency is the maximum from the cumulative frequency distribution and set it to topUID. + // ------------------------------------------------------------------------------------------------- + topUID = STB_FR_INVALID_UID ; + topCnt = 0 ; + for( i = 0 ; i < accKind ; i++) + { + if( topCnt < accCnt[i] ) + { + topCnt = accCnt[i] ; + topUID = accUID[i] ; + } + } + if( topUID == STB_FR_INVALID_UID ) + { + peRes->frFace[k].frRecog.value = STB_STATUS_NO_DATA ; + peRes->frFace[k].frRecog.conf = STB_CONF_NO_DATA ; + peRes->frFace[k].frRecog.status = STB_STATUS_NO_DATA;//during stabilization : a number of data for relevant people aren't enough(a number of frames that relevant people are taken) + peRec[0].fcDet[k].frStatus = STB_STATUS_NO_DATA; + }else + { + if( topCnt < frmCnt * frmRatio / 100 ) + { + peRes->frFace[k].frRecog.value = topUID ; + peRes->frFace[k].frRecog.conf = STB_CONF_NO_DATA ; + peRes->frFace[k].frRecog.status = STB_STATUS_CALCULATING;//during stabilization : a number of data for relevant people aren't enough(a number of frames that relevant people are taken) + peRec[0].fcDet[k].frStatus = STB_STATUS_CALCULATING; + }else + { + peRes->frFace[k].frRecog.value = topUID ; + peRes->frFace[k].frRecog.conf = tmpConf ; + peRes->frFace[k].frRecog.status = STB_STATUS_COMPLETE ;//Just after stabilization : The state immediately after the number of data of the relevant person is sufficient and fixed. When creating an entry log, it is better to log data immediately after stabilization. + peRec[0].fcDet[k].frDetID = topUID ; + peRec[0].fcDet[k].frStatus = STB_STATUS_COMPLETE ; + peRec[0].fcDet[k].frDetConf = tmpConf ; + } + } + }else if ( preStatus == STB_STATUS_COMPLETE //Just after stabilization + || preStatus == STB_STATUS_FIXED //already stabilized + ) + { + peRes->frFace[k].frRecog.value = preUID ; + peRes->frFace[k].frRecog.status = STB_STATUS_FIXED ; + peRes->frFace[k].frRecog.conf = preConf; + peRec[0].fcDet[k].frDetID = preUID ; + peRec[0].fcDet[k].frStatus = STB_STATUS_FIXED ; + peRec[0].fcDet[k].frDetConf = preConf; + + } + + + } +} +/*---------------------------------------------------------------------*/ +// StbFrExec +/*---------------------------------------------------------------------*/ +int StbFrExec ( FRHANDLE handle ) +{ + + int retVal = 0 ; + + /* Face --------------------------------------*/ + FrSlideFacesRec ( handle->frDetRec );//Shift the time series of past data before stabilization. + FrCurFaces ( handle->frDetRec , + &(handle->frDet) );//Setting "present data before the stabilization" to past data before the stabilization. + + FrStbFaceEasy ( &(handle->frRes) , + handle->frDetRec , + handle->frFaceDirThr , + handle->frFaceDirUDMax , + handle->frFaceDirUDMin , + handle->frFaceDirLRMax , + handle->frFaceDirLRMin , + handle->frFrameCount , + handle->frFrameRatio );//Calculate "current data after stabilization" from "past data before stabilization". + + + + return retVal; +} + + + diff --git a/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.h b/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.h new file mode 100644 index 00000000..bd818dc3 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrAPI.h @@ -0,0 +1,22 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "FrInterface.h" + +int StbFrExec ( FRHANDLE handle ); + + + diff --git a/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.c b/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.c new file mode 100644 index 00000000..7a68a48d --- /dev/null +++ b/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.c @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "STBFrValidValue.h" + +/*Value range check*/ +#define IS_OUT_RANGE( val , min , max ) ( ( (val) < (min) ) || ( (max) < (val) ) ) +#define IS_OUT_VALUE( val , min , max , accept ) ( IS_OUT_RANGE( val , min , max ) && ( (val) != (accept) ) ) +#define IS_OUT_FR_UID( val , min , max , acceptA , acceptB , acceptC ) ( IS_OUT_RANGE( val , min , max ) && ( (val) != (acceptA) ) && ( (val) != (acceptB) ) && ( (val) != (acceptC) ) ) +#define IS_OUT_FR_SCORE( val , min , max , acceptA , acceptB ) ( IS_OUT_RANGE( val , min , max ) && ( (val) != (acceptA) ) && ( (val) != (acceptB) ) ) + +/*------------------------------------------------------------------------------------------------------------------*/ +/* STB_IsValidValue */ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 STB_FrIsValidValue(const STB_FR_DET *input) +{ + STB_INT32 i ; + + for( i = 0 ; i < input->num ; i++) + { + + if( IS_OUT_VALUE( input->fcDet[i].dirDetYaw , STB_FACE_DIR_LR_MIN , STB_FACE_DIR_LR_MAX , STB_ERR_DIR_CANNOT ) ){ return STB_FALSE;} + if( IS_OUT_VALUE( input->fcDet[i].dirDetPitch , STB_FACE_DIR_UD_MIN , STB_FACE_DIR_UD_MAX , STB_ERR_DIR_CANNOT ) ){ return STB_FALSE;} + if( IS_OUT_VALUE( input->fcDet[i].dirDetRoll , STB_FACE_DIR_ROLL_MIN , STB_FACE_DIR_ROLL_MAX , STB_ERR_DIR_CANNOT ) ){ return STB_FALSE;} + if( IS_OUT_VALUE( input->fcDet[i].dirDetConf , STB_FACE_DIR_CONF_MIN , STB_FACE_DIR_CONF_MAX , STB_ERR_PE_CANNOT ) ){ return STB_FALSE;} + + } + + for( i = 0 ; i < input->num ; i++) + { + if( IS_OUT_FR_UID( input->fcDet[i].frDetID , STB_FACE_FR_UID_MIN , STB_FACE_FR_UID_MAX ,STB_ERR_FR_CANNOT ,STB_ERR_FR_NOID ,STB_ERR_FR_NOALBUM ) ){ return STB_FALSE;} + if( IS_OUT_FR_SCORE( input->fcDet[i].frDetConf , STB_FACE_FR_SCORE_MIN , STB_FACE_FR_SCORE_MAX ,STB_ERR_FR_CANNOT ,STB_ERR_FR_NOALBUM) ){ return STB_FALSE;} + } + + + + return STB_TRUE; +} \ No newline at end of file diff --git a/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.h b/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.h new file mode 100644 index 00000000..c4abc657 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_FaceRecognition/STBFrValidValue.h @@ -0,0 +1,97 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef STBFRVALIDVALUE_H__ +#define STBFRVALIDVALUE_H__ + + +#include "STBCommonDef.h" +#include "STBCommonType.h" +#include "STBFrTypedef.h" + + +/*-------------------------------------------------------------------*/ +/*Threshold for checking input value*/ +/*-------------------------------------------------------------------*/ +#define STB_BODY_CNT_MIN 0 // body +#define STB_BODY_CNT_MAX 35 +#define STB_BODY_XY_MIN 0 +#define STB_BODY_XY_MAX 8191 +#define STB_BODY_SIZE_MIN 20 +#define STB_BODY_SIZE_MAX 8192 +#define STB_BODY_CONF_MIN 0 +#define STB_BODY_CONF_MAX 1000 +#define STB_FACE_CNT_MIN 0 // face +#define STB_FACE_CNT_MAX 35 +#define STB_FACE_XY_MIN 0 +#define STB_FACE_XY_MAX 8191 +#define STB_FACE_SIZE_MIN 20 +#define STB_FACE_SIZE_MAX 8192 +#define STB_FACE_CONF_MIN 0 +#define STB_FACE_CONF_MAX 1000 +#define STB_FACE_DIR_LR_MIN -180 +#define STB_FACE_DIR_LR_MAX 179 +#define STB_FACE_DIR_UD_MIN -180 +#define STB_FACE_DIR_UD_MAX 179 +#define STB_FACE_DIR_ROLL_MIN -180 +#define STB_FACE_DIR_ROLL_MAX 179 +#define STB_FACE_DIR_CONF_MIN 0 +#define STB_FACE_DIR_CONF_MAX 1000 +#define STB_FACE_AGE_VAL_MIN 0 +#define STB_FACE_AGE_VAL_MAX 75 +#define STB_FACE_AGE_CONF_MIN 0 +#define STB_FACE_AGE_CONF_MAX 1000 +#define STB_FACE_GEN_VAL_MIN 0 +#define STB_FACE_GEN_VAL_MAX 1 +#define STB_FACE_GEN_CONF_MIN 0 +#define STB_FACE_GEN_CONF_MAX 1000 +#define STB_FACE_GAZE_LR_MIN -90 +#define STB_FACE_GAZE_LR_MAX 90 +#define STB_FACE_GAZE_UD_MIN -90 +#define STB_FACE_GAZE_UD_MAX 90 +#define STB_FACE_BLI_L_MIN 1 +#define STB_FACE_BLI_L_MAX 1000 +#define STB_FACE_BLI_R_MIN 1 +#define STB_FACE_BLI_R_MAX 1000 +#define STB_FACE_EXP_SCORE_MIN 0 +#define STB_FACE_EXP_SCORE_MAX 100 /* not 1000 */ +#define STB_FACE_EXP_DEG_MIN -100 +#define STB_FACE_EXP_DEG_MAX 100 +#define STB_FACE_FR_UID_MIN 0 +#define STB_FACE_FR_UID_MAX 499 +#define STB_FACE_FR_SCORE_MIN 0 +#define STB_FACE_FR_SCORE_MAX 1000 + +/*-------------------------------------------------------------------*/ +/*Permitted input value*/ +/*-------------------------------------------------------------------*/ +#define STB_ERR_PE_CANNOT -128 /*Estimation is not possible.*/ +#define STB_ERR_FR_CANNOT -128 /*Recognition impossible*/ +#define STB_ERR_FR_NOID -1 /*No corresponding ID*/ +#define STB_ERR_FR_NOALBUM -127 /*Not-registered in Album*/ + +/*-------------------------------------------------------------------*/ +/*For collaboration with child library*/ +/*-------------------------------------------------------------------*/ +#define STB_ERR_DIR_CANNOT -256 /*Unable to angle estimation*/ + +/*-------------------------------------------------------------------*/ +/* Func */ +/*-------------------------------------------------------------------*/ +STB_INT32 STB_FrIsValidValue(const STB_FR_DET *input); + +#endif /* COMMONDEF_H__ */ + diff --git a/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.c b/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.c new file mode 100644 index 00000000..f5e25a0c --- /dev/null +++ b/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.c @@ -0,0 +1,87 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "SdkSTBFr.h" +#include "FrInterface.h" + +/*This layer only defines the API function */ + +/*Create/Delete handle*/ +STB_FR_HANDLE STB_Fr_CreateHandle( const STB_INT32 nTraCntMax ){ + return (STB_FR_HANDLE)FrCreateHandle( nTraCntMax ); +} + +STB_INT32 STB_Fr_DeleteHandle(STB_FR_HANDLE handle){ + return FrDeleteHandle((FRHANDLE)handle); +} + +/*set frame information*/ +STB_INT32 STB_Fr_SetDetect(STB_FR_HANDLE handle,const STB_FR_DET *stbFrDet){ + return FrSetDetect((FRHANDLE)handle,stbFrDet); +} + +/*Main process execution*/ +STB_INT32 STB_Fr_Execute(STB_FR_HANDLE handle){ + return FrExecute((FRHANDLE)handle); +} + +/*get the result*/ +STB_INT32 STB_Fr_GetResult(STB_FR_HANDLE handle, STB_FR_RES* peResult){ + return FrGetResult((FRHANDLE)handle,peResult); +} + +STB_INT32 STB_Fr_Clear(STB_FR_HANDLE handle){ + return FrClear((FRHANDLE)handle); +} + +/* FaceDirMinMax */ +STB_INT32 STB_Fr_SetFaceDirMinMax ( STB_FR_HANDLE handle , STB_INT32 nMinUDAngle , STB_INT32 nMaxUDAngle ,STB_INT32 nMinLRAngle , STB_INT32 nMaxLRAngle ) +{ + return FrSetFaceDirMinMax((FRHANDLE)handle,nMinUDAngle,nMaxUDAngle,nMinLRAngle,nMaxLRAngle ); +} +STB_INT32 STB_Fr_GetFaceDirMinMax ( STB_FR_HANDLE handle , STB_INT32 *pnMinUDAngle , STB_INT32 *pnMaxUDAngle ,STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle ) +{ + return FrGetFaceDirMinMax((FRHANDLE)handle,pnMinUDAngle,pnMaxUDAngle,pnMinLRAngle,pnMaxLRAngle ); +} + +/* FaceDirThreshold */ +STB_INT32 STB_Fr_SetFaceDirThreshold ( STB_FR_HANDLE handle , STB_INT32 threshold ) +{ + return FrSetFaceDirThreshold((FRHANDLE)handle,threshold ); +} +STB_INT32 STB_Fr_GetFaceDirThreshold ( STB_FR_HANDLE handle , STB_INT32* threshold ) +{ + return FrGetFaceDirThreshold((FRHANDLE)handle,threshold ); +} +/* FrameCount */ +STB_INT32 STB_Fr_SetFrameCount ( STB_FR_HANDLE handle , STB_INT32 nFrameCount ) +{ + return FrSetFrameCount((FRHANDLE)handle,nFrameCount ); +} +STB_INT32 STB_Fr_GetFrameCount ( STB_FR_HANDLE handle , STB_INT32* nFrameCount ) +{ + return FrGetFrameCount((FRHANDLE)handle,nFrameCount ); +} + +/* FrameShare */ +STB_INT32 STB_Fr_SetMinRatio ( STB_FR_HANDLE handle , STB_INT32 nMinRatio ) +{ + return FrSetMinRatio((FRHANDLE)handle,nMinRatio ); +} +STB_INT32 STB_Fr_GetMinRatio ( STB_FR_HANDLE handle , STB_INT32* nMinRatio ) +{ + return FrGetMinRatio((FRHANDLE)handle,nMinRatio ); +} diff --git a/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.h b/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.h new file mode 100644 index 00000000..14c1ced0 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_FaceRecognition/SdkSTBFr.h @@ -0,0 +1,44 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#if !defined( _SDK_STBFR_H_ ) +#define _SDK_STBFR_H_ +#include "STBFrTypedef.h" + +#if !defined( STB_DEF_FR_HANDLE ) + #define STB_DEF_FR_HANDLE + typedef VOID* STB_FR_HANDLE; +#endif + +STB_FR_HANDLE STB_Fr_CreateHandle ( const STB_INT32 nTraCntMax );/*Create/Delete handle*/ +STB_INT32 STB_Fr_DeleteHandle ( STB_FR_HANDLE handle );/*Create/Delete handle*/ +STB_INT32 STB_Fr_SetDetect ( STB_FR_HANDLE handle, const STB_FR_DET *stbFrDet );/*Frame information settings*/ +STB_INT32 STB_Fr_Execute ( STB_FR_HANDLE handle );/*Main process execution*/ +STB_INT32 STB_Fr_GetResult ( STB_FR_HANDLE handle, STB_FR_RES* frResult );/*Get result*/ +STB_INT32 STB_Fr_Clear ( STB_FR_HANDLE handle );/*Clear*/ + +/*parameter*/ +STB_INT32 STB_Fr_SetFaceDirMinMax ( STB_FR_HANDLE handle , STB_INT32 nMinUDAngle , STB_INT32 nMaxUDAngle ,STB_INT32 nMinLRAngle , STB_INT32 nMaxLRAngle );/* FaceDirMinMax */ +STB_INT32 STB_Fr_GetFaceDirMinMax ( STB_FR_HANDLE handle , STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle ,STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle); +STB_INT32 STB_Fr_Clear ( STB_FR_HANDLE handle );/* ClearID */ +STB_INT32 STB_Fr_SetFaceDirThreshold ( STB_FR_HANDLE handle , STB_INT32 threshold );/* FaceDirThreshold */ +STB_INT32 STB_Fr_GetFaceDirThreshold ( STB_FR_HANDLE handle , STB_INT32* threshold ); +STB_INT32 STB_Fr_SetFrameCount ( STB_FR_HANDLE handle , STB_INT32 nFrameCount ); +STB_INT32 STB_Fr_GetFrameCount ( STB_FR_HANDLE handle , STB_INT32* nFrameCount ); +STB_INT32 STB_Fr_SetMinRatio ( STB_FR_HANDLE handle , STB_INT32 nMinRatio ); +STB_INT32 STB_Fr_GetMinRatio ( STB_FR_HANDLE handle , STB_INT32* nMinRatio ); + +#endif diff --git a/src/b5t007001/stblib/src/STB_Property/PeInterface.c b/src/b5t007001/stblib/src/STB_Property/PeInterface.c new file mode 100644 index 00000000..6567b0d6 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Property/PeInterface.c @@ -0,0 +1,574 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "PeInterface.h" +#include "STBPeAPI.h" + +/*Value range check*/ +#define ISVALID_RANGE( val , min , max ) ( ( (min) <= (val) ) && ( (val) <= (max) ) ) + +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*error check*/ +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +static STB_INT32 PeIsValidValue( + const STB_INT32 nValue , + const STB_INT32 nLimitMin , + const STB_INT32 nLimitMax ) +{ + STB_INT32 nRet; + for( nRet = STB_ERR_INVALIDPARAM; nRet != STB_NORMAL; nRet = STB_NORMAL ){ + if( ! ISVALID_RANGE( nValue , nLimitMin , nLimitMax ) ){ break; } + } + return nRet; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +static STB_INT32 PeIsValidPointer( const VOID* pPointer ) +{ + STB_INT32 nRet; + for( nRet = STB_ERR_INVALIDPARAM; nRet != STB_NORMAL; nRet = STB_NORMAL ){ + if( NULL == pPointer ){ break; } + } + return nRet; +} + +/*------------------------------------------------------------------------------------------------------------------*/ +/* PeCalcPeSize */ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_UINT32 PeCalcPeSize ( STB_UINT32 nTraCntMax ) +{ + STB_UINT32 retVal ; + + retVal = 0 ; + + retVal += 100 ;///Margin : alignment + + + + retVal += sizeof( FACE_DET ) * nTraCntMax ; // peDet.fcDet + retVal += sizeof( STB_PE_DET ) * STB_PE_BACK_MAX ; // peDetRec + retVal += sizeof( FACE_DET ) * nTraCntMax * STB_PE_BACK_MAX; // handle->peDetRec[t].fcDet + retVal += sizeof( STB_PE_FACE ) * nTraCntMax ; // peRes.peFace + retVal += sizeof( STBExecFlg ) ; // execFlg + + return retVal; +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* PeSharePeSize */ +/*------------------------------------------------------------------------------------------------------------------*/ +void PeSharePeSize ( PEHANDLE handle ) +{ + + STB_UINT32 t; + STB_INT8 *stbPtr = handle->pePtr ; + STB_UINT32 nTraCntMax = handle->peCntMax; + + handle->peDet.fcDet = ( FACE_DET* ) stbPtr; stbPtr += ( sizeof( FACE_DET ) * nTraCntMax ); + handle->peDetRec = ( STB_PE_DET* ) stbPtr; stbPtr += ( sizeof( STB_PE_DET ) * STB_PE_BACK_MAX); + for( t = 0 ; t < STB_PE_BACK_MAX ; t++ ) + { + handle->peDetRec[t].fcDet = ( FACE_DET* ) stbPtr; stbPtr += ( sizeof( FACE_DET ) * nTraCntMax ); + } + handle->peRes.peFace = ( STB_PE_FACE* ) stbPtr; stbPtr += ( sizeof( STB_PE_FACE) * nTraCntMax ); + handle->execFlg = ( STBExecFlg* ) stbPtr; stbPtr += ( sizeof( STBExecFlg ) ); + +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Create handle*/ +PEHANDLE PeCreateHandle( const STBExecFlg* execFlg ,const STB_INT32 nTraCntMax ){ + + PEHANDLE handle; + STB_INT32 t , i ,j; + STB_INT32 tmpVal ; + STB_INT32 nRet ; + + nRet = PeIsValidPointer(execFlg); + if(nRet != STB_NORMAL) + { + return NULL; + } + + if( nTraCntMax < 1 || STB_PE_TRA_CNT_MAX < nTraCntMax ) + { + return NULL; + } + + + + /*do handle's Malloc here*/ + handle = ( PEHANDLE )malloc( sizeof(*handle) ); + if(handle == NULL) + { + return NULL; + } + + /*initial value---------------------------------------------------------------------*/ + handle->peFaceDirUDMin = STB_PE_DIR_MIN_UD_INI;//The face on top/down allowable range min. + handle->peFaceDirUDMax = STB_PE_DIR_MAX_UD_INI;//The face on top/down allowable range max. + handle->peFaceDirLRMin = STB_PE_DIR_MIN_LR_INI;//The face on left /right side allowable range min. + handle->peFaceDirLRMax = STB_PE_DIR_MAX_LR_INI;//The face on left /right side allowable range max. + handle->peFaceDirThr = STB_PE_DIR_THR_INI ;//If the confidence of Face direction estimation doesn't exceed the reference value, the recognition result isn't trusted. + handle->peFrameCount = STB_PE_FRAME_CNT_INI ; + handle->peCntMax = nTraCntMax ;//Maximum number of tracking people + handle->pePtr = NULL; + handle->peDet.num = 0; + handle->peDet.fcDet = NULL; + handle->peDetRec = NULL; + handle->peRes.peCnt = 0; + handle->peRes.peFace = NULL; + handle->execFlg = NULL; + + tmpVal = PeCalcPeSize ( nTraCntMax ); /*calculate necessary amount in the Pe handle*/ + handle->pePtr = NULL; + handle->pePtr = ( STB_INT8 * )malloc( tmpVal ); /*keeping necessary amount in the Pe handle*/ + if( handle->pePtr == NULL ) + { + free ( handle->pePtr ); + free ( handle ); + return NULL; + } + + /*Malloc-area is allocated to things that need Malloc in TR handle*/ + PeSharePeSize ( handle ); + + for( t = 0 ; t < STB_PE_BACK_MAX ; t++ ) + { + handle->peDetRec [ t ].num = 0; + for( i = 0 ; i < handle->peCntMax ; i++ ) + { + handle->peDetRec[t].fcDet[i].nDetID = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].nTraID = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].dirDetRoll = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].dirDetPitch = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].dirDetYaw = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].dirDetConf = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].ageDetVal = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].ageStatus = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].ageDetConf = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].genDetVal = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].genStatus = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].genDetConf = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].gazDetLR = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].gazDetUD = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].bliDetL = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].bliDetR = STB_STATUS_NO_DATA ; + + handle->peDetRec[t].fcDet[i].expDetConf = STB_STATUS_NO_DATA ; + for( j = 0 ; j < STB_EX_MAX ; j++) + { + handle->peDetRec[t].fcDet[i].expDetVal[ j ] = STB_STATUS_NO_DATA; + } + } + } + + handle->execFlg->pet = execFlg->pet ; + handle->execFlg->hand = execFlg->hand ; + handle->execFlg->bodyTr = execFlg->bodyTr ; + handle->execFlg->faceTr = execFlg->faceTr ; + handle->execFlg->gen = execFlg->gen ; + handle->execFlg->age = execFlg->age ; + handle->execFlg->fr = execFlg->fr ; + handle->execFlg->exp = execFlg->exp ; + handle->execFlg->gaz = execFlg->gaz ; + handle->execFlg->dir = execFlg->dir ; + handle->execFlg->bli = execFlg->bli ; + + + return handle; +} + +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Delete handle*/ +STB_INT32 PeDeleteHandle(PEHANDLE handle){ + STB_INT32 nRet; + /*NULL check*/ + nRet = PeIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + free ( handle->pePtr ); + free ( handle ); + + return STB_NORMAL; +} + +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Set the result*/ +STB_INT32 PeSetDetect(PEHANDLE handle,const STB_PE_DET *stbPeDet){ + + STB_INT32 nRet; + STB_INT32 i,j; + + /*NULL check*/ + nRet = PeIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + nRet = PeIsValidPointer(stbPeDet); + if(nRet != STB_NORMAL){ + return nRet; + } + + /*Input value check*/ + nRet = STB_PeIsValidValue ( stbPeDet ,handle->execFlg ); + if(nRet != STB_TRUE) + { + return STB_ERR_INVALIDPARAM; + } + + + /*Set the received result to the handle*/ + /* Face */ + if( stbPeDet->num > handle->peCntMax ) + { + return STB_ERR_PROCESSCONDITION; + } + + + handle->peDet.num = stbPeDet->num; + for( i = 0 ; i < handle->peDet.num ; i++ ) + { + handle->peDet.fcDet[i].nDetID = stbPeDet->fcDet[i].nDetID ; + handle->peDet.fcDet[i].nTraID = stbPeDet->fcDet[i].nTraID ; + if( handle->execFlg->gen == STB_TRUE ) + { + handle->peDet.fcDet[i].genDetVal = stbPeDet->fcDet[i].genDetVal ; + handle->peDet.fcDet[i].genDetConf = stbPeDet->fcDet[i].genDetConf ; + handle->peDet.fcDet[i].genStatus = STB_STATUS_NO_DATA ; + } + if( handle->execFlg->age == STB_TRUE ) + { + handle->peDet.fcDet[i].ageDetVal = stbPeDet->fcDet[i].ageDetVal ; + handle->peDet.fcDet[i].ageDetConf = stbPeDet->fcDet[i].ageDetConf ; + handle->peDet.fcDet[i].ageStatus = STB_STATUS_NO_DATA ; + } + if( handle->execFlg->exp == STB_TRUE ) + { + handle->peDet.fcDet[i].expDetConf = stbPeDet->fcDet[i].expDetConf ; + for( j = 0 ; j < STB_EX_MAX ; j++) + { + handle->peDet.fcDet[i].expDetVal[ j ] = stbPeDet->fcDet[i].expDetVal[ j ]; + } + } + if( handle->execFlg->gaz == STB_TRUE ) + { + handle->peDet.fcDet[i].gazDetLR = stbPeDet->fcDet[i].gazDetLR ; + handle->peDet.fcDet[i].gazDetUD = stbPeDet->fcDet[i].gazDetUD ; + } + //if( handle->execFlg->dir == STB_TRUE )// dir is obligation. + //{ + handle->peDet.fcDet[i].dirDetRoll = stbPeDet->fcDet[i].dirDetRoll ; + handle->peDet.fcDet[i].dirDetPitch = stbPeDet->fcDet[i].dirDetPitch ; + handle->peDet.fcDet[i].dirDetYaw = stbPeDet->fcDet[i].dirDetYaw ; + handle->peDet.fcDet[i].dirDetConf = stbPeDet->fcDet[i].dirDetConf ; + //} + if( handle->execFlg->bli == STB_TRUE ) + { + handle->peDet.fcDet[i].bliDetL = stbPeDet->fcDet[i].bliDetL ; + handle->peDet.fcDet[i].bliDetR = stbPeDet->fcDet[i].bliDetR ; + } + } + + + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Main process execution*/ +STB_INT32 PeExecute(PEHANDLE handle){ + STB_INT32 nRet; + /*NULL check*/ + nRet = PeIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + /*Main processing here*/ + nRet = StbPeExec ( handle ); + + + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Get-Function of results*/ +STB_INT32 PeGetResult( PEHANDLE handle, STB_PE_RES* peResult){ + + STB_INT32 nRet; + STB_INT32 i; + + /*NULL check*/ + nRet = PeIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + nRet = PeIsValidPointer(peResult); + if(nRet != STB_NORMAL){ + return nRet; + } + + /*Get result from handle*/ + peResult->peCnt = handle->peRes.peCnt ; + for( i = 0 ; i < peResult->peCnt ; i++ ) + { + peResult->peFace[i].nTraID = handle->peRes.peFace[i].nTraID ; + peResult->peFace[i].gen.status = handle->peRes.peFace[i].gen.status ; + peResult->peFace[i].gen.value = handle->peRes.peFace[i].gen.value ; + peResult->peFace[i].gen.conf = handle->peRes.peFace[i].gen.conf ; + peResult->peFace[i].age.status = handle->peRes.peFace[i].age.status ; + peResult->peFace[i].age.value = handle->peRes.peFace[i].age.value ; + peResult->peFace[i].age.conf = handle->peRes.peFace[i].age.conf ; + peResult->peFace[i].exp.status = handle->peRes.peFace[i].exp.status ; + peResult->peFace[i].exp.value = handle->peRes.peFace[i].exp.value ; + peResult->peFace[i].exp.conf = handle->peRes.peFace[i].exp.conf ; + peResult->peFace[i].gaz.status = handle->peRes.peFace[i].gaz.status ; + peResult->peFace[i].gaz.LR = handle->peRes.peFace[i].gaz.LR ; + peResult->peFace[i].gaz.UD = handle->peRes.peFace[i].gaz.UD ; + peResult->peFace[i].gaz.conf = handle->peRes.peFace[i].gaz.conf ; + peResult->peFace[i].dir.status = handle->peRes.peFace[i].dir.status ; + peResult->peFace[i].dir.pitch = handle->peRes.peFace[i].dir.pitch ; + peResult->peFace[i].dir.roll = handle->peRes.peFace[i].dir.roll ; + peResult->peFace[i].dir.yaw = handle->peRes.peFace[i].dir.yaw ; + peResult->peFace[i].dir.conf = handle->peRes.peFace[i].dir.conf ; + peResult->peFace[i].bli.status = handle->peRes.peFace[i].bli.status ; + peResult->peFace[i].bli.ratioL = handle->peRes.peFace[i].bli.ratioL ; + peResult->peFace[i].bli.ratioR = handle->peRes.peFace[i].bli.ratioR ; + } + + + + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 PeSetFaceDirMinMax(PEHANDLE handle , STB_INT32 nMinUDAngle , STB_INT32 nMaxUDAngle ,STB_INT32 nMinLRAngle , STB_INT32 nMaxLRAngle ) +{ + + STB_INT32 nRet; + nRet = PeIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + if( nMinUDAngle < STB_PE_DIR_MIN_UD_MIN || STB_PE_DIR_MIN_UD_MAX < nMinUDAngle) + { + return STB_ERR_INVALIDPARAM; + } + if( nMaxUDAngle < STB_PE_DIR_MAX_UD_MIN || STB_PE_DIR_MAX_UD_MAX < nMaxUDAngle) + { + return STB_ERR_INVALIDPARAM; + } + if( nMaxUDAngle < nMinUDAngle) + { + return STB_ERR_INVALIDPARAM; + } + + + if( nMinLRAngle < STB_PE_DIR_MIN_LR_MIN || STB_PE_DIR_MIN_LR_MAX < nMinLRAngle) + { + return STB_ERR_INVALIDPARAM; + } + if( nMaxLRAngle < STB_PE_DIR_MAX_LR_MIN || STB_PE_DIR_MAX_LR_MAX < nMaxLRAngle) + { + return STB_ERR_INVALIDPARAM; + } + if( nMaxLRAngle < nMinLRAngle) + { + return STB_ERR_INVALIDPARAM; + } + + handle->peFaceDirUDMin = nMinUDAngle; + handle->peFaceDirUDMax = nMaxUDAngle; + handle->peFaceDirLRMin = nMinLRAngle; + handle->peFaceDirLRMax = nMaxLRAngle; + + + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 PeGetFaceDirMinMax(PEHANDLE handle ,STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle ,STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle ) +{ + STB_INT32 nRet; + nRet = PeIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + nRet = PeIsValidPointer(pnMinUDAngle); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + nRet = PeIsValidPointer(pnMaxUDAngle); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + nRet = PeIsValidPointer(pnMinLRAngle); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + nRet = PeIsValidPointer(pnMaxLRAngle); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + + *pnMinUDAngle = handle->peFaceDirUDMin ; + *pnMaxUDAngle = handle->peFaceDirUDMax ; + + *pnMinLRAngle = handle->peFaceDirLRMin ; + *pnMaxLRAngle = handle->peFaceDirLRMax ; + + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 PeClear ( PEHANDLE handle ) +{ + //clear processing + STB_INT32 t , i ,j; + STB_INT32 nRet; + + /*NULL check*/ + nRet = PeIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + for( t = 0 ; t < STB_PE_BACK_MAX ; t++ ) + { + handle->peDetRec [ t ].num = 0; + for( i = 0 ; i < handle->peCntMax ; i++ ) + { + handle->peDetRec[t].fcDet[i].nDetID = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].nTraID = STB_STATUS_NO_DATA ; + if( handle->execFlg->dir == STB_TRUE ) + { + handle->peDetRec[t].fcDet[i].dirDetRoll = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].dirDetPitch = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].dirDetYaw = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].dirDetConf = STB_STATUS_NO_DATA ; + } + if( handle->execFlg->age == STB_TRUE ) + { + handle->peDetRec[t].fcDet[i].ageDetVal = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].ageStatus = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].ageDetConf = STB_STATUS_NO_DATA ; + } + if( handle->execFlg->gen == STB_TRUE ) + { + handle->peDetRec[t].fcDet[i].genDetVal = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].genStatus = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].genDetConf = STB_STATUS_NO_DATA ; + } + if( handle->execFlg->gaz == STB_TRUE ) + { + handle->peDetRec[t].fcDet[i].gazDetLR = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].gazDetUD = STB_STATUS_NO_DATA ; + } + if( handle->execFlg->bli == STB_TRUE ) + { + handle->peDetRec[t].fcDet[i].bliDetL = STB_STATUS_NO_DATA ; + handle->peDetRec[t].fcDet[i].bliDetR = STB_STATUS_NO_DATA ; + } + if( handle->execFlg->exp == STB_TRUE ) + { + handle->peDetRec[t].fcDet[i].expDetConf = STB_STATUS_NO_DATA ; + for( j = 0 ; j < STB_EX_MAX ; j++) + { + handle->peDetRec[t].fcDet[i].expDetVal[j] = STB_STATUS_NO_DATA ; + } + } + } + } + + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 PeSetFaceDirThreshold(PEHANDLE handle , STB_INT32 threshold ) +{ + STB_INT32 nRet; + nRet = PeIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + if( threshold < STB_PE_DIR_THR_MIN || STB_PE_DIR_THR_MAX < threshold ){ + return STB_ERR_INVALIDPARAM; + } + + handle->peFaceDirThr = threshold; + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 PeGetFaceDirThreshold(PEHANDLE handle , STB_INT32* threshold ) +{ + STB_INT32 nRet; + nRet = PeIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + nRet = PeIsValidPointer(threshold); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + + *threshold = handle->peFaceDirThr ; + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 PeSetFrameCount(PEHANDLE handle , STB_INT32 nFrameCount ) +{ + + STB_INT32 nRet; + nRet = PeIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + if( nFrameCount < 1 || nFrameCount > STB_PE_BACK_MAX ) + { + return STB_ERR_INVALIDPARAM; + } + + handle->peFrameCount = nFrameCount; + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 PeGetFrameCount(PEHANDLE handle , STB_INT32* nFrameCount ) +{ + STB_INT32 nRet; + nRet = PeIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + nRet = PeIsValidPointer(nFrameCount); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + + *nFrameCount = handle->peFrameCount ; + return STB_NORMAL; +} \ No newline at end of file diff --git a/src/b5t007001/stblib/src/STB_Property/PeInterface.h b/src/b5t007001/stblib/src/STB_Property/PeInterface.h new file mode 100644 index 00000000..c7ef72fe --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Property/PeInterface.h @@ -0,0 +1,111 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#if !defined( _INTERFACE_H_ ) +#define _INTERFACE_H_ +#include "STBPeTypedef.h" +#include "STBPeValidValue.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// +/////////// Define ////////////// +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// + + +#define STB_PE_BACK_MAX 20 /* refer to past "STB_BACK_MAX" frames of results */ +#define STB_PE_EX_MAX 5 //A type of Facial expression + +#define STB_PE_TRA_CNT_MAX 35 + +#define STB_PE_DIR_MIN_UD_INI -15 +#define STB_PE_DIR_MIN_UD_MIN -90 +#define STB_PE_DIR_MIN_UD_MAX 90 + +#define STB_PE_DIR_MAX_UD_INI 20 +#define STB_PE_DIR_MAX_UD_MIN -90 +#define STB_PE_DIR_MAX_UD_MAX 90 + +#define STB_PE_DIR_MIN_LR_INI -30 +#define STB_PE_DIR_MIN_LR_MIN -90 +#define STB_PE_DIR_MIN_LR_MAX 90 + +#define STB_PE_DIR_MAX_LR_INI 30 +#define STB_PE_DIR_MAX_LR_MIN -90 +#define STB_PE_DIR_MAX_LR_MAX 90 + + +#define STB_PE_FRAME_CNT_INI 5 +#define STB_PE_FRAME_CNT_MIN 1 +#define STB_PE_FRAME_CNT_MAX 20 + +#define STB_PE_DIR_THR_INI 300 +#define STB_PE_DIR_THR_MIN 0 +#define STB_PE_DIR_THR_MAX 1000 + +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// +/////////// Struct ////////////// +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// +typedef struct tagPEHANDLE { + + STB_INT8 *pePtr ; + /* param */ + STB_INT32 peCntMax ;//Maximum number of tracking people + STB_INT32 peFaceDirUDMin ;//The face on top/down allowable range min. + STB_INT32 peFaceDirUDMax ;//The face on top/down allowable range max. + STB_INT32 peFaceDirLRMin ;//The face on left /right side allowable range min. + STB_INT32 peFaceDirLRMax ;//The face on left /right side allowable range max. + STB_INT32 peFaceDirThr ;//If the confidence of Face direction estimation doesn't exceed the reference value, the recognition result isn't trusted. + STB_INT32 peFrameCount ; + + /* PE_Face */ + STB_PE_DET peDet ;//Present data before the stabilization(input). + STB_PE_DET *peDetRec ;//past data before the stabilization + STB_PE_RES peRes ;//present data after the stabilization(output) + STBExecFlg *execFlg ; + +} *PEHANDLE; + +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// +/////////// Func ////////////// +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// +PEHANDLE PeCreateHandle ( const STBExecFlg* execFlg ,const STB_INT32 nTraCntMax); +STB_INT32 PeDeleteHandle ( PEHANDLE handle); +STB_INT32 PeSetDetect ( PEHANDLE handle,const STB_PE_DET *stbPeDet); +STB_INT32 PeExecute ( PEHANDLE handle); +STB_INT32 PeGetResult ( PEHANDLE handle , STB_PE_RES* peResult); +STB_INT32 PeSetFaceDirMinMax ( PEHANDLE handle , STB_INT32 nMinUDAngle , STB_INT32 nMaxUDAngle ,STB_INT32 nMinLRAngle , STB_INT32 nMaxLRAngle ); +STB_INT32 PeGetFaceDirMinMax ( PEHANDLE handle , STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle ,STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle ); +STB_INT32 PeClear ( PEHANDLE handle ); +STB_INT32 PeSetFaceDirThreshold ( PEHANDLE handle , STB_INT32 threshold ); +STB_INT32 PeGetFaceDirThreshold ( PEHANDLE handle , STB_INT32* threshold ); +STB_INT32 PeSetFrameCount ( PEHANDLE handle , STB_INT32 nFrameCount ); +STB_INT32 PeGetFrameCount ( PEHANDLE handle , STB_INT32* nFrameCount ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/b5t007001/stblib/src/STB_Property/STBPeAPI.c b/src/b5t007001/stblib/src/STB_Property/STBPeAPI.c new file mode 100644 index 00000000..3dfdb5a8 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Property/STBPeAPI.c @@ -0,0 +1,647 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "STBPeAPI.h" + + +/*---------------------------------------------------------------------*/ +// PeSlideFacesRec +/*---------------------------------------------------------------------*/ +void PeSlideFacesRec ( STB_PE_DET *facesRec , STBExecFlg *execFlg) +{ + STB_INT32 t , i ,j; + + for( t = STB_PE_BACK_MAX -2 ; t >= 0 ; t-- ) + { + facesRec [ t + 1 ].num = facesRec[ t + 0 ].num; + for( i = 0 ; i < facesRec [ t + 1 ].num ; i++ ) + { + facesRec[ t + 1 ].fcDet[i].nDetID = facesRec[ t ].fcDet[i].nDetID ; + facesRec[ t + 1 ].fcDet[i].nTraID = facesRec[ t ].fcDet[i].nTraID ; + if( execFlg->gen == STB_TRUE ) + { + facesRec[ t + 1 ].fcDet[i].genDetVal = facesRec[ t ].fcDet[i].genDetVal ; + facesRec[ t + 1 ].fcDet[i].genStatus = facesRec[ t ].fcDet[i].genStatus ; + facesRec[ t + 1 ].fcDet[i].genDetConf = facesRec[ t ].fcDet[i].genDetConf ; + } + if( execFlg->age == STB_TRUE ) + { + facesRec[ t + 1 ].fcDet[i].ageDetVal = facesRec[ t ].fcDet[i].ageDetVal ; + facesRec[ t + 1 ].fcDet[i].ageStatus = facesRec[ t ].fcDet[i].ageStatus ; + facesRec[ t + 1 ].fcDet[i].ageDetConf = facesRec[ t ].fcDet[i].ageDetConf ; + } + if( execFlg->exp == STB_TRUE ) + { + facesRec[ t + 1 ].fcDet[i].expDetConf = facesRec[ t ].fcDet[i].expDetConf ; + for( j = 0 ; j < STB_EX_MAX ; j++) + { + facesRec[ t + 1 ].fcDet[ i ].expDetVal[ j ] + = facesRec[ t + 0 ].fcDet[ i ].expDetVal[ j ]; + } + } + if( execFlg->gaz == STB_TRUE ) + { + facesRec[ t + 1 ].fcDet[i].gazDetLR = facesRec[ t ].fcDet[i].gazDetLR ; + facesRec[ t + 1 ].fcDet[i].gazDetUD = facesRec[ t ].fcDet[i].gazDetUD ; + } + //if( execFlg->dir == STB_TRUE ) + //{ + facesRec[ t + 1 ].fcDet[i].dirDetRoll = facesRec[ t ].fcDet[i].dirDetRoll ; + facesRec[ t + 1 ].fcDet[i].dirDetPitch = facesRec[ t ].fcDet[i].dirDetPitch; + facesRec[ t + 1 ].fcDet[i].dirDetYaw = facesRec[ t ].fcDet[i].dirDetYaw ; + facesRec[ t + 1 ].fcDet[i].dirDetConf = facesRec[ t ].fcDet[i].dirDetConf ; + //} + if( execFlg->bli == STB_TRUE ) + { + facesRec[ t + 1 ].fcDet[i].bliDetL = facesRec[ t ].fcDet[i].bliDetL ; + facesRec[ t + 1 ].fcDet[i].bliDetR = facesRec[ t ].fcDet[i].bliDetR ; + } + } + } + +} +/*---------------------------------------------------------------------*/ +// PeCurFaces +/*---------------------------------------------------------------------*/ +void PeCurFaces ( STB_PE_DET *facesRec , STB_PE_DET *srcFace ,STBExecFlg *execFlg) +{ + STB_INT32 i ,j; + + + facesRec [ 0 ].num = srcFace->num; + for( i = 0 ; i < facesRec [ 0 ].num ; i++ ) + { + facesRec[ 0 ].fcDet[ i ].nDetID = srcFace[ 0 ].fcDet[ i ].nDetID ; + facesRec[ 0 ].fcDet[ i ].nTraID = srcFace[ 0 ].fcDet[ i ].nTraID ; + if( execFlg->gen == STB_TRUE ) + { + facesRec[ 0 ].fcDet[ i ].genDetVal = srcFace[ 0 ].fcDet[ i ].genDetVal ; + facesRec[ 0 ].fcDet[ i ].genStatus = STB_STATUS_NO_DATA ; + facesRec[ 0 ].fcDet[ i ].genDetConf = srcFace[ 0 ].fcDet[ i ].genDetConf; + } + if( execFlg->age == STB_TRUE ) + { + facesRec[ 0 ].fcDet[ i ].ageDetVal = srcFace[ 0 ].fcDet[ i ].ageDetVal ; + facesRec[ 0 ].fcDet[ i ].ageStatus = STB_STATUS_NO_DATA ; + facesRec[ 0 ].fcDet[ i ].ageDetConf = srcFace[ 0 ].fcDet[ i ].ageDetConf; + } + if( execFlg->exp == STB_TRUE ) + { + facesRec[ 0 ].fcDet[ i ].expDetConf = srcFace[ 0 ].fcDet[ i ].expDetConf ; + for( j = 0 ; j < STB_EX_MAX ; j++) + { + facesRec[ 0 ].fcDet[ i ].expDetVal[ j] = srcFace[ 0 ].fcDet[ i ].expDetVal[ j]; + } + } + if( execFlg->gaz == STB_TRUE ) + { + facesRec[ 0 ].fcDet[ i ].gazDetLR = srcFace[ 0 ].fcDet[ i ].gazDetLR ; + facesRec[ 0 ].fcDet[ i ].gazDetUD = srcFace[ 0 ].fcDet[ i ].gazDetUD ; + } + //if( execFlg->dir == STB_TRUE ) + //{ + facesRec[ 0 ].fcDet[ i ].dirDetRoll = srcFace[ 0 ].fcDet[ i ].dirDetRoll ; + facesRec[ 0 ].fcDet[ i ].dirDetYaw = srcFace[ 0 ].fcDet[ i ].dirDetYaw ; + facesRec[ 0 ].fcDet[ i ].dirDetPitch = srcFace[ 0 ].fcDet[ i ].dirDetPitch ; + facesRec[ 0 ].fcDet[ i ].dirDetConf = srcFace[ 0 ].fcDet[ i ].dirDetConf ; + //} + if( execFlg->bli == STB_TRUE ) + { + facesRec[ 0 ].fcDet[ i ].bliDetL = srcFace[ 0 ].fcDet[ i ].bliDetL ; + facesRec[ 0 ].fcDet[ i ].bliDetR = srcFace[ 0 ].fcDet[ i ].bliDetR ; + } + } +} + +/*----------------------------------------------------------------------------------------------------*/ +/* PeExpressID */ +/*----------------------------------------------------------------------------------------------------*/ +STB_INT32 PeExpressID( STB_INT32* exp ) +{ + int i; + int tmpVal; + int retVal; + + retVal = 0; + tmpVal = 0; + for( i = 0 ; i < STB_EX_MAX ; i++) + { + if( tmpVal < exp[i] && exp[i] != STB_ERR_PE_CANNOT ) + { + tmpVal = exp[i]; + retVal = i; + } + } + return retVal; +} +/*---------------------------------------------------------------------*/ +// PeStbFaceEasy +/*---------------------------------------------------------------------*/ +void PeStbFaceEasy + ( + STB_PE_RES *peRes , + STB_PE_DET *peRec , + STB_INT32 dirThr , + STB_INT32 dirUDMax , + STB_INT32 dirUDMin , + STB_INT32 dirLRMax , + STB_INT32 dirLRMin , + STB_INT32 frmMax , + STBExecFlg *execFlg + ) +{ + + + /*Checking the past data here, fill in all peRes.*/ + STB_INT32 k ,t,i ; + STB_INT32 trID; + + STB_INT32 recCnt; + STB_INT32 recVal [STB_PE_BACK_MAX]; + STB_INT32 recConf [STB_PE_BACK_MAX]; + STB_INT32 tmpVal; + STB_INT32 tmpConf; + STB_INT32 expVal [STB_EX_MAX] = {0}; + + STB_STATUS preSAge ; + STB_STATUS preSGen ; + STB_INT32 preVAge ; + STB_INT32 preVGen ; + STB_INT32 preCAge ; + STB_INT32 preCGen ; + STB_STATUS tmpS ; + + + + for( t = 0; t < STB_PE_BACK_MAX ; t++) + { + recVal [t] = 0; + recConf[t] = 0; + } + + + /*do stabilization processing each tracking person*/ + peRes->peCnt = peRec[0].num ;//a number of tracking people(present) + for( k = 0; k < peRes->peCnt ; k++) + { + trID = peRec[0].fcDet[k].nTraID;/*Tracking person number in the through frame*/ + + + // peRes Add ------------------------------------------------------------------------------------------------- + peRes->peFace[k].nTraID = trID; + + + // preStatus ------------------------------------------------------------------------------------------------- + preSAge = STB_STATUS_NO_DATA ; + preSGen = STB_STATUS_NO_DATA ; + preVAge = 0 ; + preVGen = 0 ; + preCAge = 0 ; + preCGen = 0 ; + if( execFlg->age == STB_TRUE || execFlg->gen == STB_TRUE ) + { + for( i = 0; i < peRec[1].num ; i++) + { + if( peRec[1].fcDet[i].nTraID == trID ) + { + preSAge = peRec[1].fcDet[i].ageStatus ; + preSGen = peRec[1].fcDet[i].genStatus ; + preVAge = peRec[1].fcDet[i].ageDetVal ; + preVGen = peRec[1].fcDet[i].genDetVal ; + preCAge = peRec[1].fcDet[i].ageDetConf ; + preCGen = peRec[1].fcDet[i].genDetConf ; + break; + } + } + } + + // age ------------------------------------------------------------------------------------------------- + if( execFlg->age == STB_TRUE ) + { + if ( preSAge == STB_STATUS_NO_DATA //stabilization impossible: no data of the relevant people + || preSAge == STB_STATUS_CALCULATING //during stabilization : a number of data for relevant people aren't enough(a number of frames that relevant people are taken) + ) + { + recCnt = 0; + for( t = 0; t < STB_PE_BACK_MAX ; t++) //previous t frame + { + for( i = 0; i < peRec[t].num ; i++) //a number of tracking people(previous t frame) + { + if( + peRec[t].fcDet[i].nTraID == trID //the same tracking number + && peRec[t].fcDet[i].nDetID >= 0 //not lost + && peRec[t].fcDet[i].dirDetConf >= dirThr // Face angle : confidence + && peRec[t].fcDet[i].dirDetPitch >= dirUDMin // Face angle : pitch + && peRec[t].fcDet[i].dirDetPitch <= dirUDMax // Face angle : pitch + && peRec[t].fcDet[i].dirDetYaw >= dirLRMin // Face angle : yaw + && peRec[t].fcDet[i].dirDetYaw <= dirLRMax // Face angle : yaw + && peRec[t].fcDet[i].ageDetVal != STB_ERR_PE_CANNOT // + && peRec[t].fcDet[i].ageDetConf != STB_ERR_PE_CANNOT // + ) + { + recVal [ recCnt ] = peRec[ t ].fcDet[ i ].ageDetVal ; + recConf[ recCnt ] = peRec[ t ].fcDet[ i ].ageDetConf ; + recCnt++; + } + } + } + tmpS = STB_STATUS_NO_DATA; + if ( recCnt == 0 ) { tmpS = STB_STATUS_NO_DATA ; }//stabilization impossible + else if ( recCnt < frmMax ) { tmpS = STB_STATUS_CALCULATING; }//during stabilization + else if ( recCnt >= frmMax ) { tmpS = STB_STATUS_COMPLETE ; }//Just after stabilization + tmpVal = 0; + tmpConf = 0; + for( i = 0; i < recCnt ; i++ ) + { + tmpVal += recVal [ i ] ; + tmpConf += recConf[ i ] ; + } + if ( recCnt == 0 ) { recCnt = 1 ; } + tmpVal /= recCnt; + tmpConf /= recCnt; + peRes->peFace[k].age.value = tmpVal ; + peRes->peFace[k].age.conf = STB_CONF_NO_DATA ; + peRes->peFace[k].age.status = tmpS ; + peRec[0].fcDet[k].ageStatus = tmpS ; + if( tmpS == STB_STATUS_COMPLETE )//Just after stabilization + { + peRec[0].fcDet[k].ageDetVal = tmpVal ; + peRec[0].fcDet[k].ageDetConf = tmpConf ; + } + }else if ( preSAge == STB_STATUS_COMPLETE //Just after stabilization + || preSAge == STB_STATUS_FIXED //already stabilized + ) + { + peRes->peFace[k].age.value = preVAge ; + peRes->peFace[k].age.conf = preCAge; + peRes->peFace[k].age.status = STB_STATUS_FIXED ;//already stabilized + peRec[0].fcDet[k].ageDetVal = preVAge ; + peRec[0].fcDet[k].ageDetConf = preCAge ; + peRec[0].fcDet[k].ageStatus = STB_STATUS_FIXED ;//already stabilized + } + } + + + // gender ------------------------------------------------------------------------------------------------- + if( execFlg->gen == STB_TRUE ) + { + if ( preSGen == STB_STATUS_NO_DATA //stabilization impossible: no data of the relevant people + || preSGen == STB_STATUS_CALCULATING //during stabilization : a number of data for relevant people aren't enough(a number of frames that relevant people are taken) + ) + { + recCnt = 0; + for( t = 0; t < STB_PE_BACK_MAX ; t++) + { + for( i = 0; i < peRec[t].num ; i++) //a number of tracking people(previous t frame) + { + if( + peRec[t].fcDet[i].nTraID == trID //the same tracking number + && peRec[t].fcDet[i].nDetID >= 0 //not lost + && peRec[t].fcDet[i].dirDetConf >= dirThr // Face angle : confidence + && peRec[t].fcDet[i].dirDetPitch >= dirUDMin // Face angle : pitch + && peRec[t].fcDet[i].dirDetPitch <= dirUDMax // Face angle : pitch + && peRec[t].fcDet[i].dirDetYaw >= dirLRMin // Face angle : yaw + && peRec[t].fcDet[i].dirDetYaw <= dirLRMax // Face angle : yaw + && peRec[t].fcDet[i].genDetVal != STB_ERR_PE_CANNOT // + && peRec[t].fcDet[i].genDetConf != STB_ERR_PE_CANNOT // + ) + { + recVal [ recCnt ] = peRec[ t ].fcDet[ i ].genDetVal ;// 1:man 0:woman + recConf[ recCnt ] = peRec[ t ].fcDet[ i ].genDetConf; + recCnt++; + } + } + } + tmpS = STB_STATUS_NO_DATA; + if ( recCnt == 0 ) { tmpS = STB_STATUS_NO_DATA ; }//stabilization impossible + else if ( recCnt < frmMax ) { tmpS = STB_STATUS_CALCULATING; }//during stabilization + else if ( recCnt >= frmMax ) { tmpS = STB_STATUS_COMPLETE ; }//Just after stabilization + tmpVal = 0; + tmpConf = 0; + for( i = 0; i < recCnt ; i++ ) + { + tmpVal += recVal [ i ] ; + tmpConf += recConf[ i ] ; + } + if ( recCnt == 0 ) { recCnt = 1 ; } + tmpConf /= recCnt; + if ( tmpVal * 2 <= recCnt ) + { + peRes->peFace[k].gen.value = 0 ;// 1:man 0:woman + peRes->peFace[k].gen.status = tmpS ; + peRes->peFace[k].gen.conf = STB_CONF_NO_DATA ; + peRec[0].fcDet[k].genStatus = tmpS ; + if( tmpS == STB_STATUS_COMPLETE )//Just after stabilization + { + peRec[0].fcDet[k].genDetVal = 0 ; + peRec[0].fcDet[k].genDetConf = tmpConf ; + } + } + else + { + peRes->peFace[k].gen.value = 1 ;// 1:man 0:woman + peRes->peFace[k].gen.status = tmpS ; + peRes->peFace[k].gen.conf = STB_CONF_NO_DATA ; + peRec[0].fcDet[k].genStatus = tmpS ; + if( tmpS == STB_STATUS_COMPLETE )//Just after stabilization + { + peRec[0].fcDet[k].genDetVal = 1 ; + peRec[0].fcDet[k].genDetConf = tmpConf ; + } + } + }else if ( preSGen == STB_STATUS_COMPLETE //Just after stabilization + || preSGen == STB_STATUS_FIXED //already stabilized + ) + { + peRes->peFace[k].gen.value = preVGen ; + peRes->peFace[k].gen.conf = preCGen; + peRes->peFace[k].gen.status = STB_STATUS_FIXED ;//already stabilized + peRec[0].fcDet[k].genDetVal = preVGen ; + peRec[0].fcDet[k].genStatus = STB_STATUS_FIXED ;//already stabilized + peRec[0].fcDet[k].genDetConf = preCGen ; + } + } + + // gazeLR ------------------------------------------------------------------------------------------------- + if( execFlg->gaz == STB_TRUE ) + { + recCnt = 0; + for( t = 0; t < STB_PE_BACK_MAX ; t++) + { + for( i = 0; i < peRec[t].num ; i++) //a number of tracking people(previous t frame) + { + if( + peRec[t].fcDet[i].nTraID == trID //the same tracking number + && peRec[t].fcDet[i].nDetID >= 0 //not lost + && peRec[t].fcDet[i].dirDetConf >= dirThr // Face angle : confidence + && peRec[t].fcDet[i].dirDetPitch >= dirUDMin // Face angle : pitch + && peRec[t].fcDet[i].dirDetPitch <= dirUDMax // Face angle : pitch + && peRec[t].fcDet[i].dirDetYaw >= dirLRMin // Face angle : yaw + && peRec[t].fcDet[i].dirDetYaw <= dirLRMax // Face angle : yaw + && peRec[t].fcDet[i].gazDetLR != STB_ERR_PE_CANNOT // + ) + { + recVal[ recCnt ] = peRec[ t ].fcDet [ i ].gazDetLR ; + recCnt++; + } + } + } + if ( recCnt == 0 ) { peRes->peFace[k].gaz.status = STB_STATUS_NO_DATA ; }//stabilization impossible + else { peRes->peFace[k].gaz.status = STB_STATUS_CALCULATING; }//during stabilization + peRes->peFace[k].gaz.conf = STB_CONF_NO_DATA;//no Confidence + tmpVal = 0; + for( i = 0; i < recCnt ; i++ ) { tmpVal += recVal[ i ] ; } + if ( recCnt == 0 ) { recCnt = 1 ; } + peRes->peFace[k].gaz.LR = tmpVal / recCnt; + // gazeUD ------------------------------------------------------------------------------------------------- + recCnt = 0; + for( t = 0; t < STB_PE_BACK_MAX ; t++) + { + for( i = 0; i < peRec[t].num ; i++) //a number of tracking people(previous t frame) + { + if( + peRec[t].fcDet[i].nTraID == trID //the same tracking number + && peRec[t].fcDet[i].nDetID >= 0 //not lost + && peRec[t].fcDet[i].dirDetConf >= dirThr // Face angle : confidence + && peRec[t].fcDet[i].dirDetPitch >= dirUDMin // Face angle : pitch + && peRec[t].fcDet[i].dirDetPitch <= dirUDMax // Face angle : pitch + && peRec[t].fcDet[i].dirDetYaw >= dirLRMin // Face angle : yaw + && peRec[t].fcDet[i].dirDetYaw <= dirLRMax // Face angle : yaw + && peRec[t].fcDet[i].gazDetUD != STB_ERR_PE_CANNOT // + ) + { + recVal[ recCnt ] = peRec[ t ].fcDet [ i ].gazDetUD ; + recCnt++; + } + } + } + tmpVal = 0; + for( i = 0; i < recCnt ; i++ ) { tmpVal += recVal[ i ] ; } + if ( recCnt == 0 ) { recCnt = 1 ; } + peRes->peFace[k].gaz.UD = tmpVal / recCnt; + } + + + // expression ------------------------------------------------------------------------------------------------- + if( execFlg->exp == STB_TRUE ) + { + recCnt = 0; + for( t = 0; t < STB_PE_BACK_MAX ; t++) + { + for( i = 0; i < peRec[t].num ; i++) //a number of tracking people(previous t frame) + { + if( + peRec[t].fcDet[i].nTraID == trID //the same tracking number + && peRec[t].fcDet[i].nDetID >= 0 //not lost + && peRec[t].fcDet[i].dirDetConf >= dirThr // Face angle : confidence + && peRec[t].fcDet[i].dirDetPitch >= dirUDMin // Face angle : pitch + && peRec[t].fcDet[i].dirDetPitch <= dirUDMax // Face angle : pitch + && peRec[t].fcDet[i].dirDetYaw >= dirLRMin // Face angle : yaw + && peRec[t].fcDet[i].dirDetYaw <= dirLRMax // Face angle : yaw + && peRec[t].fcDet[i].expDetConf != STB_ERR_PE_CANNOT // + ) + { + recVal[ recCnt ] = PeExpressID ( peRec[ t ].fcDet[i].expDetVal ); + recCnt++; + } + } + } + for( i = 0; i < STB_EX_MAX; i++ ) { expVal[ i ] = 0 ; } + for( i = 0; i < recCnt ; i++ ) { expVal[ recVal[ i ] ] += 1 ; } + peRes->peFace[k].exp.value = PeExpressID ( expVal ); + peRes->peFace[k].exp.conf = STB_CONF_NO_DATA;//no Confidence + if ( recCnt == 0 ) { peRes->peFace[k].exp.status = STB_STATUS_NO_DATA ; }//stabilization impossible + else { peRes->peFace[k].exp.status = STB_STATUS_CALCULATING; }//during stabilization + } + + // blink L ------------------------------------------------------------------------------------------------- + if( execFlg->bli == STB_TRUE ) + { + recCnt = 0; + for( t = 0; t < STB_PE_BACK_MAX ; t++) + { + for( i = 0; i < peRec[t].num ; i++) //a number of tracking people(previous t frame) + { + if( + peRec[t].fcDet[i].nTraID == trID //the same tracking number + && peRec[t].fcDet[i].nDetID >= 0 //not lost + && peRec[t].fcDet[i].dirDetConf >= dirThr // Face angle : confidence + && peRec[t].fcDet[i].dirDetPitch >= dirUDMin // Face angle : pitch + && peRec[t].fcDet[i].dirDetPitch <= dirUDMax // Face angle : pitch + && peRec[t].fcDet[i].dirDetYaw >= dirLRMin // Face angle : yaw + && peRec[t].fcDet[i].dirDetYaw <= dirLRMax // Face angle : yaw + && peRec[t].fcDet[i].bliDetL != STB_ERR_PE_CANNOT // + ) + { + recVal[ recCnt ] = peRec[ t ].fcDet[ i ].bliDetL ; + recCnt++; + } + } + } + if ( recCnt == 0 ) { peRes->peFace[k].bli.status = STB_STATUS_NO_DATA ; }//stabilization impossible + else { peRes->peFace[k].bli.status = STB_STATUS_CALCULATING; }//during stabilization + tmpVal = 0; + for( i = 0; i < recCnt ; i++ ) { tmpVal += recVal[ i ] ; } + if ( recCnt == 0 ) { recCnt = 1 ; } + peRes->peFace[k].bli.ratioL = tmpVal / recCnt; + // blink R ------------------------------------------------------------------------------------------------- + recCnt = 0; + for( t = 0; t < STB_PE_BACK_MAX ; t++) + { + for( i = 0; i < peRec[t].num ; i++) //a number of tracking people(previous t frame) + { + if( + peRec[t].fcDet[i].nTraID == trID //the same tracking number + && peRec[t].fcDet[i].nDetID >= 0 //not lost + && peRec[t].fcDet[i].dirDetConf >= dirThr // Face angle : confidence + && peRec[t].fcDet[i].dirDetPitch >= dirUDMin // Face angle : pitch + && peRec[t].fcDet[i].dirDetPitch <= dirUDMax // Face angle : pitch + && peRec[t].fcDet[i].dirDetYaw >= dirLRMin // Face angle : yaw + && peRec[t].fcDet[i].dirDetYaw <= dirLRMax // Face angle : yaw + && peRec[t].fcDet[i].bliDetR != STB_ERR_PE_CANNOT // + ) + { + recVal[ recCnt ] = peRec[ t ].fcDet [ i ].bliDetR; + recCnt++; + } + } + } + tmpVal = 0; + for( i = 0; i < recCnt ; i++ ) { tmpVal += recVal[ i ] ; } + if ( recCnt == 0 ) { recCnt = 1 ; } + peRes->peFace[k].bli.ratioR = tmpVal / recCnt; + } + + + + // dirYaw ------------------------------------------------------------------------------------------------- + if( execFlg->dir == STB_TRUE ) + { + recCnt = 0; + for( t = 0; t < STB_PE_BACK_MAX ; t++) + { + for( i = 0; i < peRec[t].num ; i++) //a number of tracking people(previous t frame) + { + if( + peRec[t].fcDet[i].nTraID == trID //the same tracking number + && peRec[t].fcDet[i].nDetID >= 0 //not lost + && peRec[t].fcDet[i].dirDetConf >= dirThr // Face angle : confidence + && peRec[t].fcDet[i].dirDetPitch >= dirUDMin // Face angle : pitch + && peRec[t].fcDet[i].dirDetPitch <= dirUDMax // Face angle : pitch + && peRec[t].fcDet[i].dirDetYaw >= dirLRMin // Face angle : yaw + && peRec[t].fcDet[i].dirDetYaw <= dirLRMax // Face angle : yaw + ) + { + recVal[ recCnt ] = peRec[ t ].fcDet [ i ].dirDetYaw ; + recCnt++; + } + } + } + if ( recCnt == 0 ) { peRes->peFace[k].dir.status = STB_STATUS_NO_DATA ; }//stabilization impossible + else { peRes->peFace[k].dir.status = STB_STATUS_CALCULATING; }//during stabilization + peRes->peFace[k].dir.conf = STB_CONF_NO_DATA;//no Confidence + tmpVal = 0; + for( i = 0; i < recCnt ; i++ ) { tmpVal += recVal[ i ] ; } + if ( recCnt == 0 ) { recCnt = 1 ; } + peRes->peFace[k].dir.yaw = tmpVal / recCnt; + // dirRoll ------------------------------------------------------------------------------------------------- + recCnt = 0; + for( t = 0; t < STB_PE_BACK_MAX ; t++) + { + for( i = 0; i < peRec[t].num ; i++) //a number of tracking people(previous t frame) + { + if( + peRec[t].fcDet[i].nTraID == trID //the same tracking number + && peRec[t].fcDet[i].nDetID >= 0 //not lost + && peRec[t].fcDet[i].dirDetConf >= dirThr // Face angle : confidence + && peRec[t].fcDet[i].dirDetPitch >= dirUDMin // Face angle : pitch + && peRec[t].fcDet[i].dirDetPitch <= dirUDMax // Face angle : pitch + && peRec[t].fcDet[i].dirDetYaw >= dirLRMin // Face angle : yaw + && peRec[t].fcDet[i].dirDetYaw <= dirLRMax // Face angle : yaw + ) + { + recVal[ recCnt ] = peRec[ t ].fcDet [ i ].dirDetRoll; + recCnt++; + } + } + } + tmpVal = 0; + for( i = 0; i < recCnt ; i++ ) { tmpVal += recVal[ i ] ; } + if ( recCnt == 0 ) { recCnt = 1 ; } + peRes->peFace[k].dir.roll = tmpVal / recCnt; + // dirPitch ------------------------------------------------------------------------------------------------- + recCnt = 0; + for( t = 0; t < STB_PE_BACK_MAX ; t++) + { + for( i = 0; i < peRec[t].num ; i++) //a number of tracking people(previous t frame) + { + if( + peRec[t].fcDet[i].nTraID == trID //the same tracking number + && peRec[t].fcDet[i].nDetID >= 0 //not lost + && peRec[t].fcDet[i].dirDetConf >= dirThr // Face angle : confidence + && peRec[t].fcDet[i].dirDetPitch >= dirUDMin // Face angle : pitch + && peRec[t].fcDet[i].dirDetPitch <= dirUDMax // Face angle : pitch + && peRec[t].fcDet[i].dirDetYaw >= dirLRMin // Face angle : yaw + && peRec[t].fcDet[i].dirDetYaw <= dirLRMax // Face angle : yaw + ) + { + recVal[ recCnt ] = peRec[ t ].fcDet [ i ].dirDetPitch ; + recCnt++; + } + } + } + tmpVal = 0; + for( i = 0; i < recCnt ; i++ ) { tmpVal += recVal[ i ] ; } + if ( recCnt == 0 ) { recCnt = 1 ; } + peRes->peFace[k].dir.pitch = tmpVal / recCnt; + } + + }//for( k = 0; k < peRes->peCnt ; k++) + +} +/*---------------------------------------------------------------------*/ +// StbPeExec +/*---------------------------------------------------------------------*/ +int StbPeExec ( PEHANDLE handle ) +{ + + int retVal = 0 ; + + /* Face --------------------------------------*/ + PeSlideFacesRec ( handle->peDetRec , + handle->execFlg );//Shift the time series of past data before stabilization. + PeCurFaces ( handle->peDetRec , + &(handle->peDet) , + handle->execFlg );//Setting "present data before the stabilization" to past data before the stabilization. + + PeStbFaceEasy ( &(handle->peRes) , + handle->peDetRec , + handle->peFaceDirThr , + handle->peFaceDirUDMax , + handle->peFaceDirUDMin , + handle->peFaceDirLRMax , + handle->peFaceDirLRMin , + handle->peFrameCount , + handle->execFlg );//Calculate "current data after stabilization" from "past data before stabilization". + + + + + return retVal; +} + + + diff --git a/src/b5t007001/stblib/src/STB_Property/STBPeAPI.h b/src/b5t007001/stblib/src/STB_Property/STBPeAPI.h new file mode 100644 index 00000000..36649cf2 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Property/STBPeAPI.h @@ -0,0 +1,22 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "PeInterface.h" + +int StbPeExec ( PEHANDLE handle ); + + + diff --git a/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.c b/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.c new file mode 100644 index 00000000..b0883dff --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.c @@ -0,0 +1,103 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "STBPeValidValue.h" + +/*Value range check*/ +#define IS_OUT_RANGE( val , min , max ) ( ( (val) < (min) ) || ( (max) < (val) ) ) +#define IS_OUT_VALUE( val , min , max , accept ) ( IS_OUT_RANGE( val , min , max ) && ( (val) != (accept) ) ) +#define IS_OUT_FR_UID( val , min , max , acceptA , acceptB , acceptC ) ( IS_OUT_RANGE( val , min , max ) && ( (val) != (acceptA) ) && ( (val) != (acceptB) ) && ( (val) != (acceptC) ) ) + +/*------------------------------------------------------------------------------------------------------------------*/ +/* STB_PeIsValidValue */ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 STB_PeIsValidValue(const STB_PE_DET *input, STBExecFlg *execFlg) +{ + STB_INT32 i ,j; + + if( execFlg->gen == STB_TRUE + || execFlg->age == STB_TRUE + || execFlg->fr == STB_TRUE + || execFlg->exp == STB_TRUE + || execFlg->dir == STB_TRUE + || execFlg->gaz == STB_TRUE + || execFlg->bli == STB_TRUE + ) + { + for( i = 0 ; i < input->num ; i++) + { + if( IS_OUT_VALUE( input->fcDet[i].dirDetYaw , STB_FACE_DIR_LR_MIN , STB_FACE_DIR_LR_MAX , STB_ERR_DIR_CANNOT ) ){ return STB_FALSE;} + if( IS_OUT_VALUE( input->fcDet[i].dirDetPitch , STB_FACE_DIR_UD_MIN , STB_FACE_DIR_UD_MAX , STB_ERR_DIR_CANNOT ) ){ return STB_FALSE;} + if( IS_OUT_VALUE( input->fcDet[i].dirDetRoll , STB_FACE_DIR_ROLL_MIN , STB_FACE_DIR_ROLL_MAX , STB_ERR_DIR_CANNOT ) ){ return STB_FALSE;} + if( IS_OUT_VALUE( input->fcDet[i].dirDetConf , STB_FACE_DIR_CONF_MIN , STB_FACE_DIR_CONF_MAX , STB_ERR_PE_CANNOT ) ){ return STB_FALSE;} + } + } + + + if( execFlg->age == STB_TRUE ) + { + for( i = 0 ; i < input->num ; i++) + { + if( IS_OUT_VALUE( input->fcDet[i].ageDetVal , STB_FACE_AGE_VAL_MIN , STB_FACE_AGE_VAL_MAX ,STB_ERR_PE_CANNOT ) ){ return STB_FALSE;} + if( IS_OUT_VALUE( input->fcDet[i].ageDetConf , STB_FACE_AGE_CONF_MIN , STB_FACE_AGE_CONF_MAX ,STB_ERR_PE_CANNOT ) ){ return STB_FALSE;} + } + } + + if( execFlg->gen == STB_TRUE ) + { + for( i = 0 ; i < input->num ; i++) + { + if( IS_OUT_VALUE( input->fcDet[i].genDetVal , STB_FACE_GEN_VAL_MIN , STB_FACE_GEN_VAL_MAX ,STB_ERR_PE_CANNOT ) ){ return STB_FALSE;} + if( IS_OUT_VALUE( input->fcDet[i].genDetConf , STB_FACE_GEN_CONF_MIN , STB_FACE_GEN_CONF_MAX ,STB_ERR_PE_CANNOT ) ){ return STB_FALSE;} + } + } + + if( execFlg->gaz == STB_TRUE ) + { + for( i = 0 ; i < input->num ; i++) + { + if( IS_OUT_VALUE( input->fcDet[i].gazDetLR , STB_FACE_GAZE_LR_MIN , STB_FACE_GAZE_LR_MAX ,STB_ERR_PE_CANNOT ) ){ return STB_FALSE;} + if( IS_OUT_VALUE( input->fcDet[i].gazDetUD , STB_FACE_GAZE_UD_MIN , STB_FACE_GAZE_UD_MAX ,STB_ERR_PE_CANNOT ) ){ return STB_FALSE;} + } + } + + if( execFlg->bli == STB_TRUE ) + { + for( i = 0 ; i < input->num ; i++) + { + if( IS_OUT_VALUE( input->fcDet[i].bliDetL , STB_FACE_BLI_L_MIN , STB_FACE_BLI_L_MAX ,STB_ERR_PE_CANNOT) ){ return STB_FALSE;} + if( IS_OUT_VALUE( input->fcDet[i].bliDetR , STB_FACE_BLI_R_MIN , STB_FACE_BLI_R_MAX ,STB_ERR_PE_CANNOT) ){ return STB_FALSE;} + } + } + + if( execFlg->exp == STB_TRUE ) + { + for( i = 0 ; i < input->num ; i++) + { + if( IS_OUT_VALUE( input->fcDet[i].expDetConf, STB_FACE_EXP_DEG_MIN , STB_FACE_EXP_DEG_MAX ,STB_ERR_PE_CANNOT) ){ return STB_FALSE;} + for( j = 0 ; j < STB_EX_MAX ; j++) + { + if( IS_OUT_VALUE( input->fcDet[i].expDetVal[j] ,STB_FACE_EXP_SCORE_MIN , STB_FACE_EXP_SCORE_MAX ,STB_ERR_PE_CANNOT) ){ return STB_FALSE;} + } + + } + } + + + + + return STB_TRUE; +} \ No newline at end of file diff --git a/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.h b/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.h new file mode 100644 index 00000000..d7b5cfb4 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Property/STBPeValidValue.h @@ -0,0 +1,96 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef STBPEVALIDVALUE_H__ +#define STBPEVALIDVALUE_H__ + + +#include "STBCommonDef.h" +#include "STBCommonType.h" +#include "STBPeTypedef.h" + +/*-------------------------------------------------------------------*/ +/*Threshold for checking input value*/ +/*-------------------------------------------------------------------*/ +#define STB_BODY_CNT_MIN 0 // body +#define STB_BODY_CNT_MAX 35 +#define STB_BODY_XY_MIN 0 +#define STB_BODY_XY_MAX 8191 +#define STB_BODY_SIZE_MIN 20 +#define STB_BODY_SIZE_MAX 8192 +#define STB_BODY_CONF_MIN 0 +#define STB_BODY_CONF_MAX 1000 +#define STB_FACE_CNT_MIN 0 // face +#define STB_FACE_CNT_MAX 35 +#define STB_FACE_XY_MIN 0 +#define STB_FACE_XY_MAX 8191 +#define STB_FACE_SIZE_MIN 20 +#define STB_FACE_SIZE_MAX 8192 +#define STB_FACE_CONF_MIN 0 +#define STB_FACE_CONF_MAX 1000 +#define STB_FACE_DIR_LR_MIN -180 +#define STB_FACE_DIR_LR_MAX 179 +#define STB_FACE_DIR_UD_MIN -180 +#define STB_FACE_DIR_UD_MAX 179 +#define STB_FACE_DIR_ROLL_MIN -180 +#define STB_FACE_DIR_ROLL_MAX 179 +#define STB_FACE_DIR_CONF_MIN 0 +#define STB_FACE_DIR_CONF_MAX 1000 +#define STB_FACE_AGE_VAL_MIN 0 +#define STB_FACE_AGE_VAL_MAX 75 +#define STB_FACE_AGE_CONF_MIN 0 +#define STB_FACE_AGE_CONF_MAX 1000 +#define STB_FACE_GEN_VAL_MIN 0 +#define STB_FACE_GEN_VAL_MAX 1 +#define STB_FACE_GEN_CONF_MIN 0 +#define STB_FACE_GEN_CONF_MAX 1000 +#define STB_FACE_GAZE_LR_MIN -90 +#define STB_FACE_GAZE_LR_MAX 90 +#define STB_FACE_GAZE_UD_MIN -90 +#define STB_FACE_GAZE_UD_MAX 90 +#define STB_FACE_BLI_L_MIN 1 +#define STB_FACE_BLI_L_MAX 1000 +#define STB_FACE_BLI_R_MIN 1 +#define STB_FACE_BLI_R_MAX 1000 +#define STB_FACE_EXP_SCORE_MIN 0 +#define STB_FACE_EXP_SCORE_MAX 100 /* not 1000 */ +#define STB_FACE_EXP_DEG_MIN -100 +#define STB_FACE_EXP_DEG_MAX 100 +#define STB_FACE_FR_UID_MIN 0 +#define STB_FACE_FR_UID_MAX 499 +#define STB_FACE_FR_SCORE_MIN 0 +#define STB_FACE_FR_SCORE_MAX 1000 + +/*-------------------------------------------------------------------*/ +/*Permitted input value*/ +/*-------------------------------------------------------------------*/ +#define STB_ERR_PE_CANNOT -128 /*Estimation is not possible.*/ +#define STB_ERR_FR_CANNOT -128 /*Recognition impossible*/ +#define STB_ERR_FR_NOID -1 /*No corresponding ID*/ +#define STB_ERR_FR_NOALBUM -127 /*Not-registered in Album*/ + +/*-------------------------------------------------------------------*/ +/*For collaboration with child library*/ +/*-------------------------------------------------------------------*/ +#define STB_ERR_DIR_CANNOT -256 /*Unable to angle estimation*/ + +/*-------------------------------------------------------------------*/ +/* Func */ +/*-------------------------------------------------------------------*/ +STB_INT32 STB_PeIsValidValue(const STB_PE_DET *input, STBExecFlg *execFlg); + +#endif /* COMMONDEF_H__ */ + diff --git a/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.c b/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.c new file mode 100644 index 00000000..e2d0816d --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.c @@ -0,0 +1,80 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "SdkSTBPe.h" +#include "PeInterface.h" + +/*This layer only defines the API function */ + +/*Create/Delete handle*/ +STB_PE_HANDLE STB_Pe_CreateHandle( const STBExecFlg* execFlg ,const STB_INT32 nTraCntMax ){ + return (STB_PE_HANDLE)PeCreateHandle( execFlg , nTraCntMax ); +} + +STB_INT32 STB_Pe_DeleteHandle(STB_PE_HANDLE handle){ + return PeDeleteHandle((PEHANDLE)handle); +} + +/*set frame information*/ +STB_INT32 STB_Pe_SetDetect(STB_PE_HANDLE handle,const STB_PE_DET *stbPeDet){ + return PeSetDetect((PEHANDLE)handle,stbPeDet); +} + +/*Main process execution*/ +STB_INT32 STB_Pe_Execute(STB_PE_HANDLE handle){ + return PeExecute((PEHANDLE)handle); +} + +/*get the result*/ +STB_INT32 STB_Pe_GetResult(STB_PE_HANDLE handle, STB_PE_RES* peResult){ + return PeGetResult((PEHANDLE)handle,peResult); +} +STB_INT32 STB_Pe_Clear ( STB_PE_HANDLE handle ) +{ + return PeClear((PEHANDLE)handle ); +} + + + +/* FaceDirMinMax */ +STB_INT32 STB_Pe_SetFaceDirMinMax ( STB_PE_HANDLE handle , STB_INT32 nMinUDAngle , STB_INT32 nMaxUDAngle ,STB_INT32 nMinLRAngle , STB_INT32 nMaxLRAngle ) +{ + return PeSetFaceDirMinMax((PEHANDLE)handle,nMinUDAngle,nMaxUDAngle,nMinLRAngle,nMaxLRAngle ); +} +STB_INT32 STB_Pe_GetFaceDirMinMax ( STB_PE_HANDLE handle , STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle ,STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle) +{ + return PeGetFaceDirMinMax((PEHANDLE)handle,pnMinUDAngle,pnMaxUDAngle, pnMinLRAngle,pnMaxLRAngle); +} +/* FaceDirThreshold */ +STB_INT32 STB_Pe_SetFaceDirThreshold ( STB_PE_HANDLE handle , STB_INT32 threshold ) +{ + return PeSetFaceDirThreshold((PEHANDLE)handle,threshold ); +} +STB_INT32 STB_Pe_GetFaceDirThreshold ( STB_PE_HANDLE handle , STB_INT32* threshold ) +{ + return PeGetFaceDirThreshold((PEHANDLE)handle,threshold ); +} + +/* FrameCount */ +STB_INT32 STB_Pe_SetFrameCount ( STB_PE_HANDLE handle , STB_INT32 nFrameCount ) +{ + return PeSetFrameCount((PEHANDLE)handle,nFrameCount ); +} +STB_INT32 STB_Pe_GetFrameCount ( STB_PE_HANDLE handle , STB_INT32* nFrameCount ) +{ + return PeGetFrameCount((PEHANDLE)handle,nFrameCount ); +} + diff --git a/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.h b/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.h new file mode 100644 index 00000000..01ed7670 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Property/SdkSTBPe.h @@ -0,0 +1,41 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#if !defined( _SDK_STBPE_H_ ) +#define _SDK_STBPE_H_ +#include "STBPeTypedef.h" + +#if !defined( STB_DEF_PE_HANDLE ) + #define STB_DEF_PE_HANDLE + typedef VOID* STB_PE_HANDLE; +#endif + +STB_PE_HANDLE STB_Pe_CreateHandle ( const STBExecFlg* execFlg ,const STB_INT32 nTraCntMax );/*Create/Delete handle*/ +STB_INT32 STB_Pe_DeleteHandle ( STB_PE_HANDLE handle );/*Create/Delete handle*/ +STB_INT32 STB_Pe_SetDetect ( STB_PE_HANDLE handle, const STB_PE_DET *stbPeDet );/*Frame information settings*/ +STB_INT32 STB_Pe_Execute ( STB_PE_HANDLE handle );/*Main process execution*/ +STB_INT32 STB_Pe_GetResult ( STB_PE_HANDLE handle, STB_PE_RES* peResult );/*Get result*/ + +/*parameter*/ +STB_INT32 STB_Pe_SetFaceDirMinMax ( STB_PE_HANDLE handle , STB_INT32 nMinUDAngle , STB_INT32 nMaxUDAngle ,STB_INT32 nMinLRAngle , STB_INT32 nMaxLRAngle );/* FaceDirMinMax */ +STB_INT32 STB_Pe_GetFaceDirMinMax ( STB_PE_HANDLE handle , STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle ,STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle); +STB_INT32 STB_Pe_Clear ( STB_PE_HANDLE handle );/* Clear */ +STB_INT32 STB_Pe_SetFaceDirThreshold ( STB_PE_HANDLE handle , STB_INT32 threshold );/* FaceDirThreshold */ +STB_INT32 STB_Pe_GetFaceDirThreshold ( STB_PE_HANDLE handle , STB_INT32* threshold ); +STB_INT32 STB_Pe_SetFrameCount ( STB_PE_HANDLE handle , STB_INT32 nFrameCount ); +STB_INT32 STB_Pe_GetFrameCount ( STB_PE_HANDLE handle , STB_INT32* nFrameCount ); + +#endif diff --git a/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.c b/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.c new file mode 100644 index 00000000..1aa61a9c --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.c @@ -0,0 +1,469 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "STBTrAPI.h" + +#define STB_INT_MAX 2147483647 /* maximum (signed) int value */ + +/*---------------------------------------------------------------------*/ +// TrSlideRec +/*---------------------------------------------------------------------*/ +void TrSlideRec ( ROI_SYS *rec ) +{ + STB_INT32 t , i ; + + for( t = STB_TR_BACK_MAX - 2 ; t >= 0 ; t-- ) + { + rec [ t + 1 ].cnt = rec[ t + 0 ].cnt; + for( i = 0 ; i < rec [ t + 1 ].cnt ; i++ ) + { + rec [ t + 1 ].nDetID [i] = rec [ t ].nDetID [i] ; + rec [ t + 1 ].nTraID [i] = rec [ t ].nTraID [i] ; + rec [ t + 1 ].posX [i] = rec [ t ].posX [i] ; + rec [ t + 1 ].posY [i] = rec [ t ].posY [i] ; + rec [ t + 1 ].size [i] = rec [ t ].size [i] ; + rec [ t + 1 ].conf [i] = rec [ t ].conf [i] ; + rec [ t + 1 ].retryN [i] = rec [ t ].retryN [i] ; + } + } +} +/*---------------------------------------------------------------------*/ +// TrCurRec +/*---------------------------------------------------------------------*/ +void TrCurRec ( ROI_SYS *rec , ROI_DET *det , STB_INT32 num) +{ + STB_INT32 i ; + + + rec [ 0 ].cnt =num; + for( i = 0 ; i < rec [ 0 ].cnt ; i++ ) + { + rec [ 0 ].nDetID [i] = i ; + rec [ 0 ].nTraID [i] = -1 ; + rec [ 0 ].posX [i] = det[i].posX ; + rec [ 0 ].posY [i] = det[i].posY ; + rec [ 0 ].size [i] = det[i].size ; + rec [ 0 ].conf [i] = det[i].conf ; + rec [ 0 ].retryN [i] = 0 ; + } + +} + + +/*---------------------------------------------------------------------*/ +// TrDelRetry +/*---------------------------------------------------------------------*/ +void +TrDelRetry( ROI_SYS *preData , STB_INT32 thrRetryCnt ) +{ + //delete data exceeding the number of retries + //If the face isn't find out during tracking, set until how many frames can look for it. + //If tracking fails for the specified number of consecutive frames, tracking is terminated assuming that face is lost. + STB_INT32 i, tmpCnt ; + + tmpCnt = 0; + for( i = 0 ; i < preData->cnt ; i++ ) + { + if( preData->retryN[i] <= thrRetryCnt ) + { + + preData->nDetID [tmpCnt ] = preData->nDetID [i] ; + preData->nTraID [tmpCnt ] = preData->nTraID [i] ; + preData->posX [tmpCnt ] = preData->posX [i] ; + preData->posY [tmpCnt ] = preData->posY [i] ; + preData->size [tmpCnt ] = preData->size [i] ; + preData->conf [tmpCnt ] = preData->conf [i] ; + preData->retryN [tmpCnt ] = preData->retryN [i] ; + tmpCnt++; + } + } + preData->cnt = tmpCnt ; + + +} +/*---------------------------------------------------------------------*/ +// TrCheckSameROI +/*---------------------------------------------------------------------*/ +STB_INT32 +TrCheckSameROI( STB_INT32 curX ,STB_INT32 curY ,STB_INT32 curS , + STB_INT32 preX ,STB_INT32 preY ,STB_INT32 preS + ) +{ + + STB_INT32 difP ;//the percentage of detection position change + STB_INT32 difS ;//the percentage of detection size change + float tmpVal; + STB_INT32 retVal; + + if( preS < 1 ) + { + return STB_INT_MAX; + } + + //the percentage of detect position change + //It is "Absolute value of detected position change amount from previous frame / Detected size of previous frame * 100". + tmpVal = (float)sqrt( (float) (preX-curX)*(preX-curX) + (preY-curY)*(preY-curY) ); + difP = (STB_INT32)( tmpVal * 100 / preS ); + //the percentage of detect size change + //It is "Absolute value of detected size change amount from previous frame / Detected size of previous frame * 100". + tmpVal = (float)(preS-curS); + if( tmpVal < 0 ) + { + tmpVal *= (-1); + } + difS = (STB_INT32)( tmpVal * 100 / preS ); + retVal = (difP+1)*(difS+1); + + return retVal;//The return value is the similarity of the rectangle. Always a value more than or equal to zero. The closer to zero, the more similar they are. + +} +/*---------------------------------------------------------------------*/ +// TrSetDistTbl +/*---------------------------------------------------------------------*/ +void +TrSetDistTbl + ( + STB_INT32 *dst , + ROI_SYS *curData , + ROI_SYS *preData , + STB_INT32 traCntMax + ) +{ + STB_INT32 ip ,ic ; + STB_INT32 distMax = STB_INT_MAX; + + // init + for( ip = 0 ; ip < traCntMax ; ip++ ) + { + for( ic = 0 ; ic < traCntMax ; ic++ ) + { + dst [ ip * traCntMax + ic ] = distMax; + } + } + + + for( ip = 0 ; ip < preData->cnt ; ip++ ) + { + for( ic = 0 ; ic < curData->cnt ; ic++ ) + { + dst [ ip * traCntMax + ic ] + = TrCheckSameROI//The return value is the similarity of the rectangle. Always a value more than or equal to zero. The closer to zero, the more similar they are. + ( + curData->posX[ic],curData->posY[ic],curData->size[ic], + preData->posX[ip],preData->posY[ip],preData->size[ip] + ); + } + } + +} +/*---------------------------------------------------------------------*/ +// TrSteadinessXYS +/*---------------------------------------------------------------------*/ +void +TrSteadinessXYS + ( + STB_INT32 curX ,STB_INT32 curY ,STB_INT32 curS , + STB_INT32 preX ,STB_INT32 preY ,STB_INT32 preS , + STB_INT32* dstX ,STB_INT32* dstY ,STB_INT32* dstS , + STB_INT32 thrP ,STB_INT32 thrS + ) +{ + + STB_INT32 difP ;//the percentage of detection position change + STB_INT32 difS ;//the percentage of detection size change + float tmpVal; + + + if( preS < 1 ) + { + *dstX = curX ; *dstY = curY ; *dstS = curS ; + return ; + } + + //the percentage of detect position change + //It is "Absolute value of detected position change amount from previous frame / Detected size of previous frame * 100". + tmpVal = (float)sqrt( (float) (preX-curX)*(preX-curX) + (preY-curY)*(preY-curY) ); + difP = (STB_INT32)( tmpVal * 100 / preS ); + if( difP <= thrP ) + { + *dstX = preX ; *dstY = preY ; + }else + { + *dstX = curX ; *dstY = curY ; + } + + //the percentage of detect size change + //It is "Absolute value of detected size change amount from previous frame / Detected size of previous frame * 100". + tmpVal = (float)(preS-curS); + if( tmpVal < 0 ) + { + tmpVal *= (-1); + } + difS = (STB_INT32)( tmpVal * 100 / preS ); + if( difS <= thrS ) + { + *dstS = preS ; + }else + { + *dstS = curS ; + } + +} +/*---------------------------------------------------------------------*/ +// TrStabilizeTR +/*---------------------------------------------------------------------*/ +void TrStabilizeTR + ( + ROI_SYS *wData , //present data after the stabilization + STB_INT32 *wCnt , //a number of present data after the stabilization + ROI_SYS *rec , //past data + STB_INT32 *cntAcc , + TRHANDLE handle + ) +{ + + STB_INT32 stedinessPos = handle->stedPos ; + STB_INT32 stedinessSize = handle->stedSize ; + STB_INT32 thrRetryCnt = handle->retryCnt ; + STB_INT32 traCntMax = handle->traCntMax ; + STB_INT32 *idPreCur = handle->wIdPreCur ; + STB_INT32 *idCurPre = handle->wIdCurPre ; + STB_INT32 *dstTbl = handle->wDstTbl ; + ROI_SYS *curData = &rec[0];//current frame data + ROI_SYS *preData = &rec[1];//previous frame data + STB_INT32 tmpAccCnt ; + STB_INT32 ip ,ic ; + STB_INT32 ipp ,icc ; + STB_INT32 tmpWCnt ; + STB_INT32 tmpVal ; + STB_INT32 tmpX,tmpY,tmpS ; + const STB_INT32 LinkNot = -1 ; + + + //------------------------------------------------------------------------------// + //Initialization + //------------------------------------------------------------------------------// + for( ip = 0 ; ip < traCntMax ; ip++ ) + { + idPreCur[ip] = LinkNot; + idCurPre[ip] = LinkNot; + } + + + //------------------------------------------------------------------------------// + //previous preparation + //------------------------------------------------------------------------------// + //Delete the data exceeding the retry count from the previous frame data. + TrDelRetry ( preData ,thrRetryCnt ); + + + //------------------------------------------------------------------------------// + //main processing + //------------------------------------------------------------------------------// + tmpWCnt = 0 ;//a number of present data after the stabilization + + // "It's reflected in the previous frame" and "It's reflected in the current frame". + //Create dstTbl. The value of dstTbl is the similarity of the rectangle. Always a value more than or equal to zero. The closer to zero, the more similar they are. + TrSetDistTbl( dstTbl,curData,preData, traCntMax); + for( ;; ) + { + //Get the combination (icc, ipp) that minimizes the value of dstTbl. + tmpVal = STB_INT_MAX; icc = -1; ipp = -1; + for( ic = 0 ; ic < curData->cnt ; ic++ ) + { + for( ip = 0 ; ip < preData->cnt ; ip++ ) + { + if( tmpVal > dstTbl [ ip * traCntMax + ic ] ) + { + tmpVal = dstTbl [ ip * traCntMax + ic ] ; icc = ic; ipp = ip; + } + } + } + if( tmpVal == STB_INT_MAX ) + { + break; + } + + //Link ipp and icc + idCurPre[ icc ] = ipp ; + idPreCur[ ipp ] = icc ; + // steadiness + TrSteadinessXYS + ( + curData->posX[icc] ,curData->posY[icc] ,curData->size[icc] , + preData->posX[ipp] ,preData->posY[ipp] ,preData->size[ipp] , + &tmpX ,&tmpY ,&tmpS , + stedinessPos ,stedinessSize + ); + // set + wData->nTraID[tmpWCnt] = preData->nTraID[ipp]; + wData->nDetID[tmpWCnt] = curData->nDetID[icc]; + wData->posX [tmpWCnt] = tmpX ; + wData->posY [tmpWCnt] = tmpY ; + wData->size [tmpWCnt] = tmpS ; + wData->conf [tmpWCnt] = ( ( curData->conf[icc] + preData->conf[ipp] ) /2 ); + wData->retryN[tmpWCnt] = 0 ;//"It's reflected(linked) in the current frame"so that 0. + tmpWCnt++; + //Renewal "dstTbl" not to refer the associated data. + for( ic = 0 ; ic < curData->cnt ; ic++ ) + { + dstTbl [ ipp * traCntMax + ic ] = STB_INT_MAX ; + } + for( ip = 0 ; ip < preData->cnt ; ip++ ) + { + dstTbl [ ip * traCntMax + icc ] = STB_INT_MAX ; + } + + if( tmpWCnt == traCntMax ) + { + *wCnt = tmpWCnt; + return; + } + } + + // "It is reflected in the previous frame" and "It is not reflected in the current frame". + for( ip = 0 ; ip < preData->cnt ; ip++ ) //"It's reflected in the previous frame" + { + if( idPreCur[ip] == LinkNot ) //"It's not reflected in the current frame" + { + // set + wData->nTraID[tmpWCnt] = preData->nTraID[ip]; + wData->nDetID[tmpWCnt] = -1;//"It's not reflected in the current frame so the detection number is -1" + wData->posX [tmpWCnt] = preData->posX [ip]; + wData->posY [tmpWCnt] = preData->posY [ip]; + wData->size [tmpWCnt] = preData->size [ip]; + wData->conf [tmpWCnt] = preData->conf[ip]; + wData->retryN[tmpWCnt] = preData->retryN[ip] + 1 ;//"It's not reflected in the current frame"so that +1. + tmpWCnt++; + } + if( tmpWCnt == traCntMax) + { + *wCnt = tmpWCnt ; + return; + } + } + + // "It is not reflected in the previous frame" and "It is reflected in the current frame". + tmpAccCnt = *cntAcc; + for( ic = 0 ; ic < curData->cnt ; ic++ ) //"It's reflected in the current frame" + { + if( idCurPre[ic] == LinkNot ) //"It's not reflected in the previous frame" + { + // set + wData->nTraID[tmpWCnt] = tmpAccCnt; + wData->nDetID[tmpWCnt] = curData->nDetID[ic]; + wData->posX [tmpWCnt] = curData->posX [ic]; + wData->posY [tmpWCnt] = curData->posY [ic]; + wData->size [tmpWCnt] = curData->size [ic]; + wData->conf [tmpWCnt] = curData->conf[ic]; + wData->retryN[tmpWCnt] = 0 ;//"It's reflected in the current frame" so that 0. + tmpWCnt++; + tmpAccCnt++; + } + if( tmpWCnt == traCntMax ) + { + *wCnt = tmpWCnt; + *cntAcc = tmpAccCnt; + return; + } + } + + + *wCnt = tmpWCnt ; + *cntAcc = tmpAccCnt; + + +} +/*---------------------------------------------------------------------*/ +// TrSetRes +/*---------------------------------------------------------------------*/ +void TrSetRes( ROI_SYS* wRoi,STB_TR_RES* resData , STB_INT32* resCnt ) +{ + STB_INT32 i; + + *resCnt = wRoi->cnt; + for( i = 0 ; i < wRoi->cnt ; i++ ) + { + resData[i].nTraID = wRoi->nTraID[i]; + resData[i].nDetID = wRoi->nDetID[i]; + resData[i].pos.x = wRoi->posX [i]; + resData[i].pos.y = wRoi->posY [i]; + resData[i].size = wRoi->size [i]; + resData[i].conf = wRoi->conf[i]; + } +} +/*---------------------------------------------------------------------*/ +// TrEditCur +/*---------------------------------------------------------------------*/ +void TrEditCur( ROI_SYS* wRoi,ROI_SYS* curData ) +{ + STB_INT32 i; + + curData->cnt = wRoi->cnt; + for( i = 0 ; i < wRoi->cnt ; i++ ) + { + curData->nTraID[i] = wRoi->nTraID[i]; + curData->nDetID[i] = wRoi->nDetID[i]; + curData->posX [i] = wRoi->posX [i]; + curData->posY [i] = wRoi->posY [i]; + curData->size [i] = wRoi->size [i]; + curData->conf [i] = wRoi->conf [i]; + curData->retryN[i] = wRoi->retryN[i]; + } +} +/*---------------------------------------------------------------------*/ +// StbTrExec +/*---------------------------------------------------------------------*/ +int StbTrExec ( TRHANDLE handle ) +{ + + + /* Face --------------------------------------*/ + if( handle->execFlg->faceTr == STB_TRUE ) + { + //Move the time series of past data. + TrSlideRec( handle->fcRec ); + //"the present data" set to the past data + TrCurRec( handle->fcRec ,handle->stbTrDet->fcDet, handle->stbTrDet->fcNum ); + //Calculate "stabilized current data wRoi" from "past data". + TrStabilizeTR( handle->wRoi ,&(handle->wRoi->cnt) ,handle->fcRec ,&(handle->fcCntAcc) ,handle ); + //Set "wRoi" data to output data "resFaces". + TrSetRes( handle->wRoi, handle->resFaces->face, &(handle->resFaces->cnt) ); + //set "wRoi" data to accumulated data (current) "fcRec [0]". + TrEditCur( handle->wRoi, &(handle->fcRec[0]) ); + } + + /* Body --------------------------------------*/ + if( handle->execFlg->bodyTr == STB_TRUE ) + { + //Move the time series of past data. + TrSlideRec( handle->bdRec ); + //"the present data" set to the past data + TrCurRec( handle->bdRec ,handle->stbTrDet->bdDet ,handle->stbTrDet->bdNum ); + //Calculate "stabilized current data wRoi" from "past data". + TrStabilizeTR( handle->wRoi ,&(handle->wRoi->cnt) , handle->bdRec, &(handle->bdCntAcc) , handle ); + //Set "wRoi" data to output data "resFaces". + TrSetRes( handle->wRoi, handle->resBodys->body, &(handle->resBodys->cnt) ); + //set "wRoi" data to accumulated data (current) "bdRec [0]". + TrEditCur( handle->wRoi, &(handle->bdRec[0]) ); + } + + + return STB_NORMAL; +} + + + diff --git a/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.h b/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.h new file mode 100644 index 00000000..410f61f2 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Tracker/STBTrAPI.h @@ -0,0 +1,29 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "TrInterface.h" +#include "math.h" + +#ifndef ABS + #define ABS(a) (((a) > (0)) ? (a) : (-1*a)) +#endif /* ABS */ + + + +int StbTrExec ( TRHANDLE handle ); + + + diff --git a/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.c b/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.c new file mode 100644 index 00000000..aa32eb1f --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.c @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "STBTrValidValue.h" + +/*Value range check*/ +#define IS_OUT_RANGE( val , min , max )( ( (val) < (min) ) || ( (max) < (val) ) ) + +/*------------------------------------------------------------------------------------------------------------------*/ +/* STB_TrIsValidValue */ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_INT32 STB_TrIsValidValue(const STB_TR_DET *input, STBExecFlg *execFlg) +{ + STB_INT32 i ; + + + + if( execFlg->bodyTr == STB_TRUE ) + { + if( IS_OUT_RANGE( input->bdNum , STB_BODY_CNT_MIN , STB_BODY_CNT_MAX ) ){ return STB_FALSE;} + for( i = 0 ; i < input->bdNum ; i++) + { + if( IS_OUT_RANGE( input->bdDet[i].posX , STB_BODY_XY_MIN , STB_BODY_XY_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->bdDet[i].posY , STB_BODY_XY_MIN , STB_BODY_XY_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->bdDet[i].size , STB_BODY_SIZE_MIN , STB_BODY_SIZE_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->bdDet[i].conf , STB_BODY_CONF_MIN , STB_BODY_CONF_MAX ) ){ return STB_FALSE;} + } + + } + + if( execFlg->faceTr == STB_TRUE ) + { + if( IS_OUT_RANGE( input->fcNum , STB_FACE_CNT_MIN , STB_FACE_CNT_MAX ) ){ return STB_FALSE;} + for( i = 0 ; i < input->fcNum ; i++) + { + if( IS_OUT_RANGE( input->fcDet[i].posX , STB_FACE_XY_MIN , STB_FACE_XY_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->fcDet[i].posY , STB_FACE_XY_MIN , STB_FACE_XY_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->fcDet[i].size , STB_FACE_SIZE_MIN , STB_FACE_SIZE_MAX ) ){ return STB_FALSE;} + if( IS_OUT_RANGE( input->fcDet[i].conf , STB_FACE_CONF_MIN , STB_FACE_CONF_MAX ) ){ return STB_FALSE;} + } + } + + + + return STB_TRUE; +} \ No newline at end of file diff --git a/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.h b/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.h new file mode 100644 index 00000000..1f6efa15 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Tracker/STBTrValidValue.h @@ -0,0 +1,92 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef STBTRVALIDVALUE_H__ +#define STBTRVALIDVALUE_H__ + + +#include "STBCommonDef.h" +#include "STBCommonType.h" +#include "STBTrTypedef.h" + +/*-------------------------------------------------------------------*/ +/*Threshold for checking input value*/ +/*-------------------------------------------------------------------*/ +#define STB_BODY_CNT_MIN 0 // body +#define STB_BODY_CNT_MAX 35 +#define STB_BODY_XY_MIN 0 +#define STB_BODY_XY_MAX 8191 +#define STB_BODY_SIZE_MIN 20 +#define STB_BODY_SIZE_MAX 8192 +#define STB_BODY_CONF_MIN 0 +#define STB_BODY_CONF_MAX 1000 +#define STB_FACE_CNT_MIN 0 // face +#define STB_FACE_CNT_MAX 35 +#define STB_FACE_XY_MIN 0 +#define STB_FACE_XY_MAX 8191 +#define STB_FACE_SIZE_MIN 20 +#define STB_FACE_SIZE_MAX 8192 +#define STB_FACE_CONF_MIN 0 +#define STB_FACE_CONF_MAX 1000 +#define STB_FACE_DIR_LR_MIN -180 +#define STB_FACE_DIR_LR_MAX 179 +#define STB_FACE_DIR_UD_MIN -180 +#define STB_FACE_DIR_UD_MAX 179 +#define STB_FACE_DIR_ROLL_MIN -180 +#define STB_FACE_DIR_ROLL_MAX 179 +#define STB_FACE_DIR_CONF_MIN 0 +#define STB_FACE_DIR_CONF_MAX 1000 +#define STB_FACE_AGE_VAL_MIN 0 +#define STB_FACE_AGE_VAL_MAX 75 +#define STB_FACE_AGE_CONF_MIN 0 +#define STB_FACE_AGE_CONF_MAX 1000 +#define STB_FACE_GEN_VAL_MIN 0 +#define STB_FACE_GEN_VAL_MAX 1 +#define STB_FACE_GEN_CONF_MIN 0 +#define STB_FACE_GEN_CONF_MAX 1000 +#define STB_FACE_GAZE_LR_MIN -90 +#define STB_FACE_GAZE_LR_MAX 90 +#define STB_FACE_GAZE_UD_MIN -90 +#define STB_FACE_GAZE_UD_MAX 90 +#define STB_FACE_BLI_L_MIN 1 +#define STB_FACE_BLI_L_MAX 1000 +#define STB_FACE_BLI_R_MIN 1 +#define STB_FACE_BLI_R_MAX 1000 +#define STB_FACE_EXP_SCORE_MIN 0 +#define STB_FACE_EXP_SCORE_MAX 100 /* not 1000 */ +#define STB_FACE_EXP_DEG_MIN -100 +#define STB_FACE_EXP_DEG_MAX 100 +#define STB_FACE_FR_UID_MIN 0 +#define STB_FACE_FR_UID_MAX 499 +#define STB_FACE_FR_SCORE_MIN 0 +#define STB_FACE_FR_SCORE_MAX 1000 + +/*-------------------------------------------------------------------*/ +/*Permitted input value*/ +/*-------------------------------------------------------------------*/ +#define STB_ERR_PE_CANNOT -128 /*Estimation is not possible.*/ +#define STB_ERR_FR_CANNOT -128 /*Recognition impossible*/ +#define STB_ERR_FR_NOID -1 /*No corresponding ID*/ +#define STB_ERR_FR_NOALBUM -127 /*Not-registered in Album*/ + + +/*-------------------------------------------------------------------*/ +/* Func */ +/*-------------------------------------------------------------------*/ +STB_INT32 STB_TrIsValidValue(const STB_TR_DET *input, STBExecFlg *execFlg); + +#endif /* COMMONDEF_H__ */ + diff --git a/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.c b/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.c new file mode 100644 index 00000000..1afd3efe --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.c @@ -0,0 +1,68 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "SdkSTBTr.h" +#include "TrInterface.h" + +/*This layer only defines the API function */ + +/*Create/Delete handle*/ +STB_TR_HANDLE STB_Tr_CreateHandle( const STBExecFlg* execFlg ,const STB_INT32 nDetCntMax, const STB_INT32 nTraCntMax){ + return (STB_TR_HANDLE)TrCreateHandle( execFlg , nDetCntMax, nTraCntMax ); +} + +STB_INT32 STB_Tr_DeleteHandle(STB_TR_HANDLE handle){ + return TrDeleteHandle((TRHANDLE)handle); +} + +/*set frame information*/ +STB_INT32 STB_Tr_SetDetect(STB_TR_HANDLE handle,const STB_TR_DET *stbTrDet){ + return TrSetDetect((TRHANDLE)handle,stbTrDet); +} + +/*Main process execution*/ +STB_INT32 STB_Tr_Execute(STB_TR_HANDLE handle){ + return TrExecute((TRHANDLE)handle); +} + +/*get the result*/ +STB_INT32 STB_Tr_GetResult(STB_TR_HANDLE handle,STB_TR_RES_FACES* fcResult,STB_TR_RES_BODYS* bdResult){ + return TrGetResult((TRHANDLE)handle,fcResult,bdResult); +} + +/*Clear*/ +STB_INT32 STB_Tr_Clear( STB_TR_HANDLE handle ){ + return TrClear((TRHANDLE)handle); +} + +/*RetryCount*/ +STB_INT32 STB_Tr_SetRetryCount(STB_TR_HANDLE handle , STB_INT32 nRetryCount){ + return TrSetRetryCount((TRHANDLE)handle,nRetryCount); +} +STB_INT32 STB_Tr_GetRetryCount ( STB_TR_HANDLE handle , STB_INT32* nRetryCount ) +{ + return TrGetRetryCount((TRHANDLE)handle,nRetryCount); +} +/* Stediness */ +STB_INT32 STB_Tr_SetStedinessParam ( STB_TR_HANDLE handle , STB_INT32 nStedinessPos , STB_INT32 nStedinessSize ) +{ + return TrSetStedinessParam ((TRHANDLE)handle,nStedinessPos,nStedinessSize); +} +STB_INT32 STB_Tr_GetStedinessParam ( STB_TR_HANDLE handle , STB_INT32* nStedinessPos , STB_INT32* nStedinessSize ) +{ + return TrGetStedinessParam((TRHANDLE)handle,nStedinessPos,nStedinessSize); +} + diff --git a/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.h b/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.h new file mode 100644 index 00000000..0892d615 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Tracker/SdkSTBTr.h @@ -0,0 +1,41 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#if !defined( _SDK_STBTR_H_ ) +#define _SDK_STBTR_H_ + +#include "STBTrTypedef.h" + +#if !defined( STB_DEF_TR_HANDLE ) + #define STB_DEF_TR_HANDLE + typedef VOID* STB_TR_HANDLE; +#endif + +STB_TR_HANDLE STB_Tr_CreateHandle ( const STBExecFlg* execFlg ,const STB_INT32 nDetCntMax, const STB_INT32 nTraCntMax);/*Create/Delete handle*/ + +STB_INT32 STB_Tr_DeleteHandle ( STB_TR_HANDLE handle );/*Create/Delete handle*/ +STB_INT32 STB_Tr_SetDetect ( STB_TR_HANDLE handle,const STB_TR_DET *stbTrDet );/*Frame information settings*/ +STB_INT32 STB_Tr_Execute ( STB_TR_HANDLE handle );/*Main process execution*/ +STB_INT32 STB_Tr_GetResult ( STB_TR_HANDLE handle,STB_TR_RES_FACES* fcResult,STB_TR_RES_BODYS* bdResult);/*get the result*/ +STB_INT32 STB_Tr_Clear ( STB_TR_HANDLE handle); + +/*parameter*/ +STB_INT32 STB_Tr_SetRetryCount ( STB_TR_HANDLE handle , STB_INT32 nRetryCount );/*RetryCount*/ +STB_INT32 STB_Tr_GetRetryCount ( STB_TR_HANDLE handle , STB_INT32* nRetryCount ); +STB_INT32 STB_Tr_SetStedinessParam ( STB_TR_HANDLE handle , STB_INT32 nStedinessPos , STB_INT32 nStedinessSize );/* Stediness */ +STB_INT32 STB_Tr_GetStedinessParam ( STB_TR_HANDLE handle , STB_INT32* nStedinessPos , STB_INT32* nStedinessSize ); + +#endif diff --git a/src/b5t007001/stblib/src/STB_Tracker/TrInterface.c b/src/b5t007001/stblib/src/STB_Tracker/TrInterface.c new file mode 100644 index 00000000..c60de3f6 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Tracker/TrInterface.c @@ -0,0 +1,603 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#include "TrInterface.h" +#include "STBTrAPI.h" +/*Value range check*/ +#define ISVALID_RANGE( val , min , max ) ( ( (min) <= (val) ) && ( (val) <= (max) ) ) + +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*error check*/ +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +static STB_INT32 TrIsValidValue( + const STB_INT32 nValue , + const STB_INT32 nLimitMin , + const STB_INT32 nLimitMax ) +{ + STB_INT32 nRet; + for( nRet = STB_ERR_INVALIDPARAM; nRet != STB_NORMAL; nRet = STB_NORMAL ){ + if( ! ISVALID_RANGE( nValue , nLimitMin , nLimitMax ) ){ break; } + } + return nRet; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +static STB_INT32 TrIsValidPointer( const VOID* pPointer ) +{ + STB_INT32 nRet; + for( nRet = STB_ERR_INVALIDPARAM; nRet != STB_NORMAL; nRet = STB_NORMAL ){ + if( NULL == pPointer ){ break; } + } + return nRet; +} + +/*------------------------------------------------------------------------------------------------------------------*/ +/* TrCalcTrSize */ +/*------------------------------------------------------------------------------------------------------------------*/ +STB_UINT32 TrCalcTrSize ( const STBExecFlg *execFlg , STB_UINT32 nTraCntMax , STB_UINT32 nDetCntMax ) +{ + STB_UINT32 retVal ; + + retVal = 0 ; + + retVal += 100 ;///Margin : alignment + + + retVal += sizeof( STB_TR_DET ); // stbTrDet + + if( execFlg->bodyTr == STB_TRUE ) + { + retVal += sizeof( ROI_SYS ) * STB_TR_BACK_MAX ;// bdRec + retVal += sizeof( STB_INT32 ) * STB_TR_BACK_MAX * nTraCntMax ;// bdRec[t].nDetID + retVal += sizeof( STB_INT32 ) * STB_TR_BACK_MAX * nTraCntMax ;// bdRec[t].nTraID + retVal += sizeof( STB_INT32 ) * STB_TR_BACK_MAX * nTraCntMax ;// bdRec[t].posX + retVal += sizeof( STB_INT32 ) * STB_TR_BACK_MAX * nTraCntMax ;// bdRec[t].posY + retVal += sizeof( STB_INT32 ) * STB_TR_BACK_MAX * nTraCntMax ;// bdRec[t].size + retVal += sizeof( STB_INT32 ) * STB_TR_BACK_MAX * nTraCntMax ;// bdRec[t].conf + retVal += sizeof( STB_INT32 ) * STB_TR_BACK_MAX * nTraCntMax ;// bdRec[t].retryN + retVal += sizeof( ROI_DET ) * nDetCntMax ;// stbTrDet->bdDet + retVal += sizeof( STB_TR_RES_BODYS) ;// resBodys + retVal += sizeof( STB_TR_RES ) * nTraCntMax ;// resBodys->body + } + if( execFlg->faceTr == STB_TRUE ) + { + retVal += sizeof( ROI_SYS ) * STB_TR_BACK_MAX ;// fcRec + retVal += sizeof( STB_INT32 ) * STB_TR_BACK_MAX * nTraCntMax ;// fcRec[t].nDetID + retVal += sizeof( STB_INT32 ) * STB_TR_BACK_MAX * nTraCntMax ;// fcRec[t].nTraID + retVal += sizeof( STB_INT32 ) * STB_TR_BACK_MAX * nTraCntMax ;// fcRec[t].posX + retVal += sizeof( STB_INT32 ) * STB_TR_BACK_MAX * nTraCntMax ;// fcRec[t].posY + retVal += sizeof( STB_INT32 ) * STB_TR_BACK_MAX * nTraCntMax ;// fcRec[t].size + retVal += sizeof( STB_INT32 ) * STB_TR_BACK_MAX * nTraCntMax ;// fcRec[t].conf + retVal += sizeof( STB_INT32 ) * STB_TR_BACK_MAX * nTraCntMax ;// fcRec[t].retryN + retVal += sizeof( ROI_DET ) * nDetCntMax ;// stbTrDet->fcDet + retVal += sizeof( STB_TR_RES_FACES) ;// resFaces + retVal += sizeof( STB_TR_RES ) * nTraCntMax ;// resFaces->face + } + + retVal += sizeof( STB_INT32 ) * nTraCntMax ; // wIdPreCur + retVal += sizeof( STB_INT32 ) * nTraCntMax ; // wIdCurPre + retVal += sizeof( STB_INT32 ) * nTraCntMax * nTraCntMax ; // wDstTbl + retVal += sizeof( STBExecFlg ) ; // execFlg + + retVal += ( sizeof( ROI_SYS ) );//wRoi + retVal += ( sizeof( STB_INT32 ) * nTraCntMax );//wRoi->nDetID + retVal += ( sizeof( STB_INT32 ) * nTraCntMax );//wRoi->nTraID + retVal += ( sizeof( STB_INT32 ) * nTraCntMax );//wRoi->posX + retVal += ( sizeof( STB_INT32 ) * nTraCntMax );//wRoi->posY + retVal += ( sizeof( STB_INT32 ) * nTraCntMax );//wRoi->size + retVal += ( sizeof( STB_INT32 ) * nTraCntMax );//wRoi->conf + retVal += ( sizeof( STB_INT32 ) * nTraCntMax );//wRoi->retryN + + return retVal; +} +/*------------------------------------------------------------------------------------------------------------------*/ +/* ShareTrSize */ +/*------------------------------------------------------------------------------------------------------------------*/ +void ShareTrSize ( TRHANDLE handle , const STBExecFlg* execFlg ) +{ + STB_UINT32 t ; + STB_UINT32 nTraCntMax = handle->traCntMax ; + STB_UINT32 nDetCntMax = handle->detCntMax ; + STB_INT8 *stbPtr = handle->trPtr ; + + + + handle->stbTrDet = ( STB_TR_DET*) stbPtr; stbPtr += ( sizeof( STB_TR_DET ) ); + + if( execFlg->bodyTr == STB_TRUE ) + { + handle->bdRec = ( ROI_SYS* ) stbPtr; stbPtr += ( sizeof( ROI_SYS ) * STB_TR_BACK_MAX); + for( t = 0 ; t < STB_TR_BACK_MAX ; t++ ) + { + handle->bdRec[t].nDetID = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->bdRec[t].nTraID = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->bdRec[t].posX = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->bdRec[t].posY = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->bdRec[t].size = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->bdRec[t].conf = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->bdRec[t].retryN = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + } + handle->stbTrDet->bdDet = ( ROI_DET* ) stbPtr; stbPtr += ( sizeof( ROI_DET ) * nDetCntMax ); + handle->resBodys = ( STB_TR_RES_BODYS* ) stbPtr; stbPtr += ( sizeof( STB_TR_RES_BODYS ) ); + handle->resBodys->body = ( STB_TR_RES*) stbPtr; stbPtr += ( sizeof( STB_TR_RES ) * nTraCntMax ); + } + + + if( execFlg->faceTr == STB_TRUE ) + { + handle->fcRec = ( ROI_SYS* ) stbPtr; stbPtr += ( sizeof( ROI_SYS ) * STB_TR_BACK_MAX ); + for( t = 0 ; t < STB_TR_BACK_MAX ; t++ ) + { + handle->fcRec[t].nDetID = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->fcRec[t].nTraID = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->fcRec[t].posX = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->fcRec[t].posY = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->fcRec[t].size = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->fcRec[t].conf = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->fcRec[t].retryN = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + } + handle->stbTrDet->fcDet = ( ROI_DET* ) stbPtr; stbPtr += ( sizeof( ROI_DET ) * nDetCntMax ); + + handle->resFaces = ( STB_TR_RES_FACES* ) stbPtr; stbPtr += ( sizeof( STB_TR_RES_FACES ) ); + handle->resFaces->face = ( STB_TR_RES*) stbPtr; stbPtr += ( sizeof( STB_TR_RES ) * nTraCntMax ); + } + + + handle->wIdPreCur = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->wIdCurPre = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->wDstTbl = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax * nTraCntMax ); + handle->execFlg = ( STBExecFlg*) stbPtr; stbPtr += sizeof( STBExecFlg ); + + handle->wRoi = ( ROI_SYS* ) stbPtr; stbPtr += ( sizeof( ROI_SYS ) ); + handle->wRoi->nDetID= ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->wRoi->nTraID= ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->wRoi->posX = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->wRoi->posY = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->wRoi->size = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->wRoi->conf = ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); + handle->wRoi->retryN= ( STB_INT32* ) stbPtr; stbPtr += ( sizeof( STB_INT32 ) * nTraCntMax ); +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Create handle*/ +TRHANDLE TrCreateHandle( const STBExecFlg* execFlg ,const STB_INT32 nDetCntMax, const STB_INT32 nTraCntMax ) +{ + + TRHANDLE handle ; + STB_INT32 i ,j ; + STB_INT32 tmpVal ; + STB_INT32 nRet ; + + nRet = TrIsValidPointer(execFlg); + if(nRet != STB_NORMAL) + { + return NULL; + } + + if( nDetCntMax < 1 || STB_TR_DET_CNT_MAX < nDetCntMax ) + { + return NULL; + } + if( nTraCntMax < 1 || STB_TR_TRA_CNT_MAX < nTraCntMax ) + { + return NULL; + } + + /*do handle's Malloc here*/ + handle = ( TRHANDLE )malloc( sizeof(*handle) ); + if(handle == NULL) + { + return NULL; + } + + handle->detCntMax = nDetCntMax ; + handle->traCntMax = nTraCntMax ; + handle->retryCnt = STB_TR_INI_RETRY ; + handle->stedPos = STB_TR_INI_STEADINESS_SIZE ;//stabilization parameter(position) + handle->stedSize = STB_TR_INI_STEADINESS_POS ;//stabilization parameter(size) + handle->fcCntAcc = 0 ; + handle->bdCntAcc = 0 ; + handle->trPtr = NULL; + handle->stbTrDet = NULL; + handle->fcRec = NULL; + handle->bdRec = NULL; + handle->resFaces = NULL; + handle->resBodys = NULL; + handle->wIdPreCur = NULL; + handle->wIdCurPre = NULL; + handle->wDstTbl = NULL; + handle->execFlg = NULL; + + tmpVal = TrCalcTrSize ( execFlg ,nTraCntMax , nDetCntMax); /*calculate necessary amount in the TR handle*/ + handle->trPtr = NULL; + handle->trPtr = ( STB_INT8 * )malloc( tmpVal ) ; /*keep necessary amount in the TR handle*/ + if( handle->trPtr == NULL ) + { + free ( handle->trPtr ); + free ( handle ); + return NULL; + } + ShareTrSize ( handle , execFlg ); /*Malloc-area is allocated to things that need Malloc in TR handle*/ + + /*set initial value*/ + if( execFlg->faceTr == STB_TRUE ) + { + for( i = 0 ; i < STB_TR_BACK_MAX ; i++) + { + handle->fcRec[i].cnt= 0; + for( j = 0 ; j < handle->traCntMax ; j++) + { + handle->fcRec[i].nDetID [j] = -1; + handle->fcRec[i].nTraID [j] = -1; + handle->fcRec[i].posX [j] = 0; + handle->fcRec[i].posY [j] = 0; + handle->fcRec[i].size [j] = -1; + handle->fcRec[i].retryN [j] = -1; + handle->fcRec[i].conf [j] = -1; + } + } + } + if( execFlg->bodyTr == STB_TRUE ) + { + for( i = 0 ; i < STB_TR_BACK_MAX ; i++) + { + handle->bdRec[i].cnt= 0; + for( j = 0 ; j < handle->traCntMax ; j++) + { + handle->bdRec[i].nDetID [j] = -1; + handle->bdRec[i].nTraID [j] = -1; + handle->bdRec[i].posX [j] = 0; + handle->bdRec[i].posY [j] = 0; + handle->bdRec[i].size [j] = -1; + handle->bdRec[i].retryN [j] = -1; + handle->bdRec[i].conf [j] = -1; + } + } + } + + + + handle->execFlg->pet = execFlg->pet ; + handle->execFlg->hand = execFlg->hand ; + handle->execFlg->bodyTr = execFlg->bodyTr ; + handle->execFlg->faceTr = execFlg->faceTr ; + handle->execFlg->gen = execFlg->gen ; + handle->execFlg->age = execFlg->age ; + handle->execFlg->fr = execFlg->fr ; + handle->execFlg->exp = execFlg->exp ; + handle->execFlg->gaz = execFlg->gaz ; + handle->execFlg->dir = execFlg->dir ; + handle->execFlg->bli = execFlg->bli ; + + + return handle; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ + +/*Delete handle*/ +STB_INT32 TrDeleteHandle(TRHANDLE handle) +{ + STB_INT32 nRet; + + /*NULL check*/ + nRet = TrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + free ( handle->trPtr ); + free ( handle ); + + return STB_NORMAL; +} + +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Set the result*/ +STB_INT32 TrSetDetect(TRHANDLE handle,const STB_TR_DET *stbTrDet){ + STB_INT32 nRet; + STB_INT32 i; + + /*NULL check*/ + nRet = TrIsValidPointer(handle); + if(nRet != STB_NORMAL) + { + return STB_ERR_NOHANDLE; + } + + nRet = TrIsValidPointer(stbTrDet); + if(nRet != STB_NORMAL) + { + return nRet; + } + + /*Input value check*/ + nRet = STB_TrIsValidValue ( stbTrDet ,handle->execFlg ); + if(nRet != STB_TRUE) + { + return STB_ERR_INVALIDPARAM; + } + + /*Set the received result to the handle (stbTrDet)*/ + /* Face */ + if( handle->execFlg->faceTr == STB_TRUE ) + { + handle->stbTrDet->fcNum = stbTrDet->fcNum; + for( i = 0 ; i < handle->stbTrDet->fcNum ; i++ ) + { + handle->stbTrDet->fcDet[i].posX = stbTrDet->fcDet[i].posX; + handle->stbTrDet->fcDet[i].posY = stbTrDet->fcDet[i].posY; + handle->stbTrDet->fcDet[i].size = stbTrDet->fcDet[i].size; + handle->stbTrDet->fcDet[i].conf = stbTrDet->fcDet[i].conf; + } + }else + { + handle->stbTrDet->fcNum = 0; + } + + /* Body */ + if( handle->execFlg->bodyTr == STB_TRUE ) + { + handle->stbTrDet->bdNum = stbTrDet->bdNum; + for( i = 0 ; i < handle->stbTrDet->bdNum ; i++ ) + { + handle->stbTrDet->bdDet[i].posX = stbTrDet->bdDet[i].posX; + handle->stbTrDet->bdDet[i].posY = stbTrDet->bdDet[i].posY; + handle->stbTrDet->bdDet[i].size = stbTrDet->bdDet[i].size; + handle->stbTrDet->bdDet[i].conf = stbTrDet->bdDet[i].conf; + } + }else + { + handle->stbTrDet->bdNum = 0; + } + + + + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Main process execution*/ +STB_INT32 TrExecute(TRHANDLE handle){ + + STB_INT32 nRet; + /*NULL check*/ + nRet = TrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + /*Main processing here*/ + nRet = StbTrExec ( handle ); + + + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Get-Function of results*/ +STB_INT32 TrGetResult(TRHANDLE handle,STB_TR_RES_FACES* fcResult,STB_TR_RES_BODYS* bdResult){ + + STB_INT32 nRet; + STB_INT32 i; + + /*NULL check*/ + nRet = TrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + if( handle->execFlg->faceTr == STB_TRUE ) + { + nRet = TrIsValidPointer(fcResult); + if(nRet != STB_NORMAL){ + return nRet; + } + } + if( handle->execFlg->bodyTr == STB_TRUE ) + { + nRet = TrIsValidPointer(bdResult); + if(nRet != STB_NORMAL){ + return nRet; + } + } + + /*Get result from handle*/ + + /* Face */ + if( handle->execFlg->faceTr == STB_TRUE ) + { + fcResult->cnt = handle->resFaces->cnt ; + for( i = 0 ; i < handle->resFaces->cnt ; i++ ) + { + fcResult->face[i].nDetID = handle->resFaces->face[i].nDetID ; + fcResult->face[i].nTraID = handle->resFaces->face[i].nTraID ; + fcResult->face[i].pos.x = handle->resFaces->face[i].pos.x ; + fcResult->face[i].pos.y = handle->resFaces->face[i].pos.y ; + fcResult->face[i].size = handle->resFaces->face[i].size ; + fcResult->face[i].conf = handle->resFaces->face[i].conf ; + } + for( i = handle->resFaces->cnt ; i < handle->traCntMax ; i++ ) + { + fcResult->face[i].nDetID = -1 ; + fcResult->face[i].nTraID = -1 ; + fcResult->face[i].pos.x = 0 ; + fcResult->face[i].pos.y = 0 ; + fcResult->face[i].size = -1 ; + fcResult->face[i].conf = STB_CONF_NO_DATA ; + } + } + + /* Body */ + if( handle->execFlg->bodyTr == STB_TRUE ) + { + bdResult->cnt = handle->resBodys->cnt ; + for( i = 0 ; i < handle->resBodys->cnt ; i++ ) + { + bdResult->body[i].nDetID = handle->resBodys->body[i].nDetID ; + bdResult->body[i].nTraID = handle->resBodys->body[i].nTraID ; + bdResult->body[i].pos.x = handle->resBodys->body[i].pos.x ; + bdResult->body[i].pos.y = handle->resBodys->body[i].pos.y ; + bdResult->body[i].size = handle->resBodys->body[i].size ; + bdResult->body[i].conf = handle->resBodys->body[i].conf ; + } + for( i = handle->resBodys->cnt ; i < handle->traCntMax ; i++ ) + { + bdResult->body[i].nDetID = -1 ; + bdResult->body[i].nTraID = -1 ; + bdResult->body[i].pos.x = 0 ; + bdResult->body[i].pos.y = 0 ; + bdResult->body[i].size = -1 ; + bdResult->body[i].conf = STB_CONF_NO_DATA ; + } + } + + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/*Clear*/ +STB_INT32 TrClear(TRHANDLE handle){ + + STB_INT32 nRet; + STB_INT32 i , j; + + + /*NULL check*/ + nRet = TrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + + if( handle->execFlg->faceTr == STB_TRUE ) + { + for( i = 0 ; i < STB_TR_BACK_MAX ; i++) + { + handle->fcRec[i].cnt= 0; + for( j = 0 ; j < handle->traCntMax ; j++) + { + handle->fcRec[i].nDetID [j] = -1; + handle->fcRec[i].nTraID [j] = -1; + handle->fcRec[i].posX [j] = 0 ; + handle->fcRec[i].posY [j] = 0 ; + handle->fcRec[i].size [j] = -1; + handle->fcRec[i].retryN [j] = -1; + handle->fcRec[i].conf [j] = -1; + } + } + handle->fcCntAcc = 0; + } + + if( handle->execFlg->bodyTr == STB_TRUE ) + { + for( i = 0 ; i < STB_TR_BACK_MAX ; i++) + { + handle->bdRec[i].cnt= 0; + for( j = 0 ; j < handle->traCntMax ; j++) + { + handle->bdRec[i].nDetID [j] = -1; + handle->bdRec[i].nTraID [j] = -1; + handle->bdRec[i].posX [j] = 0 ; + handle->bdRec[i].posY [j] = 0 ; + handle->bdRec[i].size [j] = -1; + handle->bdRec[i].retryN [j] = -1; + handle->bdRec[i].conf [j] = -1; + } + } + handle->bdCntAcc = 0; + } + + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +/* */ +STB_INT32 TrSetRetryCount(TRHANDLE handle, STB_INT32 nRetryCount) +{ + STB_INT32 nRet; + nRet = TrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + + if( nRetryCount < STB_TR_MIN_RETRY || STB_TR_MAX_RETRY < nRetryCount) + { + return STB_ERR_INVALIDPARAM; + } + + handle->retryCnt = nRetryCount; + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 TrGetRetryCount ( TRHANDLE handle , STB_INT32* nRetryCount ) +{ + STB_INT32 nRet; + nRet = TrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + nRet = TrIsValidPointer(nRetryCount); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + + *nRetryCount = handle->retryCnt ; + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 TrSetStedinessParam ( TRHANDLE handle , STB_INT32 nStedinessPos , STB_INT32 nStedinessSize ) +{ + if( nStedinessPos < STB_TR_MIN_STEADINESS_POS || STB_TR_MAX_STEADINESS_POS < nStedinessPos) + { + return STB_ERR_INVALIDPARAM; + } + if( nStedinessSize < STB_TR_MIN_STEADINESS_SIZE || STB_TR_MAX_STEADINESS_SIZE < nStedinessSize) + { + return STB_ERR_INVALIDPARAM; + } + handle->stedPos = nStedinessPos; + handle->stedSize = nStedinessSize; + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ +STB_INT32 TrGetStedinessParam ( TRHANDLE handle , STB_INT32* nStedinessPos , STB_INT32* nStedinessSize ) +{ + STB_INT32 nRet; + nRet = TrIsValidPointer(handle); + if(nRet != STB_NORMAL){ + return STB_ERR_NOHANDLE; + } + nRet = TrIsValidPointer(nStedinessPos); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + nRet = TrIsValidPointer(nStedinessSize); + if(nRet != STB_NORMAL){ + return STB_ERR_INVALIDPARAM; + } + *nStedinessPos = handle->stedPos ; + *nStedinessSize = handle->stedSize ; + return STB_NORMAL; +} +/*--------------------------------------------------------------------- +---------------------------------------------------------------------*/ \ No newline at end of file diff --git a/src/b5t007001/stblib/src/STB_Tracker/TrInterface.h b/src/b5t007001/stblib/src/STB_Tracker/TrInterface.h new file mode 100644 index 00000000..d1e42161 --- /dev/null +++ b/src/b5t007001/stblib/src/STB_Tracker/TrInterface.h @@ -0,0 +1,128 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#if !defined( _INTERFACE_H_ ) +#define _INTERFACE_H_ +#include "STBTrTypedef.h" +#include "STBCommonDef.h" +#include "STBCommonType.h" +#include "STBTrValidValue.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// +/////////// Define ////////////// +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// + +/* refer to past "STB_BACK_MAX-1" frames of results */ +#define STB_TR_BACK_MAX 2 + +#define STB_TR_DET_CNT_MAX 35 +#define STB_TR_TRA_CNT_MAX 35 + +//If the face isn't find out during tracking, set until how many frames can look for it. +//In the case of tracking failed with a specified number of frames consecutively, end of tracking as the face lost. +#define STB_TR_INI_RETRY 2 +#define STB_TR_MIN_RETRY 0 +#define STB_TR_MAX_RETRY 300 + +//Specifies settings % +//For example, about the percentage of detected position change, setting the value to 30(<- initialize value) +//in the case of position change under 30 percentage from the previous frame, output detected position of the previous frame +//When it exceeds 30%, the detection position coordinate is output as it is. +#define STB_TR_INI_STEADINESS_POS 30 +#define STB_TR_MIN_STEADINESS_POS 0 +#define STB_TR_MAX_STEADINESS_POS 100 + +//Specifies settings % +//In the case of the percentage of detection size change setting to 30(<- initialize value) +//in the case of size change under 30 percentage from the previous frame, output detected size of the previous frame +//When it exceeds 30%, the detection size is output as it is. +#define STB_TR_INI_STEADINESS_SIZE 30 +#define STB_TR_MIN_STEADINESS_SIZE 0 +#define STB_TR_MAX_STEADINESS_SIZE 100 + + +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// +/////////// Struct ////////////// +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// + + +typedef struct{ + STB_INT32 cnt ; + STB_INT32 *nDetID ; /*previous detected result ID*/ + STB_INT32 *nTraID ; /*Tracking ID*/ + STB_INT32 *posX ; /* Center x-coordinate */ + STB_INT32 *posY ; /* Center y-coordinate */ + STB_INT32 *size ; /* Size */ + STB_INT32 *conf ; /* Degree of confidence */ + STB_INT32 *retryN ; /*Continuous retry count*/ +}ROI_SYS; + + +/*---------------------------------------------------------------------------*/ +typedef struct tagPEHANDLE { + STB_INT8 *trPtr ; + STB_INT32 detCntMax ;//Maximum of detected people + STB_INT32 traCntMax ;//Maximum number of tracking people + STB_INT32 retryCnt ;//Retry count + STB_INT32 stedPos ;//stabilization parameter(position) + STB_INT32 stedSize ;//stabilization parameter(size) + STB_INT32 fcCntAcc ;//Number of faces (cumulative) + STB_INT32 bdCntAcc ;//a number of human bodies(cumulative) + STB_TR_DET *stbTrDet ;//Present data before the stabilization(input). + ROI_SYS *fcRec ;//past data + ROI_SYS *bdRec ;//past data + STB_TR_RES_FACES *resFaces ;//present data after the stabilization(output) + STB_TR_RES_BODYS *resBodys ;//present data after the stabilization(output) + STB_INT32 *wIdPreCur ; + STB_INT32 *wIdCurPre ; + STB_INT32 *wDstTbl ; + STBExecFlg *execFlg ; + ROI_SYS *wRoi ; +} *TRHANDLE; + +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// +/////////// Func ////////////// +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// + +TRHANDLE TrCreateHandle ( const STBExecFlg* execFlg ,const STB_INT32 nDetCntMax, const STB_INT32 nTraCntMax ); +STB_INT32 TrDeleteHandle ( TRHANDLE handle); +STB_INT32 TrSetDetect ( TRHANDLE handle , const STB_TR_DET *stbTrDet); +STB_INT32 TrExecute ( TRHANDLE handle); +STB_INT32 TrClear ( TRHANDLE handle); +STB_INT32 TrGetResult ( TRHANDLE handle , STB_TR_RES_FACES* fcResult,STB_TR_RES_BODYS* bdResult); +STB_INT32 TrSetRetryCount ( TRHANDLE handle , STB_INT32 nRetryCount ); +STB_INT32 TrGetRetryCount ( TRHANDLE handle , STB_INT32* nRetryCount ); +STB_INT32 TrSetStedinessParam ( TRHANDLE handle , STB_INT32 nStedinessPos , STB_INT32 nStedinessSize ); +STB_INT32 TrGetStedinessParam ( TRHANDLE handle , STB_INT32* nStedinessPos , STB_INT32* nStedinessSize ); + + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/b5t007001/stblib/src/include/STBCommonDef.h b/src/b5t007001/stblib/src/include/STBCommonDef.h new file mode 100644 index 00000000..c06cf5ba --- /dev/null +++ b/src/b5t007001/stblib/src/include/STBCommonDef.h @@ -0,0 +1,52 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef COMMONDEF_H__ +#define COMMONDEF_H__ +#include + +/* Executed flag */ +#define STB_FUNC_BD (0x00000001U) /* [LSB]bit0: Body Tracking 00000000001 */ +#define STB_FUNC_DT (0x00000004U) /* [LSB]bit2: Face Tracking 00000000100 */ +#define STB_FUNC_PT (0x00000008U) /* [LSB]bit3: Face Direction 00000001000 */ +#define STB_FUNC_AG (0x00000010U) /* [LSB]bit4: Age Estimation 00000010000 */ +#define STB_FUNC_GN (0x00000020U) /* [LSB]bit5: Gender Estimation 00000100000 */ +#define STB_FUNC_GZ (0x00000040U) /* [LSB]bit6: Gaze Estimation 00001000000 */ +#define STB_FUNC_BL (0x00000080U) /* [LSB]bit7: Blink Estimation 00010000000 */ +#define STB_FUNC_EX (0x00000100U) /* [MSB]bit0: Expression Estimation 00100000000 */ +#define STB_FUNC_FR (0x00000200U) /* [MSB]bit1: Face Recognition 01000000000 */ + + + +/*STB library's error code*/ +#define STB_NORMAL (0) /*Successful completion*/ +#define STB_ERR_INITIALIZE (-2) /*Initialization error*/ +#define STB_ERR_INVALIDPARAM (-3) /*argument error*/ +#define STB_ERR_NOHANDLE (-7) /*handle error*/ +#define STB_ERR_PROCESSCONDITION (-8) /*When the processing condition is not satisfied*/ + +#define STB_TRUE (1) +#define STB_FALSE (0) + + + +#if !defined(STB_API) +/*Import(Application Default)*/ + #define STB_API __declspec( dllimport ) +#endif /* OKAO_API || OMCV_API */ + +#endif /* COMMONDEF_H__ */ + diff --git a/src/b5t007001/stblib/src/include/STBCommonType.h b/src/b5t007001/stblib/src/include/STBCommonType.h new file mode 100644 index 00000000..b0a1beee --- /dev/null +++ b/src/b5t007001/stblib/src/include/STBCommonType.h @@ -0,0 +1,41 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef __STBCOMMONTYPEDEF_H__ +#define __STBCOMMONTYPEDEF_H__ +#include "STBTypedefOutput.h" + + + + +typedef struct { + STB_INT32 pet ;//Spare : Pet + STB_INT32 hand ;//Spare : Hand + STB_INT32 bodyTr ;//human body tracking + STB_INT32 faceTr ;// Face tracking + STB_INT32 gen ;//Gender + STB_INT32 age ;//Age + STB_INT32 fr ;//Face recognition + STB_INT32 exp ;//Facial expression + STB_INT32 gaz ;//Gaze + STB_INT32 dir ;//Face direction + STB_INT32 bli ;//Blink +}STBExecFlg; + + + +#endif /*__STBCOMMONTYPEDEF_H__*/ + diff --git a/src/b5t007001/stblib/src/include/STBFaceInfo.h b/src/b5t007001/stblib/src/include/STBFaceInfo.h new file mode 100644 index 00000000..d8a551b4 --- /dev/null +++ b/src/b5t007001/stblib/src/include/STBFaceInfo.h @@ -0,0 +1,29 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef STBFACEINFO_H__ +#define STBFACEINFO_H__ +#include "STBTypedefInput.h" +#include "STBHandle.h" + +VOID SetFaceObject (const STB_FRAME_RESULT_FACES* stbINPUTfaces,FaceObj *faces , const STBExecFlg *execFlg , const STB_INT32 nTraCntMax ); +VOID SetTrackingIDToFace(STB_INT32 TrackingNum,STB_INT32 DetectNum, TraObj *track,FaceObj *faces, const STBExecFlg *execFlg ); +VOID SetFaceToPeInfo (STB_INT32 TrackingNum,FaceObj *faces,STB_PE_DET *peInfo); +VOID SetFaceToFrInfo (STB_INT32 TrackingNum,FaceObj *faces,STB_FR_DET *frInfo); +VOID SetPeInfoToFace (STB_INT32 TrackingNum,STB_PE_RES *peInfo,FaceObj *faces , const STBExecFlg *execFlg ); +VOID SetFrInfoToFace (STB_INT32 TrackingNum,STB_FR_RES *frInfo,FaceObj *faces); + +#endif \ No newline at end of file diff --git a/src/b5t007001/stblib/src/include/STBFrTypedef.h b/src/b5t007001/stblib/src/include/STBFrTypedef.h new file mode 100644 index 00000000..efc037d7 --- /dev/null +++ b/src/b5t007001/stblib/src/include/STBFrTypedef.h @@ -0,0 +1,65 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef __STBFRTYPEDEF_H__ +#define __STBFRTYPEDEF_H__ + +#include "STBTypedefOutput.h" +#include "STBCommonType.h" +#include "STBCommonDef.h" + + +/*----------------------------------------------------------------------------*/ +/* Face Detection & Estimations results */ +/*----------------------------------------------------------------------------*/ +typedef struct{ + STB_INT32 nDetID ; /*Person number detected in the current frame*/ + STB_INT32 nTraID ; /*Tracking person number in the through frame*/ + STB_INT32 dirDetYaw ; + STB_INT32 dirDetPitch ; + STB_INT32 dirDetRoll ; + STB_INT32 dirDetConf ; + STB_INT32 frDetID ; + STB_INT32 frDetConf ; + STB_STATUS frStatus ; +}FR_DET; + +/*----------------------------------------------------------------------------*/ +/* Eesult data of Execute command */ +/*----------------------------------------------------------------------------*/ +typedef struct{ + STB_INT32 num ; + FR_DET *fcDet ;/* Face Detection & Estimations results */ +}STB_FR_DET; + +/*----------------------------------------------------------------------------*/ +/* */ +/*----------------------------------------------------------------------------*/ +typedef struct{ + STB_INT32 nTraID ;/*Tracking person number in the through frame*/ + STB_RES frRecog ;/* Stabilization result of human [nTrackingID] */ +}FR_RES; + +/*----------------------------------------------------------------------------*/ +/* */ +/*----------------------------------------------------------------------------*/ +typedef struct{ + STB_INT32 frCnt ;/*a number of tracking people*/ + FR_RES *frFace ; +}STB_FR_RES; + + +#endif /*__STBFRTYPEDEF_H__*/ diff --git a/src/b5t007001/stblib/src/include/STBHandle.h b/src/b5t007001/stblib/src/include/STBHandle.h new file mode 100644 index 00000000..2a4602cd --- /dev/null +++ b/src/b5t007001/stblib/src/include/STBHandle.h @@ -0,0 +1,103 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef __STBHANDLE_H__ +#define __STBHANDLE_H__ + +#include "STBTypedefOutput.h" +#include "STBCommonType.h" +#include "SdkSTBTr.h" +#include "SdkSTBPe.h" +#include "SdkSTBFr.h" + + + + +typedef struct { + + STB_INT32 nDetID ; + STB_INT32 nTraID ; + STB_STATUS genStatus ;//Gender + STB_INT32 genConf ; + STB_INT32 genVal ; + STB_STATUS ageStatus ;//Age + STB_INT32 ageConf ; + STB_INT32 ageVal ; + STB_STATUS frStatus ;//Face recognition + STB_INT32 frConf ; + STB_INT32 frVal ; + STB_STATUS expStatus ;//Facial expression + STB_INT32 expVal ; + STB_INT32 expScore[STB_EX_MAX] ; + STB_INT32 expConf ; + STB_INT32 gazUD ;//Gaze + STB_INT32 gazLR ; + STB_STATUS gazStatus ; + STB_INT32 gazConf ; + STB_INT32 dirRoll ;//Face direction + STB_INT32 dirPitch ; + STB_INT32 dirYaw ; + STB_STATUS dirStatus ; + STB_INT32 dirConf ; + STB_INT32 bliL ;//Blink + STB_INT32 bliR ; + STB_STATUS bliStatus ; + +} FaceObj; + +typedef struct { + STB_INT32 nDetID ; + STB_INT32 nTraID ; + STB_POS pos ; + STB_INT32 size ; + STB_INT32 conf ; +} TraObj; + +typedef struct { + /*------------------------------*/ + STB_INT32 nInitialized;/* SetFrameResult already executed */ + STB_INT32 nExecuted ;/*Execute done*/ + STBExecFlg *execFlg ; + /*------------------------------*/ + STB_TR_HANDLE hTrHandle ; + STB_INT32 nDetCntBody ; + STB_INT32 nDetCntFace ; + STB_INT32 nTraCntBody ; + STB_INT32 nTraCntFace ; + TraObj *trFace ; + TraObj *trBody ; + /*------------------------------*/ + STB_PE_HANDLE hPeHandle ; + STB_FR_HANDLE hFrHandle ; + FaceObj *infoFace ; + /*------------------------------*/ + STB_INT8 *stbPtr ; + STB_INT32 nDetCntMax ; + STB_INT32 nTraCntMax ; + + + STB_TR_DET *wSrcTr ;/*TR : input data*/ + STB_TR_RES_FACES *wDstTrFace ;/*TR : output data*/ + STB_TR_RES_BODYS *wDstTrBody ;/*TR : output data*/ + STB_PE_DET *wSrcPe ;/*PR : Input data*/ + STB_PE_RES *wDstPe ;/*PE : Output data*/ + STB_FR_DET *wSrcFr ;/*FR : Input data*/ + STB_FR_RES *wDstFr ;/*FR : Output data*/ +} *STBHANDLE; + + + +#endif /*__STBHANDLE_H__*/ diff --git a/src/b5t007001/stblib/src/include/STBMakeResult.h b/src/b5t007001/stblib/src/include/STBMakeResult.h new file mode 100644 index 00000000..87ed6062 --- /dev/null +++ b/src/b5t007001/stblib/src/include/STBMakeResult.h @@ -0,0 +1,25 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef __STBMAKERESULT_h__ +#define __STBMAKERESULT_H__ + +#include "STBHandle.h" + +VOID SetFaceToResult(STB_INT32 TrackingNum,TraObj* dtfaces,FaceObj* faces, STB_FACE* result , const STBExecFlg* execFlg ); +VOID SetBodyToResult(STB_INT32 TrackingNum,TraObj* dtbodys, STB_BODY* result); + +#endif /*__STBMAKERESULT_H__*/ diff --git a/src/b5t007001/stblib/src/include/STBPeTypedef.h b/src/b5t007001/stblib/src/include/STBPeTypedef.h new file mode 100644 index 00000000..955a44b2 --- /dev/null +++ b/src/b5t007001/stblib/src/include/STBPeTypedef.h @@ -0,0 +1,79 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef __STBPETYPEDEF_H__ +#define __STBPETYPEDEF_H__ + +#include "STBTypedefOutput.h" +#include "STBCommonType.h" +#include "STBCommonDef.h" + + +/*----------------------------------------------------------------------------*/ +/* Face Detection & Estimations result (Property estimation input infomation) */ +/*----------------------------------------------------------------------------*/ +typedef struct{ + STB_INT32 nDetID ; /*Person number detected in the current frame*/ + STB_INT32 nTraID ; /*Tracking person number in the through frame*/ + STB_INT32 dirDetYaw ; + STB_INT32 dirDetPitch ; + STB_INT32 dirDetRoll ; + STB_INT32 dirDetConf ; + STB_INT32 ageDetVal ; + STB_INT32 ageDetConf ; + STB_STATUS ageStatus ; + STB_INT32 genDetVal ; + STB_INT32 genDetConf ; + STB_STATUS genStatus ; + STB_INT32 gazDetLR ; + STB_INT32 gazDetUD ; + STB_INT32 bliDetL ; + STB_INT32 bliDetR ; + STB_INT32 expDetVal[STB_EX_MAX]; + STB_INT32 expDetConf ; +}FACE_DET; + + +/*----------------------------------------------------------------------------*/ +/* Result data of Execute command (Property estimation input infomation) */ +/*----------------------------------------------------------------------------*/ +typedef struct{ + STB_INT32 num ; /*a number of tracking people*/ + FACE_DET *fcDet ; /* Detection & Estimations result */ +}STB_PE_DET; + +/*----------------------------------------------------------------------------*/ +/* Property estimation output infomation */ +/*----------------------------------------------------------------------------*/ +typedef struct { + STB_INT32 nTraID ; /*Tracking person number in the through frame*/ + STB_RES gen ; /* Stabilization result of human [nTrackingID] */ + STB_RES age ; /* Stabilization result of human [nTrackingID] */ + STB_RES exp ; /* Stabilization result of human [nTrackingID] */ + STB_GAZE gaz ; /* Stabilization result of human [nTrackingID] */ + STB_DIR dir ; + STB_BLINK bli ; +} STB_PE_FACE; + +/*----------------------------------------------------------------------------*/ +/* Property estimation output infomation */ +/*----------------------------------------------------------------------------*/ +typedef struct { + STB_INT32 peCnt ; /*a number of tracking people*/ + STB_PE_FACE *peFace ; +} STB_PE_RES; + +#endif /*__STBPETYPEDEF_H__*/ diff --git a/src/b5t007001/stblib/src/include/STBTrTypedef.h b/src/b5t007001/stblib/src/include/STBTrTypedef.h new file mode 100644 index 00000000..520cc80c --- /dev/null +++ b/src/b5t007001/stblib/src/include/STBTrTypedef.h @@ -0,0 +1,73 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef __STBTRTYPEDEF_H__ +#define __STBTRTYPEDEF_H__ + +#include "STBTypedefOutput.h" +#include "STBCommonType.h" +#include "STBCommonDef.h" + +/*----------------------------------------------------------------------------*/ +/* Struct */ +/*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*/ +/* Detection result (Tracking input infomation) */ +/*----------------------------------------------------------------------------*/ +typedef struct{ + STB_INT32 posX ; /* Center x-coordinate */ + STB_INT32 posY ; /* Center y-coordinate */ + STB_INT32 size ; /* Size */ + STB_INT32 conf ; /* Degree of confidence */ +}ROI_DET; +/*----------------------------------------------------------------------------*/ +/* Result data (Tracking input infomation) */ +/*----------------------------------------------------------------------------*/ +typedef struct{ + STB_INT32 fcNum ; /*a number of detected face*/ + ROI_DET * fcDet ; /* face rectangle data */ + STB_INT32 bdNum ; /*a number of body detection*/ + ROI_DET * bdDet ; /*Body rectangular data*/ +}STB_TR_DET; +/*----------------------------------------------------------------------------*/ +/* Tracking object result (Tracking output infomation) */ +/*----------------------------------------------------------------------------*/ +typedef struct { + STB_INT32 nDetID ; /*previous detected result ID*/ + STB_INT32 nTraID ; /*Tracking ID*/ + STB_POS pos ; /* Stabilization of coordinates */ + STB_INT32 size ; /*Stabilization of face size*/ + STB_INT32 conf ; /*tracking confidence*/ +} STB_TR_RES; +/*----------------------------------------------------------------------------*/ +/* Faces tracking result (Tracking output infomation) */ +/*----------------------------------------------------------------------------*/ +typedef struct { + STB_INT32 cnt ; /*a number of facial information during tracking*/ + STB_TR_RES* face ; /*the facial information during tracking */ +} STB_TR_RES_FACES; +/*----------------------------------------------------------------------------*/ +/* Faces tracking result (Tracking output infomation) */ +/*----------------------------------------------------------------------------*/ +typedef struct { + STB_INT32 cnt ; /*a number of human body during tracking*/ + STB_TR_RES* body ; /*the human body information during tracking*/ +} STB_TR_RES_BODYS; + + + +#endif /*__STBTRTYPEDEF_H__*/ diff --git a/src/b5t007001/stblib/src/include/STBTracking.h b/src/b5t007001/stblib/src/include/STBTracking.h new file mode 100644 index 00000000..aba2e5bc --- /dev/null +++ b/src/b5t007001/stblib/src/include/STBTracking.h @@ -0,0 +1,31 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef STBTRACKING_H__ +#define STBTRACKING_H__ +#include "STBTypedefInput.h" +#include "STBHandle.h" + +VOID SetTrackingObjectBody ( const STB_FRAME_RESULT_BODYS* stbINPUTbodys,TraObj *bodys); +VOID SetTrackingObjectFace ( const STB_FRAME_RESULT_FACES *stbINPUTfaces,TraObj *faces); + +VOID SetTrackingInfoToFace ( STB_TR_RES_FACES *fdResult,STB_INT32 *pnTrackingNum,TraObj *faces); +VOID SetTrackingInfoToBody ( STB_TR_RES_BODYS *bdResult,STB_INT32 *pnTrackingNum,TraObj *bodys); + +VOID SetSrcTrFace ( STB_INT32 nDetCntFace , TraObj *trFace, STB_TR_DET *trSrcInfo); +VOID SetSrcTrBody ( STB_INT32 nDetCntBody , TraObj *trBody, STB_TR_DET *trSrcInfo); + +#endif \ No newline at end of file diff --git a/src/b5t007001/stblib/src/include/STBTypedefInput.h b/src/b5t007001/stblib/src/include/STBTypedefInput.h new file mode 100644 index 00000000..03fc2fcc --- /dev/null +++ b/src/b5t007001/stblib/src/include/STBTypedefInput.h @@ -0,0 +1,131 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef __STB_OKOA_RESULT_H__ +#define __STB_OKOA_RESULT_H__ + +#ifndef VOID +#define VOID void +#endif + +typedef signed char STB_INT8 ; /*8-bit signed integer*/ +typedef unsigned char STB_UINT8 ; /*8-bit unsigned integer*/ +typedef signed short STB_INT16 ; /*16-bit signed integer*/ +typedef unsigned short STB_UINT16 ; /*16-bit unsigned integer*/ +typedef int STB_INT32 ; /*32 bit signed integer*/ +typedef unsigned int STB_UINT32 ; /*32 bit unsigned integer*/ +typedef float STB_FLOAT32 ; /*32-bit floating point number*/ +typedef double STB_FLOAT64 ; /*64-bit floating point number*/ + +typedef enum { + STB_Expression_Neutral, + STB_Expression_Happiness, + STB_Expression_Surprise, + STB_Expression_Anger, + STB_Expression_Sadness, + STB_Expression_Max +} STB_OKAO_EXPRESSION; + +typedef struct { + STB_INT32 nX; + STB_INT32 nY; +} STB_POINT; + +/*Face direction estimation*/ +typedef struct { + STB_INT32 nLR; + STB_INT32 nUD; + STB_INT32 nRoll; + STB_INT32 nConfidence; +} STB_FRAME_RESULT_DIRECTION; + +/*Age estimation*/ +typedef struct { + STB_INT32 nAge; + STB_INT32 nConfidence; +} STB_FRAME_RESULT_AGE; + +/*Gender estimation*/ +typedef struct { + STB_INT32 nGender; + STB_INT32 nConfidence; +} STB_FRAME_RESULT_GENDER; + +/*Gaze estimation*/ +typedef struct { + STB_INT32 nLR; + STB_INT32 nUD; +} STB_FRAME_RESULT_GAZE; + +/*Blink estimation*/ +typedef struct { + STB_INT32 nLeftEye; + STB_INT32 nRightEye; +} STB_FRAME_RESULT_BLINK; + +/*estimation of facial expression*/ +typedef struct { + STB_INT32 anScore[STB_Expression_Max] ; + STB_INT32 nDegree; +} STB_FRAME_RESULT_EXPRESSION; + +/*Face recognition*/ +typedef struct { + STB_INT32 nUID; + STB_INT32 nScore; +} STB_FRAME_RESULT_RECOGNITION; + +/*One detection result*/ +typedef struct { + STB_POINT center; + STB_INT32 nSize; + STB_INT32 nConfidence ; +} STB_FRAME_RESULT_DETECTION; + +/*Face detection and post-processing result (1 person)*/ +typedef struct { + STB_POINT center; + STB_INT32 nSize; + STB_INT32 nConfidence; + STB_FRAME_RESULT_DIRECTION direction; + STB_FRAME_RESULT_AGE age; + STB_FRAME_RESULT_GENDER gender; + STB_FRAME_RESULT_GAZE gaze; + STB_FRAME_RESULT_BLINK blink; + STB_FRAME_RESULT_EXPRESSION expression; + STB_FRAME_RESULT_RECOGNITION recognition; +} STB_FRAME_RESULT_FACE; + +/*One human body detection result*/ +typedef struct { + STB_INT32 nCount; + STB_FRAME_RESULT_DETECTION body[35]; +} STB_FRAME_RESULT_BODYS; + +/*Face detection and post-processing result (1 frame)*/ +typedef struct { + STB_INT32 nCount; + STB_FRAME_RESULT_FACE face[35]; +} STB_FRAME_RESULT_FACES; + + +/*FRAME result (1 frame)*/ +typedef struct { + STB_FRAME_RESULT_BODYS bodys; + STB_FRAME_RESULT_FACES faces; +} STB_FRAME_RESULT; + +#endif /*__HVCW_RESULT_H__*/ diff --git a/src/b5t007001/stblib/src/include/STBTypedefOutput.h b/src/b5t007001/stblib/src/include/STBTypedefOutput.h new file mode 100644 index 00000000..d8186789 --- /dev/null +++ b/src/b5t007001/stblib/src/include/STBTypedefOutput.h @@ -0,0 +1,119 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + + +#ifndef STBTYPEDEF_H__ +#define STBTYPEDEF_H__ + +#ifndef VOID +#define VOID void +#endif + +typedef signed char STB_INT8 ; /*8-bit signed integer*/ +typedef unsigned char STB_UINT8 ; /*8-bit unsigned integer*/ +typedef signed short STB_INT16 ; /*16-bit signed integer*/ +typedef unsigned short STB_UINT16 ; /*16-bit unsigned integer*/ +typedef int STB_INT32 ; /*32 bit signed integer*/ +typedef unsigned int STB_UINT32 ; /*32 bit unsigned integer*/ +typedef float STB_FLOAT32 ; /*32-bit floating point number*/ +typedef double STB_FLOAT64 ; /*64-bit floating point number*/ + + +typedef enum { + STB_STATUS_NO_DATA = -1, /*No data : No data for the relevant person*/ + STB_STATUS_CALCULATING = 0, /* during stabilization : a number of data for relevant people aren't enough(a number of frames that relevant people are taken) */ + STB_STATUS_COMPLETE = 1, /*stabilization done : the frames which done stabilization*/ + STB_STATUS_FIXED = 2, /*stabilization fixed : already stabilization done, the results is fixed*/ +} STB_STATUS;/*Status of stabilization*/ + +#define STB_CONF_NO_DATA -1 /*No confidence(No data or in the case of stabilization time)*/ + +/* Expression */ +typedef enum { + STB_EX_UNKNOWN = -1, + STB_EX_NEUTRAL = 0, + STB_EX_HAPPINESS, + STB_EX_SURPRISE, + STB_EX_ANGER, + STB_EX_SADNESS, + STB_EX_MAX +}STB_EXPRESSION; + +/*General purpose stabilization result structure*/ +typedef struct { + STB_STATUS status;/* Stabilization status */ + STB_INT32 conf; /* Stabilization confidence */ + STB_INT32 value; +} STB_RES; + +/*result of Gaze estimation*/ +typedef struct { + STB_STATUS status;/* Stabilization status */ + STB_INT32 conf; /* Stabilization confidence */ + STB_INT32 UD; + STB_INT32 LR; +} STB_GAZE; + +/*Face direction result*/ +typedef struct { + STB_STATUS status;/* Stabilization status */ + STB_INT32 conf; /* Stabilization confidence */ + STB_INT32 yaw; + STB_INT32 pitch; + STB_INT32 roll; +} STB_DIR; + +/*result of Blink estimation*/ +typedef struct { + STB_STATUS status;/* Stabilization status */ + STB_INT32 ratioL; + STB_INT32 ratioR; +} STB_BLINK; + +/*Detection position structure*/ +typedef struct { + STB_UINT32 x; + STB_UINT32 y; +} STB_POS; + +/*Face stabilization result structure*/ +typedef struct { + STB_INT32 nDetectID; + STB_INT32 nTrackingID; + STB_POS center; + STB_UINT32 nSize; + STB_INT32 conf; + STB_DIR direction; + STB_RES age; + STB_RES gender; + STB_GAZE gaze; + STB_BLINK blink; + STB_RES expression; + STB_RES recognition; +} STB_FACE; + +/*Human body result structure*/ +typedef struct { + STB_INT32 nDetectID; + STB_INT32 nTrackingID; + STB_POS center; + STB_UINT32 nSize; + STB_INT32 conf; +} STB_BODY; + + + +#endif /* STBTYPEDEF_H__ */ diff --git a/src/b5t007001/stblib/src/include/STB_Debug.h b/src/b5t007001/stblib/src/include/STB_Debug.h new file mode 100644 index 00000000..60b1f0c5 --- /dev/null +++ b/src/b5t007001/stblib/src/include/STB_Debug.h @@ -0,0 +1,27 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef __STB_DEBUG_H__ +#define __STB_DEBUG_H__ +#ifdef _DEBUG +#include +#define ASSERT(x) assert(x) +#else +#define ASSERT(x) +#endif /* _DEBUG */ + +#endif /*__STB_DEBUG_H__*/ + diff --git a/src/b5t007001/stblib/src/include/SdkSTBFr.h b/src/b5t007001/stblib/src/include/SdkSTBFr.h new file mode 100644 index 00000000..4e35c8fc --- /dev/null +++ b/src/b5t007001/stblib/src/include/SdkSTBFr.h @@ -0,0 +1,43 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#if !defined( _SDK_STBFR_H_ ) +#define _SDK_STBFR_H_ +#include "STBFrTypedef.h" + +#if !defined( STB_DEF_FR_HANDLE ) + #define STB_DEF_FR_HANDLE + typedef VOID* STB_FR_HANDLE; +#endif + +STB_FR_HANDLE STB_Fr_CreateHandle ( const STB_INT32 nTraCntMax );/*Create/Delete handle*/ +STB_INT32 STB_Fr_DeleteHandle ( STB_FR_HANDLE handle );/*Create/Delete handle*/ +STB_INT32 STB_Fr_SetDetect ( STB_FR_HANDLE handle, const STB_FR_DET *stbFrDet );/*Frame information settings*/ +STB_INT32 STB_Fr_Execute ( STB_FR_HANDLE handle );/*Main process execution*/ +STB_INT32 STB_Fr_GetResult ( STB_FR_HANDLE handle, STB_FR_RES* frResult );/*Get result*/ +STB_INT32 STB_Fr_Clear ( STB_FR_HANDLE handle );/*Clear*/ + +/*parameter*/ +STB_INT32 STB_Fr_SetFaceDirMinMax ( STB_FR_HANDLE handle , STB_INT32 nMinUDAngle , STB_INT32 nMaxUDAngle ,STB_INT32 nMinLRAngle , STB_INT32 nMaxLRAngle );/* FaceDirMinMax */ +STB_INT32 STB_Fr_GetFaceDirMinMax ( STB_FR_HANDLE handle , STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle ,STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle); +STB_INT32 STB_Fr_Clear ( STB_FR_HANDLE handle );/* ClearID */ +STB_INT32 STB_Fr_SetFaceDirThreshold ( STB_FR_HANDLE handle , STB_INT32 threshold );/* FaceDirThreshold */ +STB_INT32 STB_Fr_GetFaceDirThreshold ( STB_FR_HANDLE handle , STB_INT32* threshold ); +STB_INT32 STB_Fr_SetFrameCount ( STB_FR_HANDLE handle , STB_INT32 nFrameCount ); +STB_INT32 STB_Fr_GetFrameCount ( STB_FR_HANDLE handle , STB_INT32* nFrameCount ); +STB_INT32 STB_Fr_SetMinRatio ( STB_FR_HANDLE handle , STB_INT32 nMinRatio ); +STB_INT32 STB_Fr_GetMinRatio ( STB_FR_HANDLE handle , STB_INT32* nMinRatio ); +#endif diff --git a/src/b5t007001/stblib/src/include/SdkSTBPe.h b/src/b5t007001/stblib/src/include/SdkSTBPe.h new file mode 100644 index 00000000..01ed7670 --- /dev/null +++ b/src/b5t007001/stblib/src/include/SdkSTBPe.h @@ -0,0 +1,41 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#if !defined( _SDK_STBPE_H_ ) +#define _SDK_STBPE_H_ +#include "STBPeTypedef.h" + +#if !defined( STB_DEF_PE_HANDLE ) + #define STB_DEF_PE_HANDLE + typedef VOID* STB_PE_HANDLE; +#endif + +STB_PE_HANDLE STB_Pe_CreateHandle ( const STBExecFlg* execFlg ,const STB_INT32 nTraCntMax );/*Create/Delete handle*/ +STB_INT32 STB_Pe_DeleteHandle ( STB_PE_HANDLE handle );/*Create/Delete handle*/ +STB_INT32 STB_Pe_SetDetect ( STB_PE_HANDLE handle, const STB_PE_DET *stbPeDet );/*Frame information settings*/ +STB_INT32 STB_Pe_Execute ( STB_PE_HANDLE handle );/*Main process execution*/ +STB_INT32 STB_Pe_GetResult ( STB_PE_HANDLE handle, STB_PE_RES* peResult );/*Get result*/ + +/*parameter*/ +STB_INT32 STB_Pe_SetFaceDirMinMax ( STB_PE_HANDLE handle , STB_INT32 nMinUDAngle , STB_INT32 nMaxUDAngle ,STB_INT32 nMinLRAngle , STB_INT32 nMaxLRAngle );/* FaceDirMinMax */ +STB_INT32 STB_Pe_GetFaceDirMinMax ( STB_PE_HANDLE handle , STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle ,STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle); +STB_INT32 STB_Pe_Clear ( STB_PE_HANDLE handle );/* Clear */ +STB_INT32 STB_Pe_SetFaceDirThreshold ( STB_PE_HANDLE handle , STB_INT32 threshold );/* FaceDirThreshold */ +STB_INT32 STB_Pe_GetFaceDirThreshold ( STB_PE_HANDLE handle , STB_INT32* threshold ); +STB_INT32 STB_Pe_SetFrameCount ( STB_PE_HANDLE handle , STB_INT32 nFrameCount ); +STB_INT32 STB_Pe_GetFrameCount ( STB_PE_HANDLE handle , STB_INT32* nFrameCount ); + +#endif diff --git a/src/b5t007001/stblib/src/include/SdkSTBTr.h b/src/b5t007001/stblib/src/include/SdkSTBTr.h new file mode 100644 index 00000000..b209d5dc --- /dev/null +++ b/src/b5t007001/stblib/src/include/SdkSTBTr.h @@ -0,0 +1,42 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#if !defined( _SDK_STBTR_H_ ) +#define _SDK_STBTR_H_ + +#include "STBTrTypedef.h" + +#if !defined( STB_DEF_TR_HANDLE ) + #define STB_DEF_TR_HANDLE + typedef VOID* STB_TR_HANDLE; +#endif + +STB_TR_HANDLE STB_Tr_CreateHandle ( const STBExecFlg* execFlg ,const STB_INT32 nDetCntMax, const STB_INT32 nTraCntMax);/*Create/Delete handle*/ + +STB_INT32 STB_Tr_DeleteHandle ( STB_TR_HANDLE handle );/*Create/Delete handle*/ +STB_INT32 STB_Tr_SetDetect ( STB_TR_HANDLE handle,const STB_TR_DET *stbTrDet );/*Frame information settings*/ +STB_INT32 STB_Tr_Execute ( STB_TR_HANDLE handle );/*Main process execution*/ +STB_INT32 STB_Tr_GetResult ( STB_TR_HANDLE handle,STB_TR_RES_FACES* fcResult,STB_TR_RES_BODYS* bdResult);/*get the result*/ +STB_INT32 STB_Tr_Clear ( STB_TR_HANDLE handle); + +/*parameter*/ +STB_INT32 STB_Tr_SetRetryCount ( STB_TR_HANDLE handle , STB_INT32 nRetryCount );/*RetryCount*/ +STB_INT32 STB_Tr_GetRetryCount ( STB_TR_HANDLE handle , STB_INT32* nRetryCount ); +STB_INT32 STB_Tr_SetStedinessParam ( STB_TR_HANDLE handle , STB_INT32 nStedinessPos , STB_INT32 nStedinessSize );/* Stediness */ +STB_INT32 STB_Tr_GetStedinessParam ( STB_TR_HANDLE handle , STB_INT32* nStedinessPos , STB_INT32* nStedinessSize ); + + +#endif diff --git a/src/b5t007001/stblib/usr_include/STBAPI.h b/src/b5t007001/stblib/usr_include/STBAPI.h new file mode 100644 index 00000000..1cafec79 --- /dev/null +++ b/src/b5t007001/stblib/usr_include/STBAPI.h @@ -0,0 +1,76 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef _SDK_STB_H_ +#define _SDK_STB_H_ + +#include "STBTypedef.h" + + +#ifndef STB_DEF_HANDLE + #define STB_DEF_HANDLE + typedef VOID* HSTB; +#endif /* STB_DEF_HANDLE */ + +#ifdef __cplusplus +extern "C" { +#endif + +STB_INT32 STB_GetVersion(STB_INT8* pnMajorVersion, STB_INT8* pnMinorVersion); + +/* Create/Delete handle */ +HSTB STB_CreateHandle(STB_UINT32 unUseFuncFlag); +VOID STB_DeleteHandle(HSTB hSTB); + +/* Set the one frame result of HVC into this library */ +STB_INT32 STB_SetFrameResult(HSTB hSTB, const STB_FRAME_RESULT *stFrameResult); +/* Clear frame results */ +STB_INT32 STB_ClearFrameResults(HSTB hSTB); + +/* Main process execution */ +STB_INT32 STB_Execute(HSTB hSTB); + +/* Get the result */ +STB_INT32 STB_GetFaces(HSTB hSTB, STB_UINT32 *punFaceCount, STB_FACE stFace[]); +STB_INT32 STB_GetBodies(HSTB hSTB, STB_UINT32 *punBodyCount, STB_BODY stBody[]); + +/* Setting/Getting functions for tracking */ +STB_INT32 STB_SetTrRetryCount(HSTB hSTB, STB_INT32 nMaxRetryCount); +STB_INT32 STB_GetTrRetryCount(HSTB hSTB, STB_INT32 *pnMaxRetryCount); +STB_INT32 STB_SetTrSteadinessParam(HSTB hSTB, STB_INT32 nPosSteadinessParam, STB_INT32 nSizeSteadinessParam); +STB_INT32 STB_GetTrSteadinessParam(HSTB hSTB, STB_INT32 *pnPosSteadinessParam, STB_INT32 *pnSizeSteadinessParam); +/* Setting/Getting functions for property */ +STB_INT32 STB_SetPeThresholdUse(HSTB hSTB, STB_INT32 nThreshold); +STB_INT32 STB_GetPeThresholdUse(HSTB hSTB, STB_INT32 *pnThreshold); +STB_INT32 STB_SetPeAngleUse(HSTB hSTB, STB_INT32 nMinUDAngle, STB_INT32 nMaxUDAngle, STB_INT32 nMinLRAngle, STB_INT32 nMaxLRAngle); +STB_INT32 STB_GetPeAngleUse(HSTB hSTB, STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle, STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle); +STB_INT32 STB_SetPeCompleteFrameCount(HSTB hSTB, STB_INT32 nFrameCount); +STB_INT32 STB_GetPeCompleteFrameCount(HSTB hSTB, STB_INT32 *pnFrameCount); +/* Setting/Getting function for recognition */ +STB_INT32 STB_SetFrThresholdUse(HSTB hSTB, STB_INT32 nThreshold); +STB_INT32 STB_GetFrThresholdUse(HSTB hSTB, STB_INT32 *pnThreshold); +STB_INT32 STB_SetFrAngleUse(HSTB hSTB, STB_INT32 nMinUDAngle, STB_INT32 nMaxUDAngle, STB_INT32 nMinLRAngle, STB_INT32 nMaxLRAngle); +STB_INT32 STB_GetFrAngleUse(HSTB hSTB, STB_INT32 *pnMinUDAngle, STB_INT32 *pnMaxUDAngle, STB_INT32 *pnMinLRAngle, STB_INT32 *pnMaxLRAngle); +STB_INT32 STB_SetFrCompleteFrameCount(HSTB hSTB, STB_INT32 nFrameCount); +STB_INT32 STB_GetFrCompleteFrameCount(HSTB hSTB, STB_INT32 *pnFrameCount); +STB_INT32 STB_SetFrMinRatio(HSTB hSTB, STB_INT32 nMinRatio); +STB_INT32 STB_GetFrMinRatio(HSTB hSTB, STB_INT32 *pnMinRatio); + +#ifdef __cplusplus +} +#endif + +#endif /* _SDK_STB_H_ */ diff --git a/src/b5t007001/stblib/usr_include/STBCommonDef.h b/src/b5t007001/stblib/usr_include/STBCommonDef.h new file mode 100644 index 00000000..f1d0a2d3 --- /dev/null +++ b/src/b5t007001/stblib/usr_include/STBCommonDef.h @@ -0,0 +1,52 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef __STB_COMMONDEF_H__ +#define __STB_COMMONDEF_H__ +#include + +/* Executed flag */ +#define STB_FUNC_BD (0x00000001U) /* [LSB]bit0: Body Tracking 00000000001 */ +#define STB_FUNC_DT (0x00000004U) /* [LSB]bit2: Face Tracking 00000000100 */ +#define STB_FUNC_PT (0x00000008U) /* [LSB]bit3: Face Direction 00000001000 */ +#define STB_FUNC_AG (0x00000010U) /* [LSB]bit4: Age Estimation 00000010000 */ +#define STB_FUNC_GN (0x00000020U) /* [LSB]bit5: Gender Estimation 00000100000 */ +#define STB_FUNC_GZ (0x00000040U) /* [LSB]bit6: Gaze Estimation 00001000000 */ +#define STB_FUNC_BL (0x00000080U) /* [LSB]bit7: Blink Estimation 00010000000 */ +#define STB_FUNC_EX (0x00000100U) /* [MSB]bit0: Expression Estimation 00100000000 */ +#define STB_FUNC_FR (0x00000200U) /* [MSB]bit1: Face Recognition 01000000000 */ + + + +/* STB library's error code */ +#define STB_NORMAL (0) /* Successful completion */ +#define STB_ERR_INITIALIZE (-2) /* Initialization error */ +#define STB_ERR_INVALIDPARAM (-3) /* Argument error */ +#define STB_ERR_NOHANDLE (-7) /* Handle error */ +#define STB_ERR_PROCESSCONDITION (-8) /* When the processing condition is not satisfied */ + +#define STB_TRUE (1) +#define STB_FALSE (0) + + + +#if !defined(STB_API) +/* Import (Application Default) */ + #define STB_API __declspec( dllimport ) +#endif /* OKAO_API || OMCV_API */ + +#endif /* __STB_COMMONDEF_H__ */ + diff --git a/src/b5t007001/stblib/usr_include/STBTypedef.h b/src/b5t007001/stblib/usr_include/STBTypedef.h new file mode 100644 index 00000000..71e8df0f --- /dev/null +++ b/src/b5t007001/stblib/usr_include/STBTypedef.h @@ -0,0 +1,227 @@ +/*---------------------------------------------------------------------------*/ +/* Copyright(C) 2017 OMRON Corporation */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ +/*---------------------------------------------------------------------------*/ + +#ifndef __STB_TYPEDEF_H__ +#define __STB_TYPEDEF_H__ + + +#ifndef VOID +#define VOID void +#endif /* VOID */ + +typedef signed char STB_INT8 ; /* 8-bit signed integer */ +typedef unsigned char STB_UINT8 ; /* 8-bit unsigned integer */ +typedef signed short STB_INT16 ; /* 16-bit signed integer */ +typedef unsigned short STB_UINT16 ; /* 16-bit unsigned integer */ +typedef int STB_INT32 ; /* 32 bit signed integer */ +typedef unsigned int STB_UINT32 ; /* 32 bit unsigned integer */ +typedef float STB_FLOAT32 ; /* 32-bit floating point number */ +typedef double STB_FLOAT64 ; /* 64-bit floating point number */ + + + +/****************************************/ +/* INPUT data strucrure to STBLib. */ +/****************************************/ + +typedef enum { + STB_Expression_Neutral, + STB_Expression_Happiness, + STB_Expression_Surprise, + STB_Expression_Anger, + STB_Expression_Sadness, + STB_Expression_Max +} STB_OKAO_EXPRESSION; + +typedef struct { + STB_INT32 nX; + STB_INT32 nY; +} STB_POINT; + +/* Face direction estimation */ +typedef struct { + STB_INT32 nLR; + STB_INT32 nUD; + STB_INT32 nRoll; + STB_INT32 nConfidence; +} STB_FRAME_RESULT_DIRECTION; + +/* Age estimation */ +typedef struct { + STB_INT32 nAge; + STB_INT32 nConfidence; +} STB_FRAME_RESULT_AGE; + +/* Gender estimation */ +typedef struct { + STB_INT32 nGender; + STB_INT32 nConfidence; +} STB_FRAME_RESULT_GENDER; + +/* Gaze estimation */ +typedef struct { + STB_INT32 nLR; + STB_INT32 nUD; +} STB_FRAME_RESULT_GAZE; + +/* Blink estimation */ +typedef struct { + STB_INT32 nLeftEye; + STB_INT32 nRightEye; +} STB_FRAME_RESULT_BLINK; + +/* Facial expression estimation */ +typedef struct { + STB_INT32 anScore[STB_Expression_Max]; + STB_INT32 nDegree; +} STB_FRAME_RESULT_EXPRESSION; + +/* Face recognition */ +typedef struct { + STB_INT32 nUID; + STB_INT32 nScore; +} STB_FRAME_RESULT_RECOGNITION; + +/* One detection result */ +typedef struct { + STB_POINT center; + STB_INT32 nSize; + STB_INT32 nConfidence ; +} STB_FRAME_RESULT_DETECTION; + +/* Face detection and post-processing result (1 person) */ +typedef struct { + STB_POINT center; + STB_INT32 nSize; + STB_INT32 nConfidence; + STB_FRAME_RESULT_DIRECTION direction; + STB_FRAME_RESULT_AGE age; + STB_FRAME_RESULT_GENDER gender; + STB_FRAME_RESULT_GAZE gaze; + STB_FRAME_RESULT_BLINK blink; + STB_FRAME_RESULT_EXPRESSION expression; + STB_FRAME_RESULT_RECOGNITION recognition; +} STB_FRAME_RESULT_FACE; + +/* One human body detection result */ +typedef struct { + STB_INT32 nCount; + STB_FRAME_RESULT_DETECTION body[35]; +} STB_FRAME_RESULT_BODYS; + +/* Face detection and post-processing result (1 frame) */ +typedef struct { + STB_INT32 nCount; + STB_FRAME_RESULT_FACE face[35]; +} STB_FRAME_RESULT_FACES; + +/* FRAME result (1 frame) */ +typedef struct { + STB_FRAME_RESULT_BODYS bodys; + STB_FRAME_RESULT_FACES faces; +} STB_FRAME_RESULT; + + +/****************************************/ +/* OUTPUT data strucrure from STBLib. */ +/****************************************/ + +#define STB_CONF_NO_DATA -1 /* No confidence (No data or in the case of stabilization time) */ + +typedef enum { + STB_STATUS_NO_DATA = -1, /* No data : No data for the relevant person */ + STB_STATUS_CALCULATING = 0, /* During stabilization : a number of data for relevant people aren't enough(a number of frames that relevant people are taken) */ + STB_STATUS_COMPLETE = 1, /* Stabilization done : the frames which done stabilization */ + STB_STATUS_FIXED = 2, /* Stabilization fixed : already stabilization done, the results is fixed */ +} STB_STATUS; /* Status of stabilization */ + + +/* Expression */ +typedef enum { + STB_EX_UNKNOWN = -1, + STB_EX_NEUTRAL = 0, + STB_EX_HAPPINESS, + STB_EX_SURPRISE, + STB_EX_ANGER, + STB_EX_SADNESS, + STB_EX_MAX +}STB_EXPRESSION; + +/* General purpose stabilization result structure */ +typedef struct { + STB_STATUS status; /* Stabilization status */ + STB_INT32 conf; /* Stabilization confidence */ + STB_INT32 value; +} STB_RES; + +/* Result of Gaze estimation */ +typedef struct { + STB_STATUS status; /* Stabilization status */ + STB_INT32 conf; /* Stabilization confidence */ + STB_INT32 UD; + STB_INT32 LR; +} STB_GAZE; + +/* Result of Face direction estimation */ +typedef struct { + STB_STATUS status; /* Stabilization status */ + STB_INT32 conf; /* Stabilization confidence */ + STB_INT32 yaw; + STB_INT32 pitch; + STB_INT32 roll; +} STB_DIR; + +/* Result of Blink estimation */ +typedef struct { + STB_STATUS status; /* Stabilization status */ + STB_INT32 ratioL; + STB_INT32 ratioR; +} STB_BLINK; + +/* Detection position structure */ +typedef struct { + STB_UINT32 x; + STB_UINT32 y; +} STB_POS; + +/* Face stabilization result structure */ +typedef struct { + STB_INT32 nDetectID; + STB_INT32 nTrackingID; + STB_POS center; + STB_UINT32 nSize; + STB_INT32 conf; + STB_DIR direction; + STB_RES age; + STB_RES gender; + STB_GAZE gaze; + STB_BLINK blink; + STB_RES expression; + STB_RES recognition; +} STB_FACE; + +/* Human body stabilization result structure */ +typedef struct { + STB_INT32 nDetectID; + STB_INT32 nTrackingID; + STB_POS center; + STB_UINT32 nSize; + STB_INT32 conf; +} STB_BODY; + + +#endif /* __STB_TYPEDEF_H__ */ +