CR2RE Pipeline Reference Manual 1.6.2
hdrl_prototyping.h
1/*
2 * This file is part of the HDRL
3 * Copyright (C) 2014 European Southern Observatory
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef HDRL_PROTOTYPING_H
21#define HDRL_PROTOTYPING_H
22
23#include <cpl.h>
24
25cpl_image * hdrl_get_spatial_freq(cpl_image *ima, double gausfilt, int mirrorx,
26 int mirrory);
27
28cpl_image * hdrl_mime_image_polynomial_bkg(cpl_image * image,
29 int dim_X, int dim_Y,
30 cpl_matrix ** coeffs);
31
32
34 const cpl_imagelist * images,
35 cpl_imagelist * bkg_images,
36 int dim_X,
37 int dim_Y,
38 cpl_matrix ** coeffs
39 );
40cpl_matrix *hdrl_mime_legendre_tensors_create(int nx, int ny, int npx, int npy);
41
42cpl_matrix *hdrl_mime_matrix_linspace_create(int n, double a, double b);
43
44cpl_matrix *hdrl_mime_legendre_polynomials_create(int npoly, double a, double b,
45 const cpl_matrix * x);
46
48 cpl_matrix * mat1, const cpl_matrix * mat2);
49
50cpl_error_code hdrl_mime_matrix_copy_column(const cpl_matrix * mat1, int j_1,
51 cpl_matrix * mat2, int j_2);
52
53cpl_matrix *hdrl_mime_linalg_tensor_products_columns_create(const cpl_matrix *
54 mat1, const cpl_matrix * mat2);
55cpl_matrix *hdrl_mime_tensor_weights_create(int nx, int ny);
56
57cpl_error_code hdrl_mime_matrix_rescale_rows(const cpl_matrix * mat,
58 const cpl_matrix * d, cpl_matrix * dmat);
59
60cpl_error_code hdrl_mime_matrix_mask_rows(cpl_matrix * mat, const cpl_mask * mask);
61
62cpl_matrix *hdrl_mime_linalg_solve_tikhonov(const cpl_matrix * mat,
63 const cpl_matrix * rhs, double alpha);
64
65cpl_matrix *hdrl_mime_linalg_normal_equations_create(const cpl_matrix * mat,
66 double alpha);
67cpl_matrix *hdrl_mime_matrix_product_left_transpose_create(const cpl_matrix *
68 mat1, const cpl_matrix * mat2);
69
70cpl_error_code hdrl_mime_matrix_product(const cpl_matrix * mat1,
71 const cpl_matrix * mat2, cpl_matrix * product);
72
73
74#endif /* HDRL_PROTOTYPING_H */
cpl_error_code hdrl_mime_compute_polynomial_bkg(const cpl_imagelist *images, cpl_imagelist *bkg_images, int dim_X, int dim_Y, cpl_matrix **coeffs)
Fit smooth background for a list of images.
cpl_matrix * hdrl_mime_legendre_tensors_create(int nx, int ny, int npx, int npy)
Create tensor products of Legendre polynomials.
cpl_error_code hdrl_mime_matrix_mask_rows(cpl_matrix *mat, const cpl_mask *mask)
Fill matrix rows with zeros as indicated by a mask.
cpl_matrix * hdrl_mime_linalg_solve_tikhonov(const cpl_matrix *mat, const cpl_matrix *rhs, double alpha)
Solve an overdetermined linear system in the least-squares sense.
cpl_error_code hdrl_mime_matrix_copy_column(const cpl_matrix *mat1, int j_1, cpl_matrix *mat2, int j_2)
Copy a column from one matrix to another matrix.
cpl_matrix * hdrl_mime_linalg_pairwise_column_tensor_products_create(const cpl_matrix *mat1, const cpl_matrix *mat2)
Create selected pairwise tensor products of the columns of two matrices.
cpl_matrix * hdrl_mime_matrix_product_left_transpose_create(const cpl_matrix *mat1, const cpl_matrix *mat2)
Create the product of the transpose of a matrix with another matrix.
cpl_error_code hdrl_mime_matrix_rescale_rows(const cpl_matrix *mat, const cpl_matrix *d, cpl_matrix *dmat)
Multiply the rows of a matrix by given factors.
cpl_matrix * hdrl_mime_tensor_weights_create(int nx, int ny)
Create tensor product weights.
cpl_matrix * hdrl_mime_legendre_polynomials_create(int npoly, double a, double b, const cpl_matrix *x)
Create the Legendre polynomial basis on the interval (a,b).
cpl_image * hdrl_get_spatial_freq(cpl_image *ima, double gausfilt, int mirrorx, int mirrory)
Get low spatial frequency componenets from an image using the FFTW.
cpl_matrix * hdrl_mime_matrix_linspace_create(int n, double a, double b)
Create equally spaced nodes.
cpl_matrix * hdrl_mime_linalg_normal_equations_create(const cpl_matrix *mat, double alpha)
Create the matrix transpose(A) * A + alpha for given A and alpha.
cpl_matrix * hdrl_mime_linalg_tensor_products_columns_create(const cpl_matrix *mat1, const cpl_matrix *mat2)
Create the tensor products of the columns of two matrices.
cpl_error_code hdrl_mime_matrix_product(const cpl_matrix *mat1, const cpl_matrix *mat2, cpl_matrix *product)
Fill a matrix with the product of two given matrices.