cancel
Showing results for 
Search instead for 
Did you mean: 

Support for JPEG Encoding / SD Card storage Integration in STM32N6 Object Detection Firmware

pikud
Associate

Dear ST Community,

I have successfully run the Object Detection Application on the STM32N6 Discovery Kit using the reference firmware from the STM32AI ModelZoo.

As part of extending its functionality, I am looking to implement the following two features:

  1. Convert the captured RGB frame to JPEG format
  2. Store the JPEG image onto the SD card available on the Discovery Kit

For the RGB-to-JPEG conversion, I have referred to this JPEF Encoder example and integrated this JPEG encoding logic into the object detection firmware. Specifically, I am feeding the nn_in buffer (used as neural network input) to the JPEG encoder. However, during execution, the program gets stuck at this line:

jpeg_encode_processing_end = JPEG_EncodeOutputHandler(&hjpeg);

The jpeg_encode_processing_end flag is not being set to 1, indicating that the encoding process does not complete. I suspect either the JPEG input handling is not progressing, or the DMA isn't properly triggering the required callbacks.

Could you kindly review the approach and suggest the correct way to integrate JPEG encoding into the object detection pipeline?

I have attached my modified main.c file for your reference.

Appreciate your guidance on this.

0 REPLIES 0