Public Member Functions | Friends

RedEyeDetection Class Reference

Filter generator to detect red eyes to be removed by RedEyeReduction. More...

#include <redeyedetection.h>

Inheritance diagram for RedEyeDetection:
Inheritance graph
[legend]
Collaboration diagram for RedEyeDetection:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RedEyeDetection ()
 ~RedEyeDetection ()
QuillImageFiltergenerate (const QuillImage &image) const
bool setOption (const QString &option, const QVariant &value)
bool isUsedOnPreview () const
const QString name () const
const QStringList supportedOptions () const
QVariant option (const QString &option) const

Friends

class TestRedEyeReduction

Detailed Description

Filter generator to detect red eyes to be removed by RedEyeReduction.

Domain based name: org.maemo.red-eye-detection

Options supported: SelectionArea (polygon approximating the eye area in full-image coordinates).

Default behavior: none.


Constructor & Destructor Documentation

RedEyeDetection::RedEyeDetection (  ) 

Detects a red eye, generates a reduction filter

RedEyeDetection::~RedEyeDetection (  ) 

Member Function Documentation

QuillImageFilter * RedEyeDetection::generate ( const QuillImage image  )  const [virtual]

The red eye detection works this way: Search all points which are less than a given distance from the starting point. Of these points, select the one which has the largest red component relative to other color components.

From this starting point, apply a flood fill selection algorithm, selecting those points which are considered "red" enough.

If the flood fill overflows the selected area, progressively tighten the definition of "red" until the flooded area stays. reasonable.

Soften the edges of the reasonable area if pixels near the edge are near the definition of "red".

Construct a polygon from the results.

Warning: As other generators, this algorithm is supposed to run in synchronous time. If the given radius is too big, the algorithm may become very slow!

Reimplemented from QuillImageFilterGeneratorImplementation.

bool RedEyeDetection::isUsedOnPreview (  )  const [virtual]
const QString RedEyeDetection::name (  )  const [inline, virtual]

Reimplemented from QuillImageFilterImplementation.

QVariant RedEyeDetection::option ( const QString &  filterOption  )  const [virtual]

Returns the value of a filter option. These options are the recommended way to pass information to the filters. This function needs to be reimplemented in a derived class to support options.

Reimplemented from QuillImageFilterImplementation.

bool RedEyeDetection::setOption ( const QString &  filterOption,
const QVariant &  value 
) [virtual]

Sets the value of a filter option. These options are the recommended way to pass information to the filters. This function needs to be reimplemented in a derived class to support options.

Reimplemented from QuillImageFilterImplementation.

const QStringList RedEyeDetection::supportedOptions (  )  const [virtual]

Reimplemented from QuillImageFilterImplementation.


Friends And Related Function Documentation

friend class TestRedEyeReduction [friend]

The documentation for this class was generated from the following files: