Sample program that can send the recognition data from HVC-P2 to Fujitsu IoT Platform using REST (HTTP)

Dependencies:   AsciiFont GR-PEACH_video GraphicsFramework LCD_shield_config R_BSP USBHost_custom easy-connect-gr-peach mbed-http picojson

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers iot_platform.h Source File

iot_platform.h

00001 #ifndef IOT_READY_PROCESSING_H
00002 #define IOT_READY_PROCESSING_H
00003 
00004 #include "HVCApi.h"
00005 #include "HVCDef.h"
00006 #include "clib_drivers.h"
00007 
00008 #define DETECT_MAX 35
00009 #define WAIT_TIME 5000
00010 
00011 //#define ENABLED_NTP
00012 
00013 typedef struct {
00014     INT32 score_neutral;
00015     INT32 score_anger;
00016     INT32 score_happiness;
00017     INT32 score_surprise;
00018     INT32 score_sadness;
00019 } IotReadyExpression_t;
00020 
00021 /* Face data detected by HVC-P2 to send to IOT Platform */
00022 typedef struct {
00023     AGE_RESULT              age;            /* Age Estimation result */
00024     GENDER_RESULT           gender;         /* Gender Estimation result */
00025     IntBoxType      face_rectangle; /* rectangle of face detection result */
00026     IotReadyExpression_t    scores;         /* Score of 5 expression */
00027 } result_hvcp2_fd_t;
00028 
00029 /* Body data detected by HVC-P2 to send to IOT Platform */
00030 typedef struct {
00031     IntBoxType      body_rectangle; /* rectangle of body detection result */
00032 } result_hvcp2_bd_t;
00033 
00034 #define _DEBUG_IOT
00035 #ifdef _DEBUG_IOT
00036 extern Serial pc;
00037 #define DEBUG_PRINT(...) pc.printf(__VA_ARGS__)
00038 #else
00039 #define DEBUG_PRINT(...)
00040 #endif
00041 
00042 extern result_hvcp2_fd_t result_hvcp2_fd[DETECT_MAX];
00043 extern result_hvcp2_bd_t result_hvcp2_bd[DETECT_MAX];
00044 extern uint32_t result_hvcp2_bd_cnt;
00045 extern uint32_t result_hvcp2_fd_cnt;
00046 
00047 extern Semaphore iot_ready_semaphore;
00048 extern int semaphore_wait_ret;
00049 
00050 #endif