-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add badge and example codes to README
- Loading branch information
1 parent
ff04cca
commit 576283b
Showing
1 changed file
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,43 @@ | ||
# ImageQualityIndexes | ||
|
||
[![Build Status](https://travis-ci.org/JuliaImages/ImageQualityIndexes.jl.svg?branch=master)](https://travis-ci.org/JuliaImages/ImageQualityIndexes.jl) | ||
[![Codecov](https://codecov.io/gh/JuliaImages/ImageQualityIndexes.jl/badge.svg?branch=master)](https://codecov.io/gh/JuliaImages/ImageQualityIndexes.jl) | ||
|
||
ImageQualityIndexes provides the basic image quality assessment methods. | ||
|
||
## Supported indexes | ||
|
||
* `PSNR` -- Peak signal-to-noise ratio | ||
* `SSIM` -- Structural similarity | ||
### Full reference indexes | ||
|
||
* `PSNR`/`psnr` -- Peak signal-to-noise ratio | ||
* `SSIM`/`ssim` -- Structural similarity | ||
|
||
|
||
## Basic usage | ||
|
||
In this package, each index corresponds to a `ImageQualityIndex` type, there are three ways to assess the image quality: | ||
The root type is `ImageQualityIndex`, each concrete index is supposed to be one of `FullReferenceIQI`, `ReducedReferenceIQI` and `NoReferenceIQI`. | ||
|
||
There are three ways to assess the image quality: | ||
|
||
* use the general protocol, e.g., `assess(PSNR(), x, ref)`. This reads as "**assess** the image quality of **x** using method **PSNR** with information **ref**" | ||
* each index instance is itself a function, e.g., `PSNR()(x, ref)` | ||
* for well-known indexes, there are also convenient name for it, e.g., `psnr(x, ref)` | ||
* for well-known indexes, there are also convenient name for it for benchmark purpose. | ||
|
||
For detailed usage of particular index, please check the docstring (e.g., `?PSNR`) | ||
|
||
## Examples | ||
|
||
```julia | ||
using Images, TestImages | ||
using ImageQualityIndexes | ||
|
||
img = testimage("lena_gray_256") .|> float64 | ||
noisy_img = img .+ 0.1 .* randn(size(img)) | ||
ssim(noisy_img, img) # 0.3577 | ||
psnr(noisy_img, img) # 19.9941 | ||
|
||
kernel = ones(3, 3)./9 # mean filter | ||
denoised_img = imfilter(noisy_img, kernel) | ||
ssim(denoised_img, img) # 0.6529 | ||
psnr(denoised_img, img) # 26.0350 | ||
``` |
576283b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register()
576283b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/1158
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via: