|
AlbumShaper
1.0a3
|

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) |
| void blurImage | ( | QImage & | image, |
| float | sigma | ||
| ) |
Definition at line 94 of file blur.cpp.
References blurImage().
Referenced by GrainEditor::adjustImage(), blurImage(), EdgeDetect::constructEdgeImage(), and sharpenImage().
{
//supply dummy data for edges, notably NULL for the edge image pointer.
//other values have no effect
blurImage( image, sigma, QPoint(0,0), image.size(), NULL, NULL, 0, false );
}
| 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.
{
edgeImage = edges;
regionMap = regions;
regionCount = numRegions;
displayOffset = offset;
fullRes = fullImageRes;
//compute blurring coeffecients
computeCoeffs(sigma);
//store image dimensions
width = image.width();
height = image.height();
//Construct float buffer that is the size of the image/
//In order to conserve memory process image three times, once for
//each color channel.
buffer = new float[ width * height ];
rowBuffer = new float[width];
colBuffer = new float[height];
regionRowBuffer = new float[width * numRegions];
regionColBuffer = new float[height * numRegions];
//iterate over each color channel
int channel;
for( channel = 0; channel <=2; channel++)
{
//copy color data into float buffer
fillBuffer( image, channel );
//blur buffer data
blurBuffer();
//reset image data used blurred buffer
resetImageData(image, channel, targetEdges);
}
//delete buffer
delete[] buffer;
delete[] rowBuffer;
delete[] colBuffer;
}
1.7.5.1