![]() |
Image Quality Assessment (IQA) 1.1.2
A fast, accurate, and reliable C library for measuring image quality.
|
Go to the source code of this file.
Data Structures | |
| struct | _kernel |
Typedefs | |
| typedef float(* | _iqa_get_pixel )(const float *img, int w, int h, int x, int y, float bnd_const) |
Functions | |
| float | KBND_SYMMETRIC (const float *img, int w, int h, int x, int y, float bnd_const) |
| float | KBND_REPLICATE (const float *img, int w, int h, int x, int y, float bnd_const) |
| float | KBND_CONSTANT (const float *img, int w, int h, int x, int y, float bnd_const) |
| void | _iqa_convolve (float *img, int w, int h, const struct _kernel *k, float *result, int *rw, int *rh) |
| Applies the specified kernel to the image. The kernel will be applied to all areas where it fits completely within the image. The resulting image will be smaller by half the kernel width and height (w - kw/2 and h - kh/2). | |
| int | _iqa_img_filter (float *img, int w, int h, const struct _kernel *k, float *result) |
| float | _iqa_filter_pixel (const float *img, int w, int h, int x, int y, const struct _kernel *k, const float kscale) |
| typedef float(* _iqa_get_pixel)(const float *img, int w, int h, int x, int y, float bnd_const) |
Definition at line 37 of file convolve.h.
| void _iqa_convolve | ( | float * | img, |
| int | w, | ||
| int | h, | ||
| const struct _kernel * | k, | ||
| float * | result, | ||
| int * | rw, | ||
| int * | rh | ||
| ) |
Applies the specified kernel to the image. The kernel will be applied to all areas where it fits completely within the image. The resulting image will be smaller by half the kernel width and height (w - kw/2 and h - kh/2).
| img | Image to modify |
| w | Image width |
| h | Image height |
| k | The kernel to apply |
| result | Buffer to hold the resulting image ((w-kw)*(h-kh), where kw and kh are the kernel width and height). If 0, the result will be written to the original image buffer. |
| rw | Optional. The width of the resulting image will be stored here. |
| rh | Optional. The height of the resulting image will be stored here. |
Definition at line 81 of file convolve.c.
| float _iqa_filter_pixel | ( | const float * | img, |
| int | w, | ||
| int | h, | ||
| int | x, | ||
| int | y, | ||
| const struct _kernel * | k, | ||
| const float | kscale | ||
| ) |
Returns the filtered version of the specified pixel. If no kernel is given, the raw pixel value is returned.
| img | Source image |
| w | Image width |
| h | Image height |
| x | The x location of the pixel to filter |
| y | The y location of the pixel to filter |
| k | Optional. The convolution kernel to apply to the pixel. |
| kscale | The scale of the kernel (for normalization). 1 for normalized kernels. Required if 'k' is not null. |
Definition at line 157 of file convolve.c.
| int _iqa_img_filter | ( | float * | img, |
| int | w, | ||
| int | h, | ||
| const struct _kernel * | k, | ||
| float * | result | ||
| ) |
The same as _iqa_convolve() except the kernel is applied to the entire image. In other words, the kernel is applied to all areas where the top-left corner of the kernel is in the image. Out-of-bound pixel value (off the right and bottom edges) are chosen based on the 'bnd_opt' and 'bnd_const' members of the kernel structure. The resulting array is the same size as the input image.
| img | Image to modify |
| w | Image width |
| h | Image height |
| k | The kernel to apply |
| result | Buffer to hold the resulting image ((w-kw)*(h-kh), where kw and kh are the kernel width and height). If 0, the result will be written to the original image buffer. |
Definition at line 120 of file convolve.c.
| float KBND_CONSTANT | ( | const float * | img, |
| int | w, | ||
| int | h, | ||
| int | x, | ||
| int | y, | ||
| float | bnd_const | ||
| ) |
Out-of-bounds array values are set to 'bnd_const'
Definition at line 55 of file convolve.c.
| float KBND_REPLICATE | ( | const float * | img, |
| int | w, | ||
| int | h, | ||
| int | x, | ||
| int | y, | ||
| float | bnd_const | ||
| ) |
Out-of-bounds array values are set to the nearest border value
Definition at line 46 of file convolve.c.
| float KBND_SYMMETRIC | ( | const float * | img, |
| int | w, | ||
| int | h, | ||
| int | x, | ||
| int | y, | ||
| float | bnd_const | ||
| ) |
Out-of-bounds array values are a mirrored reflection of the border values
Definition at line 37 of file convolve.c.