필터 지우기
필터 지우기

Object Detection to Code Generation:

조회 수: 3 (최근 30일)
Tewodros Mamo
Tewodros Mamo 2024년 5월 15일
댓글: Tewodros Mamo 2024년 5월 29일
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

답변 (1개)

Sai Pavan
Sai Pavan 2024년 5월 27일
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
Tewodros Mamo
Tewodros Mamo 2024년 5월 29일
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,

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by