How do we calculate a input image(Grayscale) noise

Sorry I am new in this topic but can anyone suggest please

Like this ss how did he calculate sigma = 25

He didn’t. He just added the noise, probably in OpenCV

or you could denoise the picture, then calculate per-pixel difference between noisy input and denoised result, and estimate standard deviation on that.

if that author can confidently state \sigma = 25 then they very probably did what Matti said.