blur.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void blurImage (QImage &image, float sigma)
void blurImage (QImage &image, float sigma, QPoint offset, QSize fullImageRes, QImage *edges, int *regions, int numRegions, bool targetEdges)


Function Documentation

void blurImage ( QImage &  image,
float  sigma,
QPoint  offset,
QSize  fullImageRes,
QImage *  edges,
int *  regions,
int  numRegions,
bool  targetEdges 
)

Definition at line 101 of file blur.cpp.

References blurBuffer(), buffer, colBuffer, computeCoeffs(), displayOffset, edgeImage, fillBuffer(), fullRes, height, regionColBuffer, regionCount, regionMap, regionRowBuffer, resetImageData(), rowBuffer, and width.

00105 {
00106   edgeImage = edges;
00107   regionMap = regions;
00108   regionCount = numRegions;
00109   displayOffset = offset;
00110   fullRes = fullImageRes;
00111   
00112   //compute blurring coeffecients
00113   computeCoeffs(sigma);
00114   
00115   //store image dimensions
00116   width = image.width();
00117   height = image.height();
00118   
00119   //Construct float buffer that is the size of the image/
00120   //In order to conserve memory process image three times, once for
00121   //each color channel.
00122   buffer = new float[ width * height ];
00123 
00124   rowBuffer = new float[width];
00125   colBuffer = new float[height];
00126   
00127   regionRowBuffer = new float[width * numRegions];
00128   regionColBuffer = new float[height * numRegions];
00129   
00130   //iterate over each color channel
00131   int channel;
00132   for( channel = 0; channel <=2; channel++)
00133   {
00134     //copy color data into float buffer
00135     fillBuffer( image, channel );
00136     
00137     //blur buffer data
00138     blurBuffer();
00139     
00140     //reset image data used blurred buffer
00141     resetImageData(image, channel, targetEdges);
00142   }
00143   
00144   //delete buffer
00145   delete[] buffer;
00146   delete[] rowBuffer;
00147   delete[] colBuffer;
00148 }

void blurImage ( QImage &  image,
float  sigma 
)

Definition at line 94 of file blur.cpp.

References blurImage().

00095 {
00096   //supply dummy data for edges, notably NULL for the edge image pointer.
00097   //other values have no effect
00098   blurImage( image, sigma, QPoint(0,0), image.size(), NULL, NULL, 0, false );
00099 }


Generated on Wed Jan 24 05:38:29 2007 for AlbumShaper by  doxygen 1.5.1