Object Detection

ErrorCode Trueface::SDK::detectObjects(const TFImage &tfImage, std::vector<BoundingBox> &boundingBoxes)

Detect people and objects in the image.

See

getObjectLabelString(ObjectLabel label)

Parameters
  • tfImage[in] the input image returned by preprocessImage().

  • boundingBoxes[out] a vector of BoundingBox objects that gets populated with the detected objects.

static std::string Trueface::SDK::getObjectLabelString(ObjectLabel label)

Converts an object label to a string. This can be used to display the object labels.

Parameters

label[in] the label of a BoundingBox.

Returns

The object label as a string.

struct Trueface::BoundingBox

Public Members

ObjectLabel label

The object class as a label.

float probability

The detection’s confidence probability.

Point<float> topLeft

The top left corner Point of the bounding box.

float width

The width of the bounding box.

float height

The height of the bounding box.

enum Trueface::ObjectLabel

Object classes.

Values:

enumerator background
enumerator aeroplane
enumerator bicycle
enumerator bird
enumerator boat
enumerator bottle
enumerator bus
enumerator car
enumerator cat
enumerator chair
enumerator cow
enumerator diningtable
enumerator dog
enumerator horse
enumerator motorbike
enumerator person
enumerator pottedplant
enumerator sheep
enumerator sofa
enumerator train
enumerator tvmonitor