Convert a trained aggregate channel features (ACF) object detector into structure
returns a structure that stores the properties of the input
detectorStruct = toStruct(
acfObjectDetector object in fields. The output structure contains
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
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: [1x1 struct] TrainingOptions: [1x1 struct]
detectorStruct— ACF object properties
ACF object detector, returned as a structure containing the object properties into fields.