add tflite example and fix bug
This commit is contained in:
@@ -54,6 +54,7 @@ void task1(void *arg)
|
||||
printf("*person_detect_task\r\n");
|
||||
if(HAL_DCMI_Stop(&hdcmi))Error_Handler(); //stop DCMI
|
||||
input_convert(camera_buffer,model_buffer);
|
||||
extern void person_detect(uint8_t*);
|
||||
person_detect(model_buffer);
|
||||
LCD_2IN4_Display(camera_buffer,OV2640_PIXEL_WIDTH,OV2640_PIXEL_HEIGHT);
|
||||
|
||||
@@ -87,7 +88,7 @@ void application_entry(void *arg)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
|
||||
extern void person_detect_init(void);
|
||||
person_detect_init();
|
||||
|
||||
printf("***Start person detection task! \r\n");
|
||||
|
@@ -45,7 +45,7 @@ static uint8_t tensor_arena[kTensorArenaSize];
|
||||
} // namespace
|
||||
|
||||
// The name of this function is important for Arduino compatibility.
|
||||
void person_detect_init() {
|
||||
extern "C" void person_detect_init() {
|
||||
// Set up logging. Google style is to avoid globals or statics because of
|
||||
// lifetime uncertainty, but since this has a trivial destructor it's okay.
|
||||
// NOLINTNEXTLINE(runtime-global-variables)
|
||||
@@ -96,7 +96,7 @@ void person_detect_init() {
|
||||
}
|
||||
|
||||
// The name of this function is important for Arduino compatibility.
|
||||
int person_detect(uint8_t * hardware_input) {
|
||||
extern "C" int person_detect(uint8_t * hardware_input) {
|
||||
// Get image from provider.
|
||||
if (kTfLiteOk != GetImage(error_reporter, kNumCols, kNumRows, kNumChannels,
|
||||
input->data.int8, hardware_input)) {
|
||||
|
Reference in New Issue
Block a user