~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/removeredeyes/detection/locators/haarclassifier/haarclassifierlocator.h

  • Committer: Package Import Robot
  • Author(s): Felix Geyer, Rohan Garg, Philip Muškovac, Felix Geyer
  • Date: 2011-09-23 18:18:55 UTC
  • mfrom: (1.2.36 upstream)
  • Revision ID: package-import@ubuntu.com-20110923181855-ifs67wxkugshev9k
Tags: 2:2.1.1-0ubuntu1
[ Rohan Garg ]
* New upstream release (LP: #834190)
  - debian/control
    + Build with libqtwebkit-dev
 - debian/kipi-plugins-common
    + Install libkvkontakte required by kipi-plugins
 - debian/digikam
    + Install panoramagui

[ Philip Muškovac ]
* New upstream release
  - debian/control:
    + Add libcv-dev, libcvaux-dev, libhighgui-dev, libboost-graph1.46-dev,
      libksane-dev, libxml2-dev, libxslt-dev, libqt4-opengl-dev, libqjson-dev,
      libgpod-dev and libqca2-dev to build-deps
    + Add packages for kipi-plugins, libmediawiki, libkface, libkgeomap and
      libkvkontakte
  - debian/rules:
    + Don't build with gphoto2 since it doesn't build with it.
  - Add kubuntu_fix_test_linking.diff to fix linking of the dngconverter test
  - update install files
  - update kubuntu_01_mysqld_executable_name.diff for new cmake layout
    and rename to kubuntu_mysqld_executable_name.diff
* Fix typo in digikam-data description (LP: #804894)
* Fix Vcs links

[ Felix Geyer ]
* Move library data files to the new packages libkface-data, libkgeomap-data
  and libkvkontakte-data.
* Override version of the embedded library packages to 1.0~digikam<version>.
* Exclude the library packages from digikam-dbg to prevent file conflicts in
  the future.
* Call dh_install with --list-missing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ============================================================
 
2
 *
 
3
 * This file is a part of kipi-plugins project
 
4
 * http://www.kipi-plugins.org
 
5
 *
 
6
 * Date        : 2009-02-12
 
7
 * Description : locator that uses an OpenCV haar cascades classifier
 
8
 *
 
9
 * Copyright (C) 2009 by Andi Clemens <andi dot clemens at gmx dot net>
 
10
 *
 
11
 * This program is free software; you can redistribute it
 
12
 * and/or modify it under the terms of the GNU General
 
13
 * Public License as published by the Free Software Foundation;
 
14
 * either version 2, or (at your option)
 
15
 * any later version.
 
16
 *
 
17
 * This program is distributed in the hope that it will be useful,
 
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
 * GNU General Public License for more details.
 
21
 *
 
22
 * ============================================================ */
 
23
 
 
24
#ifndef HAARCLASSIFIERLOCATOR_H
 
25
#define HAARCLASSIFIERLOCATOR_H
 
26
 
 
27
// OpenCV includes
 
28
 
 
29
// To avoid broken compilation with OpenCV >= 2.0
 
30
#undef HAVE_CONFIG_H
 
31
 
 
32
#ifdef WIN32
 
33
#include <cv.h>
 
34
#include <highgui.h>
 
35
#else
 
36
#include <opencv/cv.h>
 
37
#include <opencv/highgui.h>
 
38
#endif
 
39
 
 
40
// Local includes
 
41
 
 
42
#include "locator.h"
 
43
 
 
44
class QString;
 
45
 
 
46
namespace KIPIRemoveRedEyesPlugin
 
47
{
 
48
 
 
49
class HaarClassifierLocator : public Locator
 
50
{
 
51
    Q_OBJECT
 
52
 
 
53
public:
 
54
 
 
55
    HaarClassifierLocator();
 
56
    virtual ~HaarClassifierLocator();
 
57
 
 
58
    int startCorrection(const QString& src, const QString& dest);
 
59
    int startTestrun(const QString& src);
 
60
    int startPreview(const QString& src);
 
61
 
 
62
    QWidget* settingsWidget();
 
63
 
 
64
    void readSettings();
 
65
    void writeSettings();
 
66
 
 
67
private Q_SLOTS:
 
68
 
 
69
    void updateSettings();
 
70
 
 
71
private:
 
72
 
 
73
    int  findPossibleEyes(double csf, int ngf, const char* classifierFile);
 
74
    void removeRedEyes();
 
75
    void findBlobs(IplImage* i_mask, int minsize);
 
76
    void generateMask(int i_v, CvSeq* i_eyes);
 
77
    void allocateBuffers();
 
78
    void clearBuffers();
 
79
    void saveImage(const QString& path, SaveResult type);
 
80
 
 
81
private:
 
82
 
 
83
    struct HaarClassifierLocatorPriv;
 
84
    HaarClassifierLocatorPriv* const d;
 
85
};
 
86
 
 
87
} // namespace KIPIRemoveRedEyesPlugin
 
88
 
 
89
#endif /* HAARCLASSIFIERLOCATOR_H */