QFaceDataBase Class Reference

#include <imagerecognition/qface.h>

Link against: qfacelib.lib

class QFaceDataBase
Public Member Enumerations
enumQFaceDatabaseError { QMemoryInsufficient, QDBNotexists, QUnknownParameter, QUeryIncorrect, ..., QReasonNotKnown }
Public Member Functions
QFaceDataBase(QSqlDatabase)
~QFaceDataBase()
IMPORT_C voidCalRectOfInterest(int, const QString &)
IMPORT_C voidChangedClusterInfo(QList< int > *, QList< QString > *, QList< int > *, QList< QString > *)
IMPORT_C booladdFaceforClustering(QString, QFaceInfo *)
IMPORT_C QList< QFaceInfo >clusterId(QString)
IMPORT_C booldeleteCluster(int)
IMPORT_C booldeleteFaceEntry(QString, int)
IMPORT_C booldeleteFileEntry(QString)
IMPORT_C QStringListfileNames(const int)
IMPORT_C QSqlDatabasegetDataBase()
IMPORT_C QList< QRect >getRectOfInterest()
IMPORT_C QFaceDatabaseErrorlasterror()
IMPORT_C intmergeCluster(int, int)
IMPORT_C boolnearestMatches(int, QList< int > &)
IMPORT_C voidrecognizeFace(QImage &, QList< QFaceInfo > &)
IMPORT_C voidremoveNameForCluster(int)
IMPORT_C boolsetNameForCluster(int, QString)
IMPORT_C boolsetNameForCluster(QString, int, QRect, QString, int *)
IMPORT_C voidsetRectOfInterest(const QList< QRect > &)
IMPORT_C boolsetRepresentativeFaceThumbnail(int, QString)
IMPORT_C QStringListthumbnailPaths(const int, const QString &)

Detailed Description

QFaceDataBase stores the supplied db from top level and helps to add the face information into database

Member Enumeration Documentation

Enum QFaceDatabaseError

Constructor & Destructor Documentation

QFaceDataBase ( QSqlDatabase )

IMPORT_CQFaceDataBase(QSqlDatabasedb)

Construct the QFaceDataBase with supplied QSqlDatabase db

Parameters
dbinput data base

~QFaceDataBase ( )

IMPORT_C~QFaceDataBase()

Member Function Documentation

CalRectOfInterest ( int, const QString & )

IMPORT_C voidCalRectOfInterest(intclusterId,
const QString &sourceID
)

ChangedClusterInfo ( QList< int > *, QList< QString > *, QList< int > *, QList< QString > * )

IMPORT_C voidChangedClusterInfo(QList< int > *changedClusterIds,
QList< QString > *changedNames,
QList< int > *originalClusterIds,
QList< QString > *originalNames
)

Return Value
returns whether face entry is deleted or not.

addFaceforClustering ( QString, QFaceInfo * )

IMPORT_C booladdFaceforClustering(QStringfilename,
QFaceInfo *faceImage = NULL
)

Parameters
faceImageadd the face image for clustering filename add the filename also in the database
Return Value
returns whether the adding of face for cluster is done or not

clusterId ( QString )

IMPORT_C QList< QFaceInfo >clusterId(QStringfilename)

Parameters
filenameinput image filename whose faces's cluster id need to be found
Return Value
returns the list of faceinfos of given input file and use clusterId() to get clusterid for each face

deleteCluster ( int )

IMPORT_C booldeleteCluster(intclusterid)

Return Value
returns whether the cluster is deleted or not.

deleteFaceEntry ( QString, int )

IMPORT_C booldeleteFaceEntry(QStringfilename,
intclusterid
)

Return Value
returns whether face entry is deleted or not.

deleteFileEntry ( QString )

IMPORT_C booldeleteFileEntry(QStringfilename)

Return Value
returns whether the file entry is deleted or not.

fileNames ( const int )

IMPORT_C QStringListfileNames(const intclusterId)

getDataBase ( )

IMPORT_C QSqlDatabasegetDataBase()const

Return Value
returns the input supplied database.

getRectOfInterest ( )

IMPORT_C QList< QRect >getRectOfInterest()

lasterror ( )

IMPORT_C QFaceDatabaseErrorlasterror()

Return Value
returns the last QFaceDataBase error.

mergeCluster ( int, int )

IMPORT_C intmergeCluster(intclusterid1,
intclusterid2
)

Parameters
clusterid1input clusterid1 clusterid2 input clusterid2
Return Value
returns whether the merging of two cluster is done or not.

nearestMatches ( int, QList< int > & )

IMPORT_C boolnearestMatches(intclusterId,
QList< int > &nearestmatches
)

recognizeFace ( QImage &, QList< QFaceInfo > & )

IMPORT_C voidrecognizeFace(QImage &image,
QList< QFaceInfo > &faceCoords
)

removeNameForCluster ( int )

IMPORT_C voidremoveNameForCluster(intclusterId)

setNameForCluster ( int, QString )

IMPORT_C boolsetNameForCluster(intclusterid,
QStringName
)

Parameters
clusteridcluster id to which name has to be given Name Name which has to be given to clusterid
Return Value
returns whether the setting of name for cluster is done or not

setNameForCluster ( QString, int, QRect, QString, int * )

IMPORT_C boolsetNameForCluster(QStringfilename,
intclusterid,
QRectrect,
QStringName,
int *newclusterid
)

Parameters
filenamefilename under which the clusterid is present clusterid cluster id to which name has to be given rect rect of particular person Name Name which has to be given to clusterid newclusterid newclusterid which is changed from clusterid
Return Value
returns whether the setting of name for cluster is done or not

setRectOfInterest ( const QList< QRect > & )

IMPORT_C voidsetRectOfInterest(const QList< QRect > &rects)

setRepresentativeFaceThumbnail ( int, QString )

IMPORT_C boolsetRepresentativeFaceThumbnail(intclusterid,
QStringfilename
)

Parameters
clusterid- input clusterid filename - input image filename - needed to find the face id.
Return Value
returns whether the setting of representative thumbnail is done or not

thumbnailPaths ( const int, const QString & )

IMPORT_C QStringListthumbnailPaths(const intclusterId,
const QString &source =  QString()
)