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

https://docs.opencv.org/3.4/d5/d69/tutorial_py_non_local_means.html

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.