Zhang-Wu Directional LMMSE Image Demosaicking
|
Image difference calculator program. More...
Go to the source code of this file.
Data Structures | |
struct | programparams |
struct of program parameters More... | |
Macros | |
#define | DISPLAY_SCALING 255 |
Display metrics for intensities in the range [0,DISPLAY_SCALING]. More... | |
#define | MSSIM_K1 0.01 |
#define | MSSIM_K2 0.03 |
#define | MSSIM_C1 (MSSIM_K1*MSSIM_K1) |
#define | MSSIM_C2 (MSSIM_K2*MSSIM_K2) |
Enumerations | |
enum | metric { DEFAULT_METRICS, MAX_METRIC, MSE_METRIC, RMSE_METRIC, PSNR_METRIC, MSSIM_METRIC } |
enum of possible metrics More... | |
Functions | |
void | MakeDifferenceImage (float *A, const float *B, int Width, int Height, int NumChannels, float D) |
Make a difference image, Diff = (A - B)/D + 0.5. More... | |
void | BasicMetrics (float *Max, float *Mse, const float *A, const float *B, int Width, int Height, int NumChannels, int Pad) |
Compute the maximum absolute difference and the MSE. More... | |
float | ComputeMssim (const float *A, const float *B, int Width, int Height, int NumChannels, int Pad) |
Compute the Mean Structural SIMilarity (MSSIM) index. More... | |
void | PrintHelpMessage () |
Print program usage help message. More... | |
int | main (int argc, char *argv[]) |
Image difference calculator program.
This file implements the imdiff program, a command line tool for comparing two images with various image quality metrics. The possible metrics are
The program can also create a difference image, computed as D_n = 255/20 (A_n - B_n) + 255/2 where values outside of the range [0,255] are saturated.
Image alpha channels are ignored. Also beware that although the program can read 16-bit PNG images (provided USE_LIBPNG is enabled), the image data is quantized internally to 8 bits.
Copyright (c) 2010-2011, Pascal Getreuer All rights reserved.
This program is free software: you can use, modify and/or redistribute it under the terms of the simplified BSD License. You should have received a copy of this license along this program. If not, see http://www.opensource.org/licenses/bsd-license.html.
Definition in file imdiff.c.
#define DISPLAY_SCALING 255 |
enum metric |
void BasicMetrics | ( | float * | Max, |
float * | Mse, | ||
const float * | A, | ||
const float * | B, | ||
int | Width, | ||
int | Height, | ||
int | NumChannels, | ||
int | Pad | ||
) |
float ComputeMssim | ( | const float * | A, |
const float * | B, | ||
int | Width, | ||
int | Height, | ||
int | NumChannels, | ||
int | Pad | ||
) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
void MakeDifferenceImage | ( | float * | A, |
const float * | B, | ||
int | Width, | ||
int | Height, | ||
int | NumChannels, | ||
float | D | ||
) |