actually computes various measures of similarity between the two input images, but also returns some descriptors of the reference-image that are independent of any other image.

Returns a tuple of 18 values, each of which is a float-scalar.

The quality measures computed in this function correspond to the Image-quality features discussed in Galbally et al., 2014.

actually computes various measures of similarity between the two input images,

but also returns some descriptors of the reference-image that are independent

of any other image. Returns a tuple of 18 values, each of which is a float-

scalar. The quality measures computed in this function correspond to the Image-

quality features discussed in Galbally et al., 2014.

"""

defimage_quality_measures(refImage,testImage):

"""Compute image-quality measures for testImage and return a tuple of quality-measures.

Some of the quality-measures require a reference-image, but others are 'no-reference' measures.

:input refImage: 2d numpy array. Should represent input 8-bit gray-level image of size [M,N].

:input testImage: 2d numpy array. Should represent input 8-bit gray-level image of size [M,N]..

:return a tuple of 18 values, each of which is a float-scalar.

The quality measures computed in this function correspond to the Image-quality features discussed in Galbally et al., 2014.

"""Compute image-quality measures for testImage and return a tuple of

quality-measures. Some of the quality-measures require a reference-

image, but others are 'no-reference' measures.

:input refImage: 2d numpy array. Should represent input 8-bit gray-level

image of size [M,N].

:input testImage: 2d numpy array. Should represent input 8-bit gray-

level image of size [M,N]..

:return a tuple of 18 values, each of which is a float-scalar. The

quality measures computed in this function correspond to the Image-

quality features discussed in Galbally et al., 2014.

"""

assertlen(refImage.shape)==2,"refImage should be a 2D array"

assertlen(testImage.shape)==2,"testImage should be a 2D array"

assert(refImage.shape[0]==testImage.shape[0]),"The two images should have the same width"

assert(refImage.shape[1]==testImage.shape[1]),"The two images should have the same height"