image and noisy image mse as first mse, visibility changes

This commit is contained in:
2025-10-24 17:07:41 +03:00
parent 112ae6d5b0
commit cf21390395
2 changed files with 8 additions and 31 deletions

10
pohi.py
View File

@@ -86,8 +86,9 @@ with h5py.File(args.output, 'w') as hdf5_file:
vox = np.array(vox)
mses = []
mssim = []
for j in g_sigma:
MSE = np.sum((noisy_image - scaled_original)**2) / noisy_image.size # adding image and noisy image mse
image_kerneled = gaussian_filter(noisy_image, sigma = j)
psf_kerneled = gaussian_filter(psf, sigma = j)
print(np.sum(image_kerneled),np.sum(noisy_image), np.sum(psf_kerneled), np.sum(psf))
@@ -101,8 +102,11 @@ with h5py.File(args.output, 'w') as hdf5_file:
hdf5_file.create_dataset(f'ch{w:03d}/intensity_{i:08.3f}/SIGMA_{j:03.1f}', data = dec[0])
hdf5_file.create_dataset(f"ch{w:03d}/intensity_{i:08.3f}/minimum_image_{j:03.1f}", data = dec[4])
mses.append(dec[1])
dec[1][-1] = MSE
meansquare = np.concatenate(([dec[1][-1]], dec[1][:-1]))
mses.append(meansquare)
#mses.append(dec[1])
mssim.append(dec[2])