fix(knowing app): fix 3 k210 knowing apps according to 'add a interface about k210 dvp image setting' by tian chunyu

This commit is contained in:
yangtuo250 2021-08-13 15:07:08 +08:00
parent 8593dedd37
commit 78387f9b16
4 changed files with 7 additions and 1 deletions

View File

@ -182,6 +182,8 @@ void face_detect()
printf("open ov2640 fail !!");
return;
}
_ioctl_set_dvp_reso set_dvp_reso = {sensor_output_size[1], sensor_output_size[0]};
ioctl(g_fd, IOCTRL_CAMERA_SET_DVP_RESO, &set_dvp_reso);
showbuffer = (unsigned char *)malloc(sensor_output_size[0] * sensor_output_size[1] * 2);
if (NULL == showbuffer) {
close(g_fd);

View File

@ -144,7 +144,7 @@ Copy json config for deployment o SD card */kmodel*. Example config file is *hel
- net_input_size: same as *input_size* in training config file, but array only.
- net_output_shape: final feature map size, can be found in **nncase** output.
- sensor_output_size: image height and width from camera, same as *dvp_set_image_size(Ubiquitous/RT_Thread/bsp/k210/base-drivers/drv_dvp.c L70(71))*.
- sensor_output_size: image height and width from camera.
- kmodel_size: kmodel size shown in file system.
- anchors: same as *anchor* in training config file(multi-dimention anchors flatten to 1 dim).
- labels: same as *label* in training config file.

View File

@ -182,6 +182,8 @@ void helmet_detect()
printf("open ov2640 fail !!");
return;
}
_ioctl_set_dvp_reso set_dvp_reso = {sensor_output_size[1], sensor_output_size[0]};
ioctl(g_fd, IOCTRL_CAMERA_SET_DVP_RESO, &set_dvp_reso);
showbuffer = (unsigned char *)malloc(sensor_output_size[0] * sensor_output_size[1] * 2);
if (NULL == showbuffer) {
close(g_fd);

View File

@ -182,6 +182,8 @@ void instrusion_detect()
printf("open ov2640 fail !!");
return;
}
_ioctl_set_dvp_reso set_dvp_reso = {sensor_output_size[1], sensor_output_size[0]};
ioctl(g_fd, IOCTRL_CAMERA_SET_DVP_RESO, &set_dvp_reso);
showbuffer = (unsigned char *)malloc(sensor_output_size[0] * sensor_output_size[1] * 2);
if (NULL == showbuffer) {
close(g_fd);