ifw-odp
2.0.0-alpha
|
#include "clipm_priv_image_edge_operations.h"
#include "clipm_math.h"
#include "clipm_priv_image.h"
#include "clipm_priv_image_signal.h"
#include "clipm_priv_checks.h"
#include "clipm_compatibility_replacements.h"
#include "clipm_priv_error.h"
Macros | |
#define | _clipm_priv_image_polar2cartesian_BODY(CTYPE) |
#define | clipm_priv_image_compute_angles_BODY(CTYPE) |
#define | clipm_priv_image_compute_pythagoras_BODY(CTYPE) |
#define | clipm_priv_image_compute_mean_angle_BODY(CTYPE, BUFFERSTART, IMSIZE, WINDOWSIZE, W_DATA, A_DATA, W_BPM, A_BPM, PERIODICITY, ANGLE, NORM) |
#define | clipm_priv_image_compute_angular_uniformity_BODY(CTYPE) |
#define | clipm_priv_image_LOOP_GOOD_2DATA_CONST(TYPE, IMSIZE_XY, WDWSIZE_XY, DATA1_WDW, BADP1_WDW, DATA2_WDW, BADP2_WDW, YACTION, XACTION, XACTION_BAD) |
Loop over a pixel buffer, only regarding good pixels. More... | |
cpl_error_code | clipm_priv_image_compute_gradients (const cpl_image *input, const cpl_size window_xxyy[4], cpl_image **out_magnitudes, cpl_image **out_angles) |
Compute image gradients. More... | |
cpl_image * | clipm_priv_image_conv_sobel_x (const cpl_image *input, const cpl_size window_xxyy[4]) |
Convolve image with horizontal Sobel operator. More... | |
cpl_image * | clipm_priv_image_conv_sobel_y (const cpl_image *input, const cpl_size window_xxyy[4]) |
Convolve image with vertical Sobel operator. More... | |
cpl_image * | clipm_priv_image_compute_angles (const cpl_image *grad_x, const cpl_image *grad_y) |
Calculate the angles of a gradient field. More... | |
cpl_image * | clipm_priv_image_compute_pythagoras (const cpl_image *input1, const cpl_image *input2) |
Calculate the Pythagoras of two images. More... | |
double | clipm_priv_image_compute_mean_angle (const cpl_image *magnitudes, const cpl_image *angles, const cpl_size window_xxyy[4], double periodic_factor, double *out_norm) |
Compute the mean of an angle-field inside a window. More... | |
cpl_error_code | clipm_priv_image_compute_mean_gradients (const cpl_image *magnitudes, const cpl_image *angles, const cpl_size window_xxyy[4], double periodic_factor, double radius_sigma, cpl_image **mean_magnitudes, cpl_image **mean_angles) |
Lowpass gradients after applying a periodic factor. More... | |
cpl_image * | clipm_priv_image_compute_angular_uniformity (const cpl_image *magnitudes, const cpl_image *angles, const cpl_size window_xxyy[4], double radius_sigma, double periodic_factor) |
Compute an indicator for a uniform pointing direction of gradients. More... | |
#define _clipm_priv_image_polar2cartesian_BODY | ( | CTYPE | ) |
#define clipm_priv_image_compute_angles_BODY | ( | CTYPE | ) |
#define clipm_priv_image_compute_angular_uniformity_BODY | ( | CTYPE | ) |
#define clipm_priv_image_compute_mean_angle_BODY | ( | CTYPE, | |
BUFFERSTART, | |||
IMSIZE, | |||
WINDOWSIZE, | |||
W_DATA, | |||
A_DATA, | |||
W_BPM, | |||
A_BPM, | |||
PERIODICITY, | |||
ANGLE, | |||
NORM | |||
) |
#define clipm_priv_image_compute_pythagoras_BODY | ( | CTYPE | ) |
#define clipm_priv_image_LOOP_GOOD_2DATA_CONST | ( | TYPE, | |
IMSIZE_XY, | |||
WDWSIZE_XY, | |||
DATA1_WDW, | |||
BADP1_WDW, | |||
DATA2_WDW, | |||
BADP2_WDW, | |||
YACTION, | |||
XACTION, | |||
XACTION_BAD | |||
) |
Loop over a pixel buffer, only regarding good pixels.
TYPE | C data type (e.g. int, float, double) |
IMSIZE_XY | Int buffer of size 2, containing the image size [x, y] |
WDWSIZE_XY | Int buffer of size 2, containing the window size |
DATA1_WDW | Pointer to image 1 data (window) |
BADP1_WDW | Pointer to bad pixel mask 1 data (window) |
DATA2_WDW | Pointer to image 2 data (window) |
BADP2_WDW | Pointer to bad pixel mask 2 data (window) |
YACTION | Action to perform first in each row |
XACTION | Action to always perform per good pixel |
XACTION_BAD | Action to always perform per bad pixel |
cpl_image* clipm_priv_image_compute_angles | ( | const cpl_image * | grad_x, |
const cpl_image * | grad_y | ||
) |
Calculate the angles of a gradient field.
grad_x | Image representing the horizontal gradients |
grad_y | Image representing the vertical gradients |
cpl_image* clipm_priv_image_compute_angular_uniformity | ( | const cpl_image * | magnitudes, |
const cpl_image * | angles, | ||
const cpl_size | window_xxyy[4], | ||
double | radius_sigma, | ||
double | periodic_factor | ||
) |
Compute an indicator for a uniform pointing direction of gradients.
magnitudes | Image containing gradient magnitude values |
angles | Image containing gradient angle values |
window_xxyy | Coordinate buffer of the form {xa, xb, ya, yb}, can be NULL, minimum/maximum order is irrelevant |
radius_sigma | Sigma of the gaussian region used for the lowpass |
periodic_factor | Divisor for the periodicity of |
cpl_error_code clipm_priv_image_compute_gradients | ( | const cpl_image * | input, |
const cpl_size | window_xxyy[4], | ||
cpl_image ** | out_magnitudes, | ||
cpl_image ** | out_angles | ||
) |
Compute image gradients.
input | Input image |
window_xxyy | Coordinate buffer of the form {xa, xb, ya, yb}, can be NULL, minimum/maximum order is irrelevant |
out_magnitudes | Pointer to ouput image for absolute gradient |
out_angles | Pointer to ouput image for gradient angles in the range |
double clipm_priv_image_compute_mean_angle | ( | const cpl_image * | magnitudes, |
const cpl_image * | angles, | ||
const cpl_size | window_xxyy[4], | ||
double | periodic_factor, | ||
double * | out_norm | ||
) |
Compute the mean of an angle-field inside a window.
magnitudes | Image containing gradient magnitude values (FITS convention) |
angles | Image containing local angle values (FITS convention) |
window_xxyy | Coordinate buffer of the form {xa, xb, ya, yb}, can be NULL, minimum/maximum order is irrelevant |
periodic_factor | Divisor for the periodicity of |
out_norm | (Optional output) the gradient's norm |
periodic_factor | Example Purpose |
---|---|
1 | Uni-directional (e.g. global) gradients |
2 | Lines and rectangular apertures |
3 | Equilateral triangles |
4 | Square apertures, crossing spikes of secondary mirror holder |
6 | Honeycombs |
cpl_error_code clipm_priv_image_compute_mean_gradients | ( | const cpl_image * | magnitudes, |
const cpl_image * | angles, | ||
const cpl_size | window_xxyy[4], | ||
double | periodic_factor, | ||
double | radius_sigma, | ||
cpl_image ** | mean_magnitudes, | ||
cpl_image ** | mean_angles | ||
) |
Lowpass gradients after applying a periodic factor.
magnitudes | Image containing gradient magnitude values (FITS convention) |
angles | Image containing gradient angle values (FITS convention) |
window_xxyy | Coordinate buffer of the form {xa, xb, ya, yb}, can be NULL, minimum/maximum order is irrelevant |
periodic_factor | Divisor for the periodicity of |
radius_sigma | Sigma of the gaussian used for the lowpass |
mean_magnitudes | (Optional output) magnitudes of lowpassed gradients |
mean_angles | (Optional output) angles of lowpassed gradients |
cpl_image* clipm_priv_image_compute_pythagoras | ( | const cpl_image * | input1, |
const cpl_image * | input2 | ||
) |
Calculate the Pythagoras of two images.
input1 | First input image |
input2 | Second input image |
cpl_image* clipm_priv_image_conv_sobel_x | ( | const cpl_image * | input, |
const cpl_size | window_xxyy[4] | ||
) |
Convolve image with horizontal Sobel operator.
input | Input image |
window_xxyy | Coordinate buffer of the form {xa, xb, ya, yb}, can be NULL, minimum/maximum order is irrelevant |
cpl_image* clipm_priv_image_conv_sobel_y | ( | const cpl_image * | input, |
const cpl_size | window_xxyy[4] | ||
) |
Convolve image with vertical Sobel operator.
input | Input image |
window_xxyy | Coordinate buffer of the form {xa, xb, ya, yb}, can be NULL, minimum/maximum order is irrelevant |