147
edits
Changes
→Hotspot
void BlurImage(const SImageData& srcImage, SImageData &destImage, float xblursigma, float yblursigma, unsigned int xblursize, unsigned int yblursize)
{
// allocate space for copying the image for destImage and tmpImage destImage.m_width = srcImage.m_width; destImage.m_height = srcImage.m_height; destImage.m_pitch = srcImage.m_pitch; destImage.m_pixels.resize(destImage.m_height * destImage.m_pitch); SImageData tmpImage; tmpImage.m_width = srcImage.m_width; tmpImage.m_height = srcImage.m_height; tmpImage.m_pitch = srcImage.m_pitch; tmpImage.m_pixels.resize(tmpImage.m_height * tmpImage.m_pitch);
// horizontal blur from srcImage into tmpImage
auto row = GaussianKernelIntegrals(xblursigma, xblursize);
for (int y = 0; y < tmpImage.m_height; ++y)
{
const uint8_t *pixel = GetPixelOrBlack(srcImage, x + startOffset + i, y);
}
}
}
auto row = GaussianKernelIntegrals(yblursigma, yblursize);
for (int y = 0; y < destImage.m_height; ++y)
{
const uint8_t *pixel = GetPixelOrBlack(tmpImage, x, y + startOffset + i);
}
}
}