C++ Vehicle Detector API¶
oneML model to detect vehicles in images, returning their confidence score, and bounding box.
-
class
oneML::alpr
::
VehicleDetector
: public oneML::oneMLAPI¶ The oneML VehicleDetector API object.
Class to create and use oneML vehicle detector model.
Public Functions
-
explicit
VehicleDetector
(oneML::LicenseManager &manager)¶ Construct a VehicleDetector object.
- Parameters
manager
: LicenseManager instance
-
ReturnStatus
detect
(const MultiImage &imgs, std::vector<VehicleDetectorResult> &results)¶ detect vehicles in images
- Return
ReturnStatus: status of operation
- Parameters
[in] imgs
: vector of raw images[out] results
: vector of result objects
-
ReturnStatus
detect
(const Image &img, VehicleDetectorResult &result)¶ detect vehicles in an image
- Return
ReturnStatus: status of operation
- Parameters
[in] img
: an instance of Image[out] result
: an instance of Result
-
explicit
-
class
oneML::alpr
::
VehicleDetectorResult
: public oneML::oneMLResult¶ The result object for oneML VehicleDetector API.
Helper class to access all the results from an API call.
Public Functions
-
void
get_scores
(std::vector<float> &scores) const¶ get result score
- Parameters
[out] scores
: vector of scores
-
void
get_bboxes
(std::vector<oneML::alpr::BBox> &bboxes) const¶ get result bounding box
- Parameters
[out] bboxes
: vector of bounding boxes
-
int
get_size
() const¶ get number of vehicles detected
- Return
int: number of vehicles detected
-
std::vector<oneML::alpr::VehicleDetectorStatus>
get_return_status
() const¶ get return status
- Return
vector of return status
-
void