Contrast to Noise Ratio (CNR)ΒΆ

Module for calculating the contrast-to-noise ratio (CNR) for an image.

Examples

>>> import numpy as np
>>> from viqa import CNR
>>> img = np.random.rand(256, 256)
>>> cnr = CNR(data_range=1, normalize=False)
>>> cnr
CNR(score_val=None)
>>> score = cnr.score(img,
...                   background_center=(128, 128),
...                   signal_center=(32, 32),
...                   radius=16)

Functions

contrast_to_noise_ratio(img, ...[, ...])

Calculate the contrast-to-noise ratio (CNR) for an image.

Classes

CNR([data_range, normalize])

Class to calculate the contrast-to-noise ratio (CNR) for an image.