I'm trying to make a Gaussian white noise in the image in the spatial domain, but CVI is not flexible on this issue. I found a solution - I generate a noise matrix, turn it into an image and then unite the source image and the noise image. To create the noise matrix I use the following function:
double GaussianNoise[pWidth];
double Noise[pHeight][pWidth];
for(int i = 0; i<pHeight; i++)
{
GaussNoise (pWidth, 1.0, 0, &GaussianNoise);
for(int j = 0; j<pWidth; j++) Noise[i][j] = GaussianNoise[j];
}
ImageNoise = imaqCreateImage (IMAQ_IMAGE_U8, 10);
imaqArrayToImage (ImageNoise, Noise, pWidth, pHeight);
My question is how can I set the parameters to get a desired signal-to-noise ratio, using the parameters of the function that generates the noise
GaussNoise (ssize_t numberOfElements, double standardDeviation, int seed, double gaussianNoise[]);
And using the original image info (if necessary).
thanks