XQFaceRecognizer Class Reference

#include <imagerecognition/xqfacerecognizer.h>

Link against: faceplatform.lib

class XQFaceRecognizer : public QObject, public QObject

XQFaceRecognizer facilitates in detecting and recognizing the faces in a given image.

Inherits from

  • XQFaceRecognizer
    Public Member Functions
    XQFaceRecognizer(XQFaceDatabase &, QObject *)
    ~XQFaceRecognizer()
    voidcancelProcessing(const QString &)
    voiddetectFaces(const QString &, const QImage &)
    boolisProcessing()
    voidprocessFaces(const QString &, const QImage &, QList< QRect >)
    voidprocessFaces(const QString &)
    voidprocessFaces(const QString &, const QImage &, const QRect &, const QString &)
    Public Signals
    voidfacesDetected(const QString &, const QImage, const QSize &, QList< QRect >)
    voidfacesRecognized(const QString &, const QImage &, QList< XQFaceRegion >)
    Inherited Attributes
    QObject::d_ptr
    QObject::objectName
    QObject::staticQtMetaObject
    Inherited Functions
    QObject::QObject(QObjectPrivate &,QObject *)
    QObject::blockSignals(bool)
    QObject::childEvent(QChildEvent *)
    QObject::children()const
    QObject::connect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &,Qt::ConnectionType)
    QObject::connect(const QObject *,const char *,const QObject *,const char *,Qt::ConnectionType)
    QObject::connect(const QObject *,const char *,const char *,Qt::ConnectionType)const
    QObject::connectNotify(const char *)
    QObject::customEvent(QEvent *)
    QObject::deleteLater
    QObject::destroyed
    QObject::disconnect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &)
    QObject::disconnect(const QObject *,const char *)
    QObject::disconnect(const QObject *,const char *,const QObject *,const char *)
    QObject::disconnect(const char *,const QObject *,const char *)
    QObject::disconnectNotify(const char *)
    QObject::dumpObjectInfo()
    QObject::dumpObjectTree()
    QObject::dynamicPropertyNames()const
    QObject::event(QEvent *)
    QObject::eventFilter(QObject *,QEvent *)
    QObject::findChild(const QString &)const
    QObject::findChildren(const QRegExp &)const
    QObject::findChildren(const QString &)const
    QObject::inherits(const char *)const
    QObject::installEventFilter(QObject *)
    QObject::isWidgetType()const
    QObject::killTimer(int)
    QObject::moveToThread(QThread *)
    QObject::objectName()const
    QObject::parent()const
    QObject::property(const char *)const
    QObject::receivers(const char *)const
    QObject::registerUserData()
    QObject::removeEventFilter(QObject *)
    QObject::sender()const
    QObject::senderSignalIndex()const
    QObject::setObjectName(const QString &)
    QObject::setParent(QObject *)
    QObject::setProperty(const char *,const QVariant &)
    QObject::setUserData(uint,QObjectUserData *)
    QObject::signalsBlocked()const
    QObject::startTimer(int)
    QObject::thread()const
    QObject::timerEvent(QTimerEvent *)
    QObject::userData(uint)const
    QObject::~QObject()

    Detailed Description

    The faces in the image are compared against a set of already recognized faces managed by XQFaceDatabase interface.

    Constructor & Destructor Documentation

    XQFaceRecognizer ( XQFaceDatabase &, QObject * )

    XQFaceRecognizer(XQFaceDatabase &db,
    QObject *parent = 0
    )

    Constructor.

    Parameters
    dbThe XQFaceDatabase object to be used. This object would represent the database where the past learnings are stored.
    parentThe parent QObject. Default value is NULL meaning no parent.

    ~XQFaceRecognizer ( )

    ~XQFaceRecognizer()

    Destructor.

    Member Function Documentation

    cancelProcessing ( const QString & )

    voidcancelProcessing(const QString &sourceId)

    detectFaces ( const QString &, const QImage & )

    voiddetectFaces(const QString &sourceId,
    const QImage &image
    )

    facesDetected ( const QString &, const QImage, const QSize &, QList< QRect > )

    voidfacesDetected(const QString &sourceId,
    const QImageimage,
    const QSize &imageSize,
    QList< QRect >faceRects
    )[signal]

    facesRecognized ( const QString &, const QImage &, QList< XQFaceRegion > )

    voidfacesRecognized(const QString &sourceId,
    const QImage &image,
    QList< XQFaceRegion >faceRegions
    )[signal]

    isProcessing ( )

    boolisProcessing()const

    processFaces ( const QString &, const QImage &, QList< QRect > )

    voidprocessFaces(const QString &sourceId,
    const QImage &image,
    QList< QRect >faceRects =  QList< QRect >()
    )

    Enqueues an image for Face Recognition.

    When the face recognition process is complete the facesRecognized() signal is emitted.
    Note:

    If the sourceId is a null string, then it is not possible to train the software. Recognition is still possible.

    Note:

    The XQFaceThumbnailer object is accessed internally via the XQFaceDatabase. Hence the instance if XQFaceThumbnailer supplied to XQFaceDatabase would be used.

    Parameters
    sourceIdThe file/fileid of the image on which Face Recognition is to be done.
    imageIf this is a non-null QImage then the processing is done on the supplied image If it is a null QImage then the XQFaceThumbnailer interface createThumbnail() is called in order to create a QImage on which the Face Detection will be done. The QImage given as part of the thumbnailCreated() signal would be used. In either case (QImage is null or not) the XQFaceThumbnailer interface createFaceThumbnail() is called in order to extract the portion of the image with a face in it. The thumbnail returned as part of faceThumbnailCreated() is used for further processing.
    faceRectsThe behaviour would be as followsIf this list is null then the face-detection is done on the entire image (or entire image represented by the sourceId if the image is null) and recognition is attempted on all the faces detected.If the list contains one or more elements, then the processing is done only on those rects. It is imperative that this parameter is valid only if the QImage supplied is not null since the reference image size for the rects is ambiguous otherwise.

    processFaces ( const QString & )

    voidprocessFaces(const QString &sourceId)

    Enqueues an image for Face Recognition.

    When the recognition process is complete the facesRecognized() signal is emitted.
    Note:

    The XQFaceThumbnailer object is accessed internally via the XQFaceDatabase. Hence the instance if XQFaceThumbnailer supplied to XQFaceDatabase would be used.

    Parameters
    sourceIdThe file/fileid of the image on which Face Recognition is to be done. The XQFaceThumbnailer interface createThumbnail() is called in order to create a QImage on which the Face Detection will be done. The QImage given as part of the thumbnailCreated() signal would be used. In either case (QImage is null or not) the XQFaceThumbnailer interface createFaceThumbnail() is called in order to extract the portion of the image with a face in it. The thumbnail returned as part of faceThumbnailCreated() is used for further processing.

    processFaces ( const QString &, const QImage &, const QRect &, const QString & )

    voidprocessFaces(const QString &sourceId,
    const QImage &image,
    const QRect &faceRect,
    const QString &faceId
    )

    Enqueues an image for Face Recognition.

    A face region is formed out of the given rect and the supplied faceid is associated with it. This has the same effect as calling XQFaceRegion::setFaceId() on the face region that this rectangle represents. The facesRecognized() signal is still emitted even though the rect is supplied. Only the supplied rect is processed.

    Note:

    If the sourceId is a null string, then it is not possible to train the software. Recognition is still possible.

    Note:

    The XQFaceThumbnailer object is accessed internally via the XQFaceDatabase. Hence the instance if XQFaceThumbnailer supplied to XQFaceDatabase would be used.

    Parameters
    sourceIdThe file/fileid of the image on which Face Recognition is to be done.
    imageThis parameter cannot be a null QImage.The processing is done on the supplied image. The XQFaceThumbnailer interface createFaceThumbnail() is called in order to extract the portion of the image with a face in it. The thumbnail returned as part of faceThumbnailCreated() is used for further processing.
    faceRectThe processing is done only on the supplied rect. It is imperative that this parameter is valid only if the QImage supplied is not null since the reference image size for the rect is ambiguous otherwise.
    faceIdAfter processing, this faceId is assigned to the face region (same effect as calling XQFaceRegion::setFaceId())