Object Detection

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

Detect people and objects in the image.

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

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

Returns:

Error code, see ErrorCode.

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 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 class Trueface::ObjectLabel

The object classes which can be detected.

Values:

enumerator person
enumerator bicycle
enumerator car
enumerator motorcycle
enumerator airplane
enumerator bus
enumerator train
enumerator truck
enumerator boat
enumerator traffic_light
enumerator fire_hydrant
enumerator stop_sign
enumerator parking_meter
enumerator bench
enumerator bird
enumerator cat
enumerator dog
enumerator horse
enumerator sheep
enumerator cow
enumerator elephant
enumerator bear
enumerator zebra
enumerator giraffe
enumerator backpack
enumerator umbrella
enumerator handbag
enumerator tie
enumerator suitcase
enumerator frisbee
enumerator skis
enumerator snowboard
enumerator sports_ball
enumerator kite
enumerator baseball_bat
enumerator baseball_glove
enumerator skateboard
enumerator surfboard
enumerator tennis_racket
enumerator bottle
enumerator wine_glass
enumerator cup
enumerator fork
enumerator knife
enumerator spoon
enumerator bowl
enumerator banana
enumerator apple
enumerator sandwich
enumerator orange
enumerator broccoli
enumerator carrot
enumerator hot_dog
enumerator pizza
enumerator donut
enumerator cake
enumerator chair
enumerator couch
enumerator potted_plant
enumerator bed
enumerator dining_table
enumerator toilet
enumerator tv
enumerator laptop
enumerator mouse
enumerator remote
enumerator keyboard
enumerator cell_phone
enumerator microwave
enumerator oven
enumerator toaster
enumerator sink
enumerator refrigerator
enumerator book
enumerator clock
enumerator vase
enumerator scissors
enumerator teddy_bear
enumerator hair_drier
enumerator toothbrush