This file is indexed.

/usr/include/libkface/facedetector.h is in libkface-dev 4:15.08.2-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/** ===========================================================
 * @file
 *
 * This file is a part of digiKam project
 * <a href="http://www.digikam.org">http://www.digikam.org</a>
 *
 * @date  2010-09-02
 * @brief A convenience class for a standalone face detector
 *
 * @author Copyright (C) 2010 by Marcel Wiesweg
 *         <a href="mailto:marcel dot wiesweg at gmx dot de">marcel dot wiesweg at gmx dot de</a>
 * @author Copyright (C) 2010 by Aditya Bhatt
 *         <a href="mailto:adityabhatt1991 at gmail dot com">adityabhatt1991 at gmail dot com</a>
 * @author Copyright (C) 2010-2014 by Gilles Caulier
 *         <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General
 * Public License as published by the Free Software Foundation;
 * either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * ============================================================ */

#ifndef KFACE_FACEDETECTOR_H
#define KFACE_FACEDETECTOR_H

// Qt includes

#include <QExplicitlySharedDataPointer>
#include <QImage>
#include <QVariant>

// Local includes

#include "libkface_export.h"

namespace KFaceIface
{

class KFACE_EXPORT FaceDetector
{

public:

    /**
     * Provides face detection, that means the process of selecting
     * those regions of a full image which contain face.
     *
     * This class provides shallow copying
     * The class is fully reentrant (a single object and its copies are not thread-safe).
     * Deferred creation is guaranteed, that means creation of a FaceDetector
     * object is cheap, the expensive creation of the detection backend
     * is performed when detectFaces is called for the first time.
     */
    FaceDetector();
    FaceDetector(const FaceDetector& other);
    ~FaceDetector();

    QString backendIdentifier() const;

    FaceDetector& operator=(const FaceDetector& other);

    /**
     * Scan an image for faces. Return a list with regions possibly
     * containing faces.
     * If the image has been downscaled anywhere in the process,
     * provide the original size of the image as this may be of importance in the detection process.
     *
     * Found faces are returned in relative coordinates.
     */
    QList<QRectF> detectFaces(const QImage& image, const QSize& originalSize = QSize());

    /**
     * Tunes backend parameters.
     * Available parameters:
     *
     * "speed"       vs. "accuracy",    0..1, float
     * "sensitivity" vs. "specificity", 0..1, float.
     *
     * For both pairs: a = 1-b, you can set either.
     * The first pair changes the ROC curve in a trade for computing time.
     * The second pair moves on a given ROC curve towards more false positives, or more missed faces.
     */
    void        setParameter(const QString& parameter, const QVariant& value);
    void        setParameters(const QVariantMap& parameters);
    QVariantMap parameters() const;

    /**
     * Returns the recommended size if you want to scale images for detection.
     * Larger images can be passed, but may be downscaled.
     */
    int recommendedImageSize(const QSize& availableSize = QSize()) const;

    static QRectF        toRelativeRect(const QRect& absoluteRect, const QSize& size);
    static QRect         toAbsoluteRect(const QRectF& relativeRect, const QSize& size);
    static QList<QRectF> toRelativeRects(const QList<QRect>& absoluteRects, const QSize& size);
    static QList<QRect>  toAbsoluteRects(const QList<QRectF>& relativeRects, const QSize& size);

private:

    class Private;
    QExplicitlySharedDataPointer<Private> d;
};

} // namespace KFaceIface

#endif // KFACE_FACEDETECTOR_H