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 //--------------------
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
34 QImage rawImage;
35 
36 //modified image
37 QImage* editedImage;
38 //------
39 //find region within image that blob pixels are within
40 void findRegionOfInterest(QPoint topLeftExtreme, QPoint bottomRightExtreme);
41 
43 //-------
44 //find all blobs, including their size (pixel count) and width/height aspect ratio
45 void findBlobs();
46 
48 
51 
53 void pushPixel(int x, int y, int id);
54 Q3ValueStack<QPoint> spreadablePixels;
55 
56 Q3ValueStack<int> blobIDs;
57 Q3ValueStack<int> blobSizes;
58 Q3ValueStack<double> blobAspectRatios;
59 //-------
60 //sort blob list by decreasing size (pixel count)
62 
64 int* ids;
65 int* sizes;
66 double* ratios;
67 //-------
68 //find biggest two consecutive blobs with similar aspect ratios
69 void findBestTwoBlobs();
70 
71 int id1, id2;
72 //-------
73 //desaturate selected blobs
74 void desaturateBlobs();
75 
76 //desaturate entire image - only used if no two good blobs found
77 void desaturateEntireImage(QPoint topLeftExtreme, QPoint bottomRightExtreme);
78 
79 bool IDedPixel( int x, int y);
80 double desaturateAlpha(int x, int y);
81 //------
82 
83 #endif //BACKEND_ENHANCEMENTS_REDEYE_INTERNAL_H
void pushPixel(int x, int y, int id)
Definition: redEye.cpp:350
void findRegionOfInterest(QPoint topLeftExtreme, QPoint bottomRightExtreme)
Definition: redEye.cpp:305
QPoint bottomRight
int updateIncrement
QPoint topLeft
Q3ValueStack< double > blobAspectRatios
Q3ValueStack< int > blobIDs
int * regionOfInterest
QImage rawImage
int regionHeight
Q3ValueStack< QPoint > spreadablePixels
void desaturateBlobs()
Definition: redEye.cpp:612
StatusWidget * status
int id2
bool IDedPixel(int x, int y)
Definition: redEye.cpp:561
QPoint blobTopLeft
void findBestTwoBlobs()
Definition: redEye.cpp:506
int * ids
int blobPixelCount
QPoint blobBottomRight
double desaturateAlpha(int x, int y)
Definition: redEye.cpp:572
int regionWidth
int blobCount
int * sizes
Q3ValueStack< int > blobSizes
void findBlobs()
Definition: redEye.cpp:372
QImage * editedImage
double * ratios
void desaturateEntireImage(QPoint topLeftExtreme, QPoint bottomRightExtreme)
Definition: redEye.cpp:643
int newProgress
void sortBlobsByDecreasingSize()
Definition: redEye.cpp:468
int id1