Sample program for communicating with Fujitsuu IoT Platform using HTTP
Dependencies: AsciiFont GR-PEACH_video GraphicsFramework LCD_shield_config R_BSP USBHost_custom easy-connect-gr-peach mbed-http picojson BM1383GLV KX022 rohm-sensor-hal rohm-bh1745
Overview
This sample program shows how to send the cognitive data and sensing data gathered by Omron HVC-P2 and Rohm Sensor Shield respectively to IoT Platform managed by FUJITSU ( http://jp.fujitsu.com/solutions/cloud/k5/function/paas/iot-platform/ ).
Required Hardware
- GR-PEACH ( https://developer.mbed.org/platforms/Renesas-GR-PEACH/ )
- LCD Shield ( https://developer.mbed.org/teams/Renesas/Wiki/LCD-shield )
- HVC-P2 ( Human Vision Components B5T-007001 ) ( https://plus-sensin.omron.com/product/B5T-007001/ )
- SensorShield-EVK-001 ( Rohm Sensor Evaluation Kit ) ( http://www.rohm.com/web/global/sensor-shield-support )
Application Setup
- Configure the connection type. For details, please refer to the following link:
https://developer.mbed.org/teams/Renesas/code/GR-PEACH_IoT_Platform_HTTP_sample/wiki/Connection-Type - Configure Ethernet settings. For details, please refer to the following link:
https://developer.mbed.org/teams/Renesas/code/GR-PEACH_IoT_Platform_HTTP_sample/wiki/Ethernet-settings - Set up the Access Code of resource where the gathered data would be stored. For details on Access Code, please refer to the following links:
https://iot-docs.jp-east-1.paas.cloud.global.fujitsu.com/en/manual/userguide_en.pdf
https://iot-docs.jp-east-1.paas.cloud.global.fujitsu.com/en/manual/apireference_en.pdf
https://iot-docs.jp-east-1.paas.cloud.global.fujitsu.com/en/manual/portalmanual_en.pdf
- Set up URI for the resource where the gathered data would be stored. For details, please refer to the following link:
https://iot-docs.jp-east-1.paas.cloud.global.fujitsu.com/en/manual/userguide_en.pdf
https://iot-docs.jp-east-1.paas.cloud.global.fujitsu.com/en/manual/apireference_en.pdf
Building Example
- Import this sample program onto mbed Compiler
- Configure the program in accordance with the description of Application Setup above
- Compile the sample program
- Plug the Ethernet cable into GR-PEACH if you would like Ethernet mode
- Plug micro-USB cable into the OpenSDA port which lies on the next to the RESET button
- Copy the binary previously downloaded to your PC to GR-PEACH in order to flash this program. When the copy is successfully completed, the drive named MBED should be re-mounted automatically
- Press the RESET button on the board to run the sample application
Data Format sent to IoT Platform
In this sample program, the cognitive data and sensing data are serialized into the following JSON format using picojson (https://developer.mbed.org/users/mimil/code/picojson/):
- Face detection data
{ "RecordType": "HVC-P2(face)", "id": "<GR-PEACH ID>-<Sensor ID>", "Age": xxx, "FaceRectangle": { "Height": xxx, "Left": xxx, "Top": xxx, "Width": xxx }, "Gender": xxx, "Scores": { "Anger": xxx, "Happiness": xxx, "Neutral": xxx, "Sadness": xxx, "Surprise": xxx } }
- Body detection data
{ "RecodeType": "HVC-P2(body)", "id": "<GR-PEACH ID>-<Sensor ID>", "BodyRectangle": { "Height": xxx, "Left": xxx, "Top": xxx, "Width": xxx } }
- Accelerometer data
{ "RecodeType": "Accelerometer", "id": "<GR-PEACH ID>-<Sensor ID>", "data": [ acceleratoin(x-direction), acceleration(y-direction), acceleration(z-direction), null, null, null ] }
Note that data[0], data[1] and data[2] are filled with the acceleration data in x, y and z direction respectively, and the remaining elements are filled with null.
- Atmosphere data
{ "RecodeType": "Atmosphere", "id": "<GR-PEACH ID>-<Sensor ID>", "data": [ atmosphere data, null, null, null, null, null ] }
Note that data[0] is filled with atmosphere data, and the remaining elements are filled with null.
- Color sensor data
{ "RecodeType": "Color", "id": "<GR-PEACH ID>-<Sensor ID>", "data": [ Red, Green, Blue, Alpha, null, null] }
Note that data[0], data[1], data[2] and data[3] are filled with Red, Green, Blue and Alpha elements of color respectively, and the remaining elements are filled with null.
- Temperature data
{ "RecodeType": "Temperature", "id": "<GR-PEACH ID>-<Sensor ID>", "data": [ Temperature, null, null, null, null, null ] }
Note that data[0] is filled with temperature data, the remaining elements are filled with null.
- Geomagnetism
{ "RecodeType": "Geomagnetism", "id": "<GR-PEACH ID>-<Sensor ID>", "data": [ geomagnetism(x-direction), geomagnetism(y-direction), geomagnetism(z-direction), null, null, null] }
Note that data[0], data[1] and data[2] are filled with the geomagnetism data in x, y and z direction respectively, and the remaining elements are filled with null.
HVCApi/HVCDef.h@7:9ae73f85dc04, 2018-04-12 (annotated)
- Committer:
- Osamu Nakamura
- Date:
- Thu Apr 12 19:04:23 2018 +0900
- Revision:
- 7:9ae73f85dc04
- Parent:
- 0:8373b6833bde
Update BM1422AGMV driver so that it can be compiled by ARMCC
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Osamu Nakamura |
0:8373b6833bde | 1 | /*---------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 2 | /* Copyright(C) 2017 OMRON Corporation */ |
Osamu Nakamura |
0:8373b6833bde | 3 | /* */ |
Osamu Nakamura |
0:8373b6833bde | 4 | /* Licensed under the Apache License, Version 2.0 (the "License"); */ |
Osamu Nakamura |
0:8373b6833bde | 5 | /* you may not use this file except in compliance with the License. */ |
Osamu Nakamura |
0:8373b6833bde | 6 | /* You may obtain a copy of the License at */ |
Osamu Nakamura |
0:8373b6833bde | 7 | /* */ |
Osamu Nakamura |
0:8373b6833bde | 8 | /* http://www.apache.org/licenses/LICENSE-2.0 */ |
Osamu Nakamura |
0:8373b6833bde | 9 | /* */ |
Osamu Nakamura |
0:8373b6833bde | 10 | /* Unless required by applicable law or agreed to in writing, software */ |
Osamu Nakamura |
0:8373b6833bde | 11 | /* distributed under the License is distributed on an "AS IS" BASIS, */ |
Osamu Nakamura |
0:8373b6833bde | 12 | /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ |
Osamu Nakamura |
0:8373b6833bde | 13 | /* See the License for the specific language governing permissions and */ |
Osamu Nakamura |
0:8373b6833bde | 14 | /* limitations under the License. */ |
Osamu Nakamura |
0:8373b6833bde | 15 | /*---------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 16 | |
Osamu Nakamura |
0:8373b6833bde | 17 | #ifndef HVCDef_H__ |
Osamu Nakamura |
0:8373b6833bde | 18 | #define HVCDef_H__ |
Osamu Nakamura |
0:8373b6833bde | 19 | |
Osamu Nakamura |
0:8373b6833bde | 20 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 21 | /* Execution flag */ |
Osamu Nakamura |
0:8373b6833bde | 22 | #define HVC_ACTIV_BODY_DETECTION 0x00000001 |
Osamu Nakamura |
0:8373b6833bde | 23 | #define HVC_ACTIV_HAND_DETECTION 0x00000002 |
Osamu Nakamura |
0:8373b6833bde | 24 | #define HVC_ACTIV_FACE_DETECTION 0x00000004 |
Osamu Nakamura |
0:8373b6833bde | 25 | #define HVC_ACTIV_FACE_DIRECTION 0x00000008 |
Osamu Nakamura |
0:8373b6833bde | 26 | #define HVC_ACTIV_AGE_ESTIMATION 0x00000010 |
Osamu Nakamura |
0:8373b6833bde | 27 | #define HVC_ACTIV_GENDER_ESTIMATION 0x00000020 |
Osamu Nakamura |
0:8373b6833bde | 28 | #define HVC_ACTIV_GAZE_ESTIMATION 0x00000040 |
Osamu Nakamura |
0:8373b6833bde | 29 | #define HVC_ACTIV_BLINK_ESTIMATION 0x00000080 |
Osamu Nakamura |
0:8373b6833bde | 30 | #define HVC_ACTIV_EXPRESSION_ESTIMATION 0x00000100 |
Osamu Nakamura |
0:8373b6833bde | 31 | #define HVC_ACTIV_FACE_RECOGNITION 0x00000200 |
Osamu Nakamura |
0:8373b6833bde | 32 | |
Osamu Nakamura |
0:8373b6833bde | 33 | /* Image info of Execute command */ |
Osamu Nakamura |
0:8373b6833bde | 34 | #define HVC_EXECUTE_IMAGE_NONE 0x00000000 |
Osamu Nakamura |
0:8373b6833bde | 35 | #define HVC_EXECUTE_IMAGE_QVGA 0x00000001 |
Osamu Nakamura |
0:8373b6833bde | 36 | #define HVC_EXECUTE_IMAGE_QVGA_HALF 0x00000002 |
Osamu Nakamura |
0:8373b6833bde | 37 | |
Osamu Nakamura |
0:8373b6833bde | 38 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 39 | /* Error code */ |
Osamu Nakamura |
0:8373b6833bde | 40 | |
Osamu Nakamura |
0:8373b6833bde | 41 | /* Parameter error */ |
Osamu Nakamura |
0:8373b6833bde | 42 | #define HVC_ERROR_PARAMETER -1 |
Osamu Nakamura |
0:8373b6833bde | 43 | |
Osamu Nakamura |
0:8373b6833bde | 44 | /* Send signal timeout error */ |
Osamu Nakamura |
0:8373b6833bde | 45 | #define HVC_ERROR_SEND_DATA -10 |
Osamu Nakamura |
0:8373b6833bde | 46 | |
Osamu Nakamura |
0:8373b6833bde | 47 | /* Receive header signal timeout error */ |
Osamu Nakamura |
0:8373b6833bde | 48 | #define HVC_ERROR_HEADER_TIMEOUT -20 |
Osamu Nakamura |
0:8373b6833bde | 49 | /* Invalid header error */ |
Osamu Nakamura |
0:8373b6833bde | 50 | #define HVC_ERROR_HEADER_INVALID -21 |
Osamu Nakamura |
0:8373b6833bde | 51 | /* Receive data signal timeout error */ |
Osamu Nakamura |
0:8373b6833bde | 52 | #define HVC_ERROR_DATA_TIMEOUT -22 |
Osamu Nakamura |
0:8373b6833bde | 53 | |
Osamu Nakamura |
0:8373b6833bde | 54 | |
Osamu Nakamura |
0:8373b6833bde | 55 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 56 | /* Album data size */ |
Osamu Nakamura |
0:8373b6833bde | 57 | #define HVC_ALBUM_SIZE_MIN 32 |
Osamu Nakamura |
0:8373b6833bde | 58 | #define HVC_ALBUM_SIZE_MAX 816032 |
Osamu Nakamura |
0:8373b6833bde | 59 | |
Osamu Nakamura |
0:8373b6833bde | 60 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 61 | /* Expression */ |
Osamu Nakamura |
0:8373b6833bde | 62 | typedef enum { |
Osamu Nakamura |
0:8373b6833bde | 63 | EX_NEUTRAL = 1, |
Osamu Nakamura |
0:8373b6833bde | 64 | EX_HAPPINESS, |
Osamu Nakamura |
0:8373b6833bde | 65 | EX_SURPRISE, |
Osamu Nakamura |
0:8373b6833bde | 66 | EX_ANGER, |
Osamu Nakamura |
0:8373b6833bde | 67 | EX_SADNESS |
Osamu Nakamura |
0:8373b6833bde | 68 | }EXPRESSION; |
Osamu Nakamura |
0:8373b6833bde | 69 | |
Osamu Nakamura |
0:8373b6833bde | 70 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 71 | /* Struct */ |
Osamu Nakamura |
0:8373b6833bde | 72 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 73 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 74 | /* Devicefs model and version info */ |
Osamu Nakamura |
0:8373b6833bde | 75 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 76 | typedef struct { |
Osamu Nakamura |
0:8373b6833bde | 77 | UINT8 string[12]; |
Osamu Nakamura |
0:8373b6833bde | 78 | UINT8 major; |
Osamu Nakamura |
0:8373b6833bde | 79 | UINT8 minor; |
Osamu Nakamura |
0:8373b6833bde | 80 | UINT8 relese; |
Osamu Nakamura |
0:8373b6833bde | 81 | UINT8 revision[4]; |
Osamu Nakamura |
0:8373b6833bde | 82 | }HVC_VERSION; |
Osamu Nakamura |
0:8373b6833bde | 83 | |
Osamu Nakamura |
0:8373b6833bde | 84 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 85 | /* Detection result */ |
Osamu Nakamura |
0:8373b6833bde | 86 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 87 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 88 | INT32 posX; /* Center x-coordinate */ |
Osamu Nakamura |
0:8373b6833bde | 89 | INT32 posY; /* Center y-coordinate */ |
Osamu Nakamura |
0:8373b6833bde | 90 | INT32 size; /* Size */ |
Osamu Nakamura |
0:8373b6833bde | 91 | INT32 confidence; /* Degree of confidence */ |
Osamu Nakamura |
0:8373b6833bde | 92 | }DETECT_RESULT; |
Osamu Nakamura |
0:8373b6833bde | 93 | |
Osamu Nakamura |
0:8373b6833bde | 94 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 95 | /* Face direction */ |
Osamu Nakamura |
0:8373b6833bde | 96 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 97 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 98 | INT32 yaw; /* Yaw angle */ |
Osamu Nakamura |
0:8373b6833bde | 99 | INT32 pitch; /* Pitch angle */ |
Osamu Nakamura |
0:8373b6833bde | 100 | INT32 roll; /* Roll angle */ |
Osamu Nakamura |
0:8373b6833bde | 101 | INT32 confidence; /* Degree of confidence */ |
Osamu Nakamura |
0:8373b6833bde | 102 | }DIR_RESULT; |
Osamu Nakamura |
0:8373b6833bde | 103 | |
Osamu Nakamura |
0:8373b6833bde | 104 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 105 | /* Age */ |
Osamu Nakamura |
0:8373b6833bde | 106 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 107 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 108 | INT32 age; /* Age */ |
Osamu Nakamura |
0:8373b6833bde | 109 | INT32 confidence; /* Degree of confidence */ |
Osamu Nakamura |
0:8373b6833bde | 110 | }AGE_RESULT; |
Osamu Nakamura |
0:8373b6833bde | 111 | |
Osamu Nakamura |
0:8373b6833bde | 112 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 113 | /* Gender */ |
Osamu Nakamura |
0:8373b6833bde | 114 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 115 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 116 | INT32 gender; /* Gender */ |
Osamu Nakamura |
0:8373b6833bde | 117 | INT32 confidence; /* Degree of confidence */ |
Osamu Nakamura |
0:8373b6833bde | 118 | }GENDER_RESULT; |
Osamu Nakamura |
0:8373b6833bde | 119 | |
Osamu Nakamura |
0:8373b6833bde | 120 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 121 | /* Gaze */ |
Osamu Nakamura |
0:8373b6833bde | 122 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 123 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 124 | INT32 gazeLR; /* Yaw angle */ |
Osamu Nakamura |
0:8373b6833bde | 125 | INT32 gazeUD; /* Pitch angle */ |
Osamu Nakamura |
0:8373b6833bde | 126 | }GAZE_RESULT; |
Osamu Nakamura |
0:8373b6833bde | 127 | |
Osamu Nakamura |
0:8373b6833bde | 128 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 129 | /* Blink */ |
Osamu Nakamura |
0:8373b6833bde | 130 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 131 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 132 | INT32 ratioL; /* Left eye blink result */ |
Osamu Nakamura |
0:8373b6833bde | 133 | INT32 ratioR; /* Right eye blink result */ |
Osamu Nakamura |
0:8373b6833bde | 134 | }BLINK_RESULT; |
Osamu Nakamura |
0:8373b6833bde | 135 | |
Osamu Nakamura |
0:8373b6833bde | 136 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 137 | /* Expression */ |
Osamu Nakamura |
0:8373b6833bde | 138 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 139 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 140 | INT32 topExpression; /* Top expression */ |
Osamu Nakamura |
0:8373b6833bde | 141 | INT32 topScore; /* Top score */ |
Osamu Nakamura |
0:8373b6833bde | 142 | INT32 score[5]; /* Score of 5 expression */ |
Osamu Nakamura |
0:8373b6833bde | 143 | INT32 degree; /* Negative-positive degree */ |
Osamu Nakamura |
0:8373b6833bde | 144 | }EXPRESSION_RESULT; |
Osamu Nakamura |
0:8373b6833bde | 145 | |
Osamu Nakamura |
0:8373b6833bde | 146 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 147 | /* Face Recognition */ |
Osamu Nakamura |
0:8373b6833bde | 148 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 149 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 150 | INT32 uid; /* User ID */ |
Osamu Nakamura |
0:8373b6833bde | 151 | INT32 confidence; /* Degree of confidence */ |
Osamu Nakamura |
0:8373b6833bde | 152 | }RECOGNITION_RESULT; |
Osamu Nakamura |
0:8373b6833bde | 153 | |
Osamu Nakamura |
0:8373b6833bde | 154 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 155 | /* Face Detection & Estimations result */ |
Osamu Nakamura |
0:8373b6833bde | 156 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 157 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 158 | DETECT_RESULT dtResult; /* Face detection result */ |
Osamu Nakamura |
0:8373b6833bde | 159 | DIR_RESULT dirResult; /* Face direction estimation result */ |
Osamu Nakamura |
0:8373b6833bde | 160 | AGE_RESULT ageResult; /* Age Estimation result */ |
Osamu Nakamura |
0:8373b6833bde | 161 | GENDER_RESULT genderResult; /* Gender Estimation result */ |
Osamu Nakamura |
0:8373b6833bde | 162 | GAZE_RESULT gazeResult; /* Gaze Estimation result */ |
Osamu Nakamura |
0:8373b6833bde | 163 | BLINK_RESULT blinkResult; /* Blink Estimation result */ |
Osamu Nakamura |
0:8373b6833bde | 164 | EXPRESSION_RESULT expressionResult; /* Expression Estimation result */ |
Osamu Nakamura |
0:8373b6833bde | 165 | RECOGNITION_RESULT recognitionResult; /* Face Recognition result */ |
Osamu Nakamura |
0:8373b6833bde | 166 | }FACE_RESULT; |
Osamu Nakamura |
0:8373b6833bde | 167 | |
Osamu Nakamura |
0:8373b6833bde | 168 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 169 | /* Human Body Detection results */ |
Osamu Nakamura |
0:8373b6833bde | 170 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 171 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 172 | UINT8 num; /* Number of Detection */ |
Osamu Nakamura |
0:8373b6833bde | 173 | DETECT_RESULT bdResult[35]; /* Detection result */ |
Osamu Nakamura |
0:8373b6833bde | 174 | }BD_RESULT; |
Osamu Nakamura |
0:8373b6833bde | 175 | |
Osamu Nakamura |
0:8373b6833bde | 176 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 177 | /* Hand Detection results */ |
Osamu Nakamura |
0:8373b6833bde | 178 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 179 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 180 | UINT8 num; /* Number of Detection */ |
Osamu Nakamura |
0:8373b6833bde | 181 | DETECT_RESULT hdResult[35]; /* Detection result */ |
Osamu Nakamura |
0:8373b6833bde | 182 | }HD_RESULT; |
Osamu Nakamura |
0:8373b6833bde | 183 | |
Osamu Nakamura |
0:8373b6833bde | 184 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 185 | /* Face Detection & Estimations results */ |
Osamu Nakamura |
0:8373b6833bde | 186 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 187 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 188 | UINT8 num; /* Number of Detection */ |
Osamu Nakamura |
0:8373b6833bde | 189 | FACE_RESULT fcResult[35]; /* Detection & Estimations result */ |
Osamu Nakamura |
0:8373b6833bde | 190 | }FD_RESULT; |
Osamu Nakamura |
0:8373b6833bde | 191 | |
Osamu Nakamura |
0:8373b6833bde | 192 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 193 | /* Image data */ |
Osamu Nakamura |
0:8373b6833bde | 194 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 195 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 196 | INT32 width; |
Osamu Nakamura |
0:8373b6833bde | 197 | INT32 height; |
Osamu Nakamura |
0:8373b6833bde | 198 | UINT8 image[320*240]; |
Osamu Nakamura |
0:8373b6833bde | 199 | }HVC_IMAGE; |
Osamu Nakamura |
0:8373b6833bde | 200 | |
Osamu Nakamura |
0:8373b6833bde | 201 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 202 | /* Eesult data of Execute command */ |
Osamu Nakamura |
0:8373b6833bde | 203 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 204 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 205 | INT32 executedFunc; /* Execution flag */ |
Osamu Nakamura |
0:8373b6833bde | 206 | BD_RESULT bdResult; /* Human Body Detection results */ |
Osamu Nakamura |
0:8373b6833bde | 207 | HD_RESULT hdResult; /* Hand Detection results */ |
Osamu Nakamura |
0:8373b6833bde | 208 | FD_RESULT fdResult; /* Face Detection & Estimations results */ |
Osamu Nakamura |
0:8373b6833bde | 209 | HVC_IMAGE image; /* Image data */ |
Osamu Nakamura |
0:8373b6833bde | 210 | }HVC_RESULT; |
Osamu Nakamura |
0:8373b6833bde | 211 | |
Osamu Nakamura |
0:8373b6833bde | 212 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 213 | /* Threshold of confidence */ |
Osamu Nakamura |
0:8373b6833bde | 214 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 215 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 216 | INT32 bdThreshold; /* Threshold of confidence of Human Body Detection */ |
Osamu Nakamura |
0:8373b6833bde | 217 | INT32 hdThreshold; /* Threshold of confidence of Hand Detection */ |
Osamu Nakamura |
0:8373b6833bde | 218 | INT32 dtThreshold; /* Threshold of confidence of Face Detection */ |
Osamu Nakamura |
0:8373b6833bde | 219 | INT32 rsThreshold; /* Threshold of confidence of Face Recognition */ |
Osamu Nakamura |
0:8373b6833bde | 220 | }HVC_THRESHOLD; |
Osamu Nakamura |
0:8373b6833bde | 221 | |
Osamu Nakamura |
0:8373b6833bde | 222 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 223 | /* Detection size */ |
Osamu Nakamura |
0:8373b6833bde | 224 | /*----------------------------------------------------------------------------*/ |
Osamu Nakamura |
0:8373b6833bde | 225 | typedef struct{ |
Osamu Nakamura |
0:8373b6833bde | 226 | INT32 bdMinSize; /* Minimum detection size of Human Body Detection */ |
Osamu Nakamura |
0:8373b6833bde | 227 | INT32 bdMaxSize; /* Maximum detection size of Human Body Detection */ |
Osamu Nakamura |
0:8373b6833bde | 228 | INT32 hdMinSize; /* Minimum detection size of Hand Detection */ |
Osamu Nakamura |
0:8373b6833bde | 229 | INT32 hdMaxSize; /* Maximum detection size of Hand Detection */ |
Osamu Nakamura |
0:8373b6833bde | 230 | INT32 dtMinSize; /* Minimum detection size of Face Detection */ |
Osamu Nakamura |
0:8373b6833bde | 231 | INT32 dtMaxSize; /* Maximum detection size of Face Detection */ |
Osamu Nakamura |
0:8373b6833bde | 232 | }HVC_SIZERANGE; |
Osamu Nakamura |
0:8373b6833bde | 233 | |
Osamu Nakamura |
0:8373b6833bde | 234 | #endif /* HVCDef_H__ */ |
Osamu Nakamura |
0:8373b6833bde | 235 |