tfmri.image.psnr3d
tfmri.image.psnr3d¶
- psnr3d(img1, img2, max_val, name='psnr3d')[source]¶
Computes the peak signal-to-noise ratio (PSNR) between two 3D images.
This function operates on batches of multi-channel inputs and returns a PSNR value for each image in the batch.
- Parameters
img1 – A
Tensor. First batch of images. Must have rank >= 4 with shapebatch_shape + [depth, height, width, channels]. Can have integer or floating point type, with values in the range[0, max_val].img2 – A
Tensor. Second batch of images. Must have rank >= 4 with shapebatch_shape + [depth, height, width, channels]. Can have integer or floating point type, with values in the range[0, max_val].max_val – The dynamic range of the images (i.e., the difference between the maximum and the minimum allowed values). Defaults to 1 for floating point input images and
MAXfor integer input images, whereMAXis the largest positive representable number for the data type.name – Namespace to embed the computation in.
- Returns
The scalar PSNR between
img1andimg2. The returned tensor has typetf.float32and shapebatch_shape.