AMB82-MINI: How to dynamically crop detected YOLOv7 bounding boxes

I am working on a project to use a camera module (AMB82-mini) for object detection with YOLOv7. My goal is to capture full-resolution images at 1920x1080 while extracting 640x640 patches for training the YOLOv7 model. The idea is to have high-resolution images NN viewing and use cropped sections (640x640) for neural network training.

I couldn’t find an easy or clear way in the existing AMB82-MINI examples or Arduino SDK to dynamically crop these detected regions from the image.

I tried the method provided in the link below but encountered numerous errors

Is there a better way for doing this?

  • Is it possible to manually crop and encode sub-images (regions of interest) to JPG format and store them to SD card using the AMB82-MINI SDK?
  • Are there any examples or API calls that support cropping and saving regions as individual JPEGs?
  • Can NNObjectDetectionImage.h run inference on image files stored on SD card (e.g., image1.jpg, image2.jpg, etc.)?