Skip to main content

A python version of Matlab's Perception based Image Quality Evaluator (PIQE) no-reference image quality score

Project description

Perception based Image Quality Evaluator (PIQE)

No-reference image quality assessment score for Python

Converted from and tested against the MATLAB function.

Based on the paper:

Venkatanath N, Praneeth D, Maruthi Chandrasekhar Bh, S. S. Channappayya and S. S. Medasani, "Blind image quality evaluation using perception based features," 2015 Twenty First National Conference on Communications (NCC), Mumbai, India, 2015, pp. 1-6, doi: 10.1109/NCC.2015.7084843.

Syntax

pip install pypiqe
from pypiqe import piqe

score, activityMask, noticeableArtifactMask, noiseMask = piqe(I)

Description

Examples

Input Arguments

Name Type Description
I 2D Image Input image, specified as a 2-D grayscale image of size m-by-n or 2-D RGB image of size m-by-n-by-3.

Output Arguments

Name Type Description
score nonnegative double PIQE score for the input image A, returned as a nonnegative scalar in the range [0, 100]. The PIQE score is the no-reference image quality score and it is inversely correlated to the perceptual quality of an image. A low score value indicates high perceptual quality and high score value indicates low perceptual quality.
activityMask 2D Binary Image Spatial quality mask of active blocks, returned as a 2-D binary image of size m-by-n, where m and n are the dimensions of the input image A. The activityMask is composed of high spatially active blocks in the input image. The high spatially active blocks in the input image are the regions with more spatial variability due to factors that include compression artifacts and noise. The high spatially active blocks are assigned a value '1' in the activityMask.
noticeableArtifactMask 2D Binary Image Spatial quality mask of noticeable artifacts, returned as a 2-D binary image of size m-by-n, where m and n are the dimensions of the input image A. The noticeableArtifactsMask is composed of blocks in activityMask that contain blocking artifacts (due to compression) or sudden distortions.
noiseMask 2D Binary Image Spatial quality mask of Gaussian noise, returned as a 2-D binary image of size m-by-n, where m and n are the dimensions of the input image A. The noiseMask is composed of blocks in activityMask that contain Gaussian noise.

Algorithm

PIQE calculates the no-reference quality score for an image through block-wise distortion estimation, using these steps:

  1. Compute the Mean Subtracted Contrast Normalized (MSCN) coefficient for each pixel in the image using the algorithm proposed by N. Venkatanath and others [1].
  2. Divide the input image into nonoverlapping blocks of size 16-by-16.
  3. Identify high spatially active blocks based on the variance of the MSCN coefficients.
  4. Generate activityMask using the identified high spatially active blocks.
  5. In each block, evaluate distortion due to blocking artifacts and noise using the MSCN coefficients.
  6. Use threshold criteria to classify the blocks as distorted blocks with blocking artifacts, distorted blocks with Gaussian noise, and undistorted blocks.
  7. Generate noticeableArtifactsMask from the distorted blocks with blocking artifacts and noiseMask from the distorted blocks with Gaussian noise.
  8. Compute the PIQE score for the input image as the mean of scores in the distorted blocks.
  9. The quality scale of the image based on its PIQE score is given in this table.
Quality Scale Score Range
Excellent (0, 20)
Good (20, 40)
Fair (40, 60)
Poor (60, 80)
Bad (80, 100)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypiqe-1.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file pypiqe-1.2-py3-none-any.whl.

File metadata

  • Download URL: pypiqe-1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for pypiqe-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0fd6c0c0c19c7b8a59a4579e30babc6210b1c5b3077ee37cf91191345161ea84
MD5 fad11fb9ab9de7ac8fdc869de2f26eed
BLAKE2b-256 920d843b9907c7c134a622201917e79d9765f16db9842c32e9a2e9157e401550

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page