00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
#ifndef BACKEND_ENHANCEMENTS_REDEYE_INTERNAL_H
00012
#define BACKEND_ENHANCEMENTS_REDEYE_INTERNAL_H
00013
00014
#include <qimage.h>
00015
#include <qvaluestack.h>
00016
#include <qpoint.h>
00017
00018
00019
00020
00021
class StatusWidget;
00022
00023
00024
00025 StatusWidget*
status;
00026
00027
00028 int updateIncrement;
00029
00030
00031 int newProgress;
00032
00033
00034 QImage
rawImage;
00035
00036
00037 QImage*
editedImage;
00038
00039
00040
void findRegionOfInterest(QPoint topLeftExtreme, QPoint bottomRightExtreme);
00041
00042 QPoint
topLeft,
bottomRight;
00043
00044
00045
void findBlobs();
00046
00047 int regionWidth,
regionHeight;
00048
00049 int blobPixelCount;
00050 QPoint
blobTopLeft,
blobBottomRight;
00051
00052 int*
regionOfInterest;
00053
void pushPixel(
int x,
int y,
int id);
00054 QValueStack<QPoint>
spreadablePixels;
00055
00056 QValueStack<int>
blobIDs;
00057 QValueStack<int>
blobSizes;
00058 QValueStack<double>
blobAspectRatios;
00059
00060
00061
void sortBlobsByDecreasingSize();
00062
00063 int blobCount;
00064 int*
ids;
00065 int*
sizes;
00066 double*
ratios;
00067
00068
00069
void findBestTwoBlobs();
00070
00071 int id1,
id2;
00072
00073
00074
void desaturateBlobs();
00075
00076
00077
void desaturateEntireImage(QPoint topLeftExtreme, QPoint bottomRightExtreme);
00078
00079
bool IDedPixel(
int x,
int y);
00080
double desaturateAlpha(
int x,
int y);
00081
00082
00083
#endif //BACKEND_ENHANCEMENTS_REDEYE_INTERNAL_H