toStruct - Convert a trained aggregate channel features (ACF) object detector into
structure - MATLAB ([original](https://in.mathworks.com/help/vision/ref/acfobjectdetector.tostruct.html)) ([raw](?raw))
Main Content
Convert a trained aggregate channel features (ACF) object detector into structure
Syntax
Description
[detectorStruct](#buq95gy-1-paramStruct) = toStruct([acfObjectDetector](#buq95gy-1-stereoParams))
returns a structure that stores the properties of the inputacfObjectDetector
object in fields. The output structure contains fields Classifier
and TrainingOptions
. Use the structure to create an identical acfObjectDetector
object for C code generation. You can call the toStruct
, and then pass the resulting structure to a MATLAB function, which recreates the acfObjectDetector
object.
Examples
Load the pretrained ACF stop sign detector from the stopSignDetector.mat
file, which is present in the current working folder as a supporting file.
stopSignDetector= load('stopSignDetectorACF.mat'); detector = stopSignDetector.detector
detector =
acfObjectDetector with properties:
ModelName: 'stopSign'
ObjectTrainingSize: [34 31]
NumWeakLearners: 61
Convert the detector to a structure.
detectorStruct = toStruct(detector)
detectorStruct =
struct with fields:
ModelName: 'stopSign'
ObjectTrainingSize: [34 31]
NumWeakLearners: 61
Classifier: [1×1 struct]
TrainingOptions: [1×1 struct]
Input Arguments
Output Arguments
ACF object detector, returned as a structure containing the object properties into fields.