Hi, I have a silly question. Is the following class the right normalization for 3D grayscale images?
vol = vol-vol.mean()/vol.std()
If so, should I expect after applying this nor,alization the mean of transformed image ill be zero and std will be one?
You should wrap the subtraction into parentheses, otherwise you would scale the
mean value by the inverse
If that’s fixed, your output should have a zero mean (or something around
1e-6) and a unit variance.
It was solved. Thank you @ptrblck. The variance also is near 1, not exactly 1, is that true?
How large is the difference between the calculated variance and the theoretical
This is mean
1.3271347e-07 and this is std
This seems to be alright, as the difference is in the floating point precision limits.
Thank you for your answer.