MSECalc

Compare the input images using the mean square error operation.

 

function call:

[num1]=vsg('MSECalc',in_img1,in_img2);

 

Arguments:

in_img1 input image, 3 channel RGB, 1 channel greyscale or binary image, or DICOM image.

in_img2 input image, 3 channel RGB, 1 channel greyscale or binary image, or DICOM image.

 

Description:

num1 – a double representing the mean squared error per pixel between in_img1 and in_img2. Each image is zero padded to match in size for the calculations.

 

Example:

img1 = openimage('lake.jpg');

[img2]=vsg('GaussianNoise',img1,10.0);

h=figure;image(uint8(img2));set(h,'Name','Gaussian Noise');

[num1]=vsg('MSECalc',img1,img2);

 

Notes:

1. For DICOM images, the function calculates the MSE value across all slices and returns a per “voxel” MSE value.

2. For RGB images, the function calculates the MSE value across all colour planes, and returns a per colour plane pixel error.

Home       Functions       Back