mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 01:22:09 +02:00
pnmpsnr: add page (#12180)
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
This commit is contained in:
parent
bcfadedad0
commit
29f0cf5c7d
1 changed files with 28 additions and 0 deletions
28
pages/common/pnmpsnr.md
Normal file
28
pages/common/pnmpsnr.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# pnmpsnr
|
||||
|
||||
> Compute the difference between two images.
|
||||
> More information: <https://netpbm.sourceforge.net/doc/pnmpsnr.html>.
|
||||
|
||||
- Compute the difference, i.e. the peak signal-to-noise ratio (PSNR) between two images:
|
||||
|
||||
`pnmpsnr {{path/to/file1.pnm}} {{path/to/file2.pnm}}`
|
||||
|
||||
- Compare the color components rather than the luminance and chrominance components of the images:
|
||||
|
||||
`pnmpsnr {{path/to/file1.pnm}} {{path/to/file2.pnm}} -rgb`
|
||||
|
||||
- Run in comparison mode, i.e. only output `nomatch` or `match` depending on whether the computing PSNR exceeds `n` or not:
|
||||
|
||||
`pnmpsnr {{path/to/file1.pnm}} {{path/to/file2.pnm}} -target {{n}}`
|
||||
|
||||
- Run in comparison mode and compare the individual image components, i.e. Y, Cb, and Cr, to the corresponding thresholds:
|
||||
|
||||
`pnmpsnr {{path/to/file1.pnm}} {{path/to/file2.pnm}} -target1 {{threshold_Y}} -target2 {{threshold_Cb}} -target3 {{threshold_Cr}}`
|
||||
|
||||
- Run in comparison mode and compare the individual image components, i.e. red, green, and blue to the corresponding thresholds:
|
||||
|
||||
`pnmpsnr {{path/to/file1.pnm}} {{path/to/file2.pnm}} -rgb -target1 {{threshold_red}} -target2 {{threshold_green}} -target3 {{threshold_blue}}`
|
||||
|
||||
- Produce machine-readable output:
|
||||
|
||||
`pnmpsnr {{path/to/file1.pnm}} {{path/to/file2.pnm}} -machine`
|
Loading…
Add table
Reference in a new issue