AlbumShaper 1.0a3
redEye_internal.h
Go to the documentation of this file.
1//==============================================
2// copyright : (C) 2003-2005 by Will Stokes
3//==============================================
4// This program is free software; you can redistribute it
5// and/or modify it under the terms of the GNU General
6// Public License as published by the Free Software
7// Foundation; either version 2 of the License, or
8// (at your option) any later version.
9//==============================================
10
11#ifndef BACKEND_ENHANCEMENTS_REDEYE_INTERNAL_H
12#define BACKEND_ENHANCEMENTS_REDEYE_INTERNAL_H
13
14#include <qimage.h>
15#include <q3valuestack.h>
16#include <qpoint.h>
17
18//--------------------
19//forward declarations
20//--------------------
21class StatusWidget;
22
23//------
24//handle on status widget
26
27//update increment variable used to determine when progress bar should be updated
29
30//progress tracker, used to determine when to update the progress bar
32
33//original image
34QImage rawImage;
35
36//modified image
38//------
39//find region within image that blob pixels are within
40void findRegionOfInterest(QPoint topLeftExtreme, QPoint bottomRightExtreme);
41
43//-------
44//find all blobs, including their size (pixel count) and width/height aspect ratio
45void findBlobs();
46
48
51
53void pushPixel(int x, int y, int id);
54Q3ValueStack<QPoint> spreadablePixels;
55
56Q3ValueStack<int> blobIDs;
57Q3ValueStack<int> blobSizes;
58Q3ValueStack<double> blobAspectRatios;
59//-------
60//sort blob list by decreasing size (pixel count)
62
64int* ids;
65int* sizes;
66double* ratios;
67//-------
68//find biggest two consecutive blobs with similar aspect ratios
69void findBestTwoBlobs();
70
71int id1, id2;
72//-------
73//desaturate selected blobs
74void desaturateBlobs();
75
76//desaturate entire image - only used if no two good blobs found
77void desaturateEntireImage(QPoint topLeftExtreme, QPoint bottomRightExtreme);
78
79bool IDedPixel( int x, int y);
80double desaturateAlpha(int x, int y);
81//------
82
83#endif //BACKEND_ENHANCEMENTS_REDEYE_INTERNAL_H
int id1
Q3ValueStack< double > blobAspectRatios
int regionWidth
int updateIncrement
void sortBlobsByDecreasingSize()
Definition redEye.cpp:468
void pushPixel(int x, int y, int id)
Definition redEye.cpp:350
void desaturateBlobs()
Definition redEye.cpp:612
QImage rawImage
int * ids
QImage * editedImage
StatusWidget * status
int * regionOfInterest
QPoint topLeft
double * ratios
Q3ValueStack< int > blobSizes
QPoint bottomRight
double desaturateAlpha(int x, int y)
Definition redEye.cpp:572
void findBestTwoBlobs()
Definition redEye.cpp:506
QPoint blobTopLeft
bool IDedPixel(int x, int y)
Definition redEye.cpp:561
int blobPixelCount
int blobCount
Q3ValueStack< int > blobIDs
void findRegionOfInterest(QPoint topLeftExtreme, QPoint bottomRightExtreme)
Definition redEye.cpp:305
int id2
int newProgress
QPoint blobBottomRight
int regionHeight
void findBlobs()
Definition redEye.cpp:372
void desaturateEntireImage(QPoint topLeftExtreme, QPoint bottomRightExtreme)
Definition redEye.cpp:643
Q3ValueStack< QPoint > spreadablePixels
int * sizes