Browse Source

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

pull/8/head
yangtuo250 11 months ago
parent
commit
78387f9b16
  1. 2
      APP_Framework/Applications/knowing_app/face_detect/face_detect.c
  2. 2
      APP_Framework/Applications/knowing_app/helmet_detect/README.md
  3. 2
      APP_Framework/Applications/knowing_app/helmet_detect/helmet_detect.c
  4. 2
      APP_Framework/Applications/knowing_app/instrusion_detect/instrusion_detect.c

2
APP_Framework/Applications/knowing_app/face_detect/face_detect.c

@ -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);

2
APP_Framework/Applications/knowing_app/helmet_detect/README.md

@ -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.

2
APP_Framework/Applications/knowing_app/helmet_detect/helmet_detect.c

@ -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);

2
APP_Framework/Applications/knowing_app/instrusion_detect/instrusion_detect.c

@ -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);

Loading…
Cancel
Save