CR2RE Pipeline Reference Manual 1.6.8
hdrl_image_math.h
1/* $Id: hdrl_image_math.h,v 1.6 2013-10-17 15:44:14 jtaylor Exp $
2 *
3 * This file is part of the HDRL
4 * Copyright (C) 2013 European Southern Observatory
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21/*
22 * $Author: jtaylor $
23 * $Date: 2013-10-17 15:44:14 $
24 * $Revision: 1.6 $
25 * $Name: not supported by cvs2svn $
26 */
27
28#ifndef HDRL_IMAGE_MATH_H
29#define HDRL_IMAGE_MATH_H
30#include "hdrl_image.h"
31#include "hdrl_types.h"
32#include "hdrl_mode.h"
33#include <cpl.h>
34
35CPL_BEGIN_DECLS
36
37hdrl_value hdrl_image_get_sqsum(const hdrl_image *self);
38hdrl_value hdrl_image_get_sum(const hdrl_image *self);
39double hdrl_image_get_stdev(const hdrl_image *self);
40hdrl_value hdrl_image_get_median(const hdrl_image *self);
41hdrl_value hdrl_image_get_mean(const hdrl_image *self);
42hdrl_value hdrl_image_get_weighted_mean(const hdrl_image *self);
43hdrl_value hdrl_image_get_sigclip_mean(const hdrl_image * self,
44 double kappa_low, double kappa_high,
45 int niter);
46hdrl_value hdrl_image_get_minmax_mean(const hdrl_image * self, double nlow,
47 double nhigh);
48hdrl_value hdrl_image_get_mode(const hdrl_image * self, double histo_min,
49 double histo_max, double bin_size,
50 hdrl_mode_type method, cpl_size error_niter);
51
52
53hdrl_image * hdrl_image_div_image_create(const hdrl_image *self, const hdrl_image *other);
54cpl_error_code hdrl_image_div_image( hdrl_image *self, const hdrl_image *other);
55cpl_error_code hdrl_image_div_scalar( hdrl_image *self, hdrl_value value);
56
57hdrl_image * hdrl_image_mul_image_create(const hdrl_image *self, const hdrl_image *other);
58cpl_error_code hdrl_image_mul_image( hdrl_image *self, const hdrl_image *other);
59cpl_error_code hdrl_image_mul_scalar( hdrl_image *self, hdrl_value value);
60
61hdrl_image * hdrl_image_sub_image_create(const hdrl_image *self, const hdrl_image *other);
62cpl_error_code hdrl_image_sub_image( hdrl_image *self, const hdrl_image *other);
63cpl_error_code hdrl_image_sub_scalar( hdrl_image *self, hdrl_value value);
64
65hdrl_image * hdrl_image_add_image_create(const hdrl_image *self, const hdrl_image *other);
66cpl_error_code hdrl_image_add_image( hdrl_image *self, const hdrl_image *other);
67cpl_error_code hdrl_image_add_scalar( hdrl_image *self, hdrl_value value);
68
69hdrl_image * hdrl_image_pow_scalar_create(const hdrl_image *self, const hdrl_value exponent);
70cpl_error_code hdrl_image_pow_scalar( hdrl_image *self, const hdrl_value exponent);
71
72hdrl_image * hdrl_image_exp_scalar_create(const hdrl_image *self, const hdrl_value base);
73cpl_error_code hdrl_image_exp_scalar( hdrl_image *self, const hdrl_value base);
74
75CPL_END_DECLS
76
77#endif
hdrl_image * hdrl_image_pow_scalar_create(const hdrl_image *self, const hdrl_value exponent)
computes the power of an image by a scalar creating a new image
cpl_error_code hdrl_image_sub_image(hdrl_image *self, const hdrl_image *other)
Subtract two images, store the result in the first image.
cpl_error_code hdrl_image_div_scalar(hdrl_image *self, hdrl_value value)
Elementwise division of an image with a scalar.
hdrl_value hdrl_image_get_median(const hdrl_image *self)
computes the median and associated error of an image.
CPL_BEGIN_DECLS hdrl_value hdrl_image_get_sqsum(const hdrl_image *self)
computes the sum of all pixel values and the error of a squared image.
hdrl_value hdrl_image_get_mode(const hdrl_image *self, double histo_min, double histo_max, double bin_size, hdrl_mode_type method, cpl_size error_niter)
computes the mode and the associated error of an image.
hdrl_image * hdrl_image_sub_image_create(const hdrl_image *self, const hdrl_image *other)
Subtract two images.
cpl_error_code hdrl_image_pow_scalar(hdrl_image *self, const hdrl_value exponent)
computes the power of an image by a scalar
cpl_error_code hdrl_image_add_image(hdrl_image *self, const hdrl_image *other)
Add two images, store the result in the first image.
cpl_error_code hdrl_image_div_image(hdrl_image *self, const hdrl_image *other)
Divide two images, store the result in the first image.
cpl_error_code hdrl_image_mul_scalar(hdrl_image *self, hdrl_value value)
Elementwise multiplication of an image with a scalar.
hdrl_value hdrl_image_get_minmax_mean(const hdrl_image *self, double nlow, double nhigh)
computes the minmax rejected mean and the associated error of an image.
hdrl_value hdrl_image_get_sigclip_mean(const hdrl_image *self, double kappa_low, double kappa_high, int niter)
computes the sigma-clipped mean and associated error of an image.
double hdrl_image_get_stdev(const hdrl_image *self)
computes the standard deviation of the data of an image
hdrl_image * hdrl_image_div_image_create(const hdrl_image *self, const hdrl_image *other)
Divide two images and return the resulting image.
cpl_error_code hdrl_image_add_scalar(hdrl_image *self, hdrl_value value)
Elementwise addition of a scalar to an image.
cpl_error_code hdrl_image_mul_image(hdrl_image *self, const hdrl_image *other)
Multiply two images, store the result in the first image.
hdrl_value hdrl_image_get_sum(const hdrl_image *self)
computes the sum of all pixel values and the associated error of an image.
cpl_error_code hdrl_image_exp_scalar(hdrl_image *self, const hdrl_value base)
computes the exponential of an image by a scalar
hdrl_value hdrl_image_get_mean(const hdrl_image *self)
computes mean pixel value and associated error of an image.
hdrl_value hdrl_image_get_weighted_mean(const hdrl_image *self)
computes the weighted mean and associated error of an image.
hdrl_image * hdrl_image_add_image_create(const hdrl_image *self, const hdrl_image *other)
Add two images.
hdrl_image * hdrl_image_mul_image_create(const hdrl_image *self, const hdrl_image *other)
Multiply two images.
hdrl_image * hdrl_image_exp_scalar_create(const hdrl_image *self, const hdrl_value base)
computes the exponential of an image by a scalar creating a new image
cpl_error_code hdrl_image_sub_scalar(hdrl_image *self, hdrl_value value)
Elementwise subtraction of a scalar from an image.