Borrar filtros
Borrar filtros

Object Detection to Code Generation:

3 visualizaciones (últimos 30 días)
Tewodros Mamo
Tewodros Mamo el 15 de Mayo de 2024
Comentada: Tewodros Mamo el 29 de Mayo de 2024
Hello,
Is Train ACF object detector compatible with code generation? I am seeing some difficulty compiling the detector to download it to a target for a real time application. Any insight would be greatly appreciated. There is a limitted info in help doc but it is only for object detection from an image, even then, the example does not deep dive :)
Thank you.
Best

Respuestas (1)

Sai Pavan
Sai Pavan el 27 de Mayo de 2024
Hello,
I understand that you want to know whether the Aggregate Channel Features (ACF) object detector supports code generation so that it can be used for a real-time application on a target. We can train an object detector with the "trainACFObjectDetector" function and use the trained object detector returned as an object for target-specific applications.
The "acfObjectDetector" object indeed has code generation support as mentioned here: https://www.mathworks.com/help/vision/ref/acfobjectdetector.html#:~:text=C/C%2B%2B%20Code%20Generation
Here is the workflow to use the code generation ability of this function:
  • Convert the trained detector object into a structure using the "toStruct" function. Please refer to the below documentation to learn more about "toStruct" function: https://www.mathworks.com/help/vision/ref/acfobjectdetector.tostruct.html
  • Save the structure as MAT file.
  • Generate C-MEX code that you can run in the MATLAB environment using MATLAB Coder.
  • Use the generated C-MEX file to detect objects in a test image.
Please refer to the following example that demonstrates the code generation ability of "acfObjectDetector": https://www.mathworks.com/help/vision/ug/example-ObjectDetectionFromImages.html
Note: You need to have access to MATLAB Coder product to use the code generation capabilities and to generate the C-MEX files.
Hope it helps!
  1 comentario
Tewodros Mamo
Tewodros Mamo el 29 de Mayo de 2024
Hello Sai,
First of, thank you for your response and the links. However, my application will eventually be integrated to a third party simulink like blocks. I was wondering if a simpler representation of this structures is possible to make this a block or a function that works in simulink or make a matlab function that would then be used in simulink. i.e, A mattrix to insure platform indepenence and portability. like you would represent an adge detector using a 3x3 matrix.
Thank you.
Regards,

Iniciar sesión para comentar.

Categorías

Más información sobre Computer Vision with Simulink en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by