- 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.
Object Detection to Code Generation:
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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:
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!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computer Vision with Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!