How to Process Image data when they are at Hex format (for embedded C applications)

2 visualizzazioni (ultimi 30 giorni)
I have a matlab code that is intended for embedded hardware. The matlab code is about Image Classification which will be deployed in STM32 (uC, not the Discovery board) using C code generator.
This is the simple block diagram of my architecture:
The image that will be captured by the camera in arduino is at [480, 640] pixels (RGB) which will be saved into the external shared flash memory. Then, the STM32 will retrieve the image in the shared flash memory which are at HEX format (jpg image).
My problem is that how can I process the Hex in my matlab generated C code such that it can resize the image and turn the image into grayscale.
I have found some code related to my problem but it is not intended for code generation in C.
If someone is knowledgeable on this, please help. Thanks!
  4 Commenti
Chandler Timm Doloriel
Chandler Timm Doloriel il 13 Feb 2021
Modificato: Chandler Timm Doloriel il 13 Feb 2021
@Walter Roberson Hi Sir. Thanks for your input. Let's say I saved the image in shared flash memory as a Hex (8-bit) and a real jpeg image which starts at 0xFF, 0xD8 and ends at 0xFF, 0xD9. How can then I use this data to be processed in matlab? for resizing to [32, 32] pixels and turning into greyscale.
Walter Roberson
Walter Roberson il 13 Feb 2021
https://www.file-recovery.com/jpg-signature-format.htm
Write the hex to a file as binary and imread the binary.
There are probably also Java methods.

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by