How do I add white Gaussian noise with SNR=5dB to an image using imnoise?

I know that the syntax is:

J = imnoise(I,type,parameters)

and:

SNR = 10log10[var(image)/var(error image)]

How do I use this SNR value to add noise to the image?

Edit
Report