XQFaceGroup Class Reference

#include <imagerecognition/xqfacegroup.h>

Link against: faceplatform.lib

class XQFaceGroup

Represents a group of XQFaceRegion objects belonging to the same person (Face-Id).

Public Member Enumerations
enumFaceRegionProperty { SourceId, ThumbnailPath, FaceRect, SourceSize }
Public Member Functions
XQFaceGroup(const XQFaceGroup &)
~XQFaceGroup()
QString faceId()
XQFaceRegion faceRegion(const QString &)
QAbstractItemModel *faces()
boolisUnknown()
XQFaceGroup &operator=(const XQFaceGroup &)
QString representativeFaceThumbnail()
voidsetFaceId(const QString &)
voidsetRepresentativeFaceThumbnail(const QString &)

Detailed Description

An object to this can only be instantiated via a call to XQFaceDatabase::faceGroup() call.

Member Enumeration Documentation

Enum FaceRegionProperty

This is used to index into the columns of the QAbstractItemModel returned by the call to faces()

SourceId - source id which contains the face ThumbnailPath - path of the thumbnail representing the face in this source FaceRect - ROI within the source where this face is found SourceSize - size of the source on which FaceRect was calculated

EnumeratorValueDescription
SourceId0

The source identifier (file name/ file id) that this face region belongs to

ThumbnailPath

The thumbnail-path or the thumbnail as supplied by XQFaceThumbnailer::faceThumbnailCreated() signal while processing this file

FaceRect

The rectangle expressed relative to the image size in SourceSize column.

SourceSize

The reference image size based on which the FaceRect column is based

Constructor & Destructor Documentation

XQFaceGroup ( const XQFaceGroup & )

XQFaceGroup(const XQFaceGroup &other)

Copy constructor for this class.

~XQFaceGroup ( )

~XQFaceGroup()

Destructor.

Member Function Documentation

faceId ( )

QString faceId()const

faceRegion ( const QString & )

XQFaceRegion faceRegion(const QString &sourceId)

faces ( )

QAbstractItemModel *faces()

Instantiates a QAbstractItemModel containing one row for each occurance of the person that this XQFaceGroup object represents.

The columns are indexed using the FaceRegionProperty (i.e. the first column would be SourceId, the second would be ThumbnailPath and so on.)
Note:

The ownership of this model is passed to the caller/application. The model needs to be explicitly destroyed as required by the caller/application.

isUnknown ( )

boolisUnknown()const

Checks if the group is known.

If the group has been given a name in the past (by passing a non-null string to setFaceId()) then isUnknown() returns false (i.e. the face is known). If the group has never been given a name or the name has been removed (removing can be done by passing null Qstring to setFaceId()) then isUnknown() returns true.

Return Value
TRUE if the group has a non-"Untitled" faceId. FALSE otherwise.

operator= ( const XQFaceGroup & )

XQFaceGroup &operator=(const XQFaceGroup &other)

Assignment operator for this class.

representativeFaceThumbnail ( )

QString representativeFaceThumbnail()const

setFaceId ( const QString & )

voidsetFaceId(const QString &faceId)

Sets the name/tag/identifier for this face group.

The following behaviours can be expected based on what is passed
  • A non-null QString would cause the given string to be set as the face-id

  • A null QString would erase the existing face-id and reset it to the default ("Untitled")

Parameters
faceIdThe face-id that is desired to be set.

setRepresentativeFaceThumbnail ( const QString & )

voidsetRepresentativeFaceThumbnail(const QString &thumbnailPath)