JeVoisBase  1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Loading...
Searching...
No Matches
env_c_math_ops.h
Go to the documentation of this file.
1/*!@file env_c_math_ops.h Fixed-point integer math versions of some of our floating-point image functions */
2
3// //////////////////////////////////////////////////////////////////// //
4// The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2000-2005 //
5// by the University of Southern California (USC) and the iLab at USC. //
6// See http://iLab.usc.edu for information about this project. //
7// //////////////////////////////////////////////////////////////////// //
8// Major portions of the iLab Neuromorphic Vision Toolkit are protected //
9// under the U.S. patent ``Computation of Intrinsic Perceptual Saliency //
10// in Visual Environments, and Applications'' by Christof Koch and //
11// Laurent Itti, California Institute of Technology, 2001 (patent //
12// pending; application number 09/912,225 filed July 23, 2001; see //
13// http://pair.uspto.gov/cgi-bin/final/home.pl for current status). //
14// //////////////////////////////////////////////////////////////////// //
15// This file is part of the iLab Neuromorphic Vision C++ Toolkit. //
16// //
17// The iLab Neuromorphic Vision C++ Toolkit is free software; you can //
18// redistribute it and/or modify it under the terms of the GNU General //
19// Public License as published by the Free Software Foundation; either //
20// version 2 of the License, or (at your option) any later version. //
21// //
22// The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope //
23// that it will be useful, but WITHOUT ANY WARRANTY; without even the //
24// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR //
25// PURPOSE. See the GNU General Public License for more details. //
26// //
27// You should have received a copy of the GNU General Public License //
28// along with the iLab Neuromorphic Vision C++ Toolkit; if not, write //
29// to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, //
30// Boston, MA 02111-1307 USA. //
31// //////////////////////////////////////////////////////////////////// //
32//
33// Primary maintainer for this file: Rob Peters <rjpeters at usc dot edu>
34// $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Envision/env_c_math_ops.h $
35// $Id: env_c_math_ops.h 9830 2008-06-18 18:50:22Z lior $
36//
37
38#pragma once
39
41
42#ifdef __cplusplus
43extern "C"
44{
45#endif
46
48 const env_size_t w,
49 const env_size_t h,
50 intg32* dst,
51 const env_size_t w2);
52
54 const env_size_t w,
55 const env_size_t h,
56 intg32* dst,
57 const env_size_t h2);
58
59 /// Like env_c_lowpass_9_x_fewbits() but uses optimized filter coefficients
61 const env_size_t w,
62 const env_size_t h,
63 intg32* dst);
64
65 /// Like env_c_lowpass_9_y_fewbits() but uses optimized filter coefficients
67 const env_size_t w,
68 const env_size_t h,
69 intg32* dst);
70
71 //! Get min and max values
72 void env_c_get_min_max(const intg32* src, const env_size_t sz,
73 intg32* mini, intg32* maxi);
74
75 //! Saturate values < 0
76 void env_c_inplace_rectify(intg32* dst, const env_size_t sz);
77
78 void env_c_inplace_normalize(intg32* dst, const env_size_t sz,
79 const intg32 nmin, const intg32 nmax,
80 intg32* actualmin, intg32* actualmax,
81 intg32 rangeThresh);
82
83 /// get the luminance with nbits of precision of the input image
84 void env_c_luminance_from_byte(const struct env_rgb_pixel* const src,
85 const env_size_t sz,
86 const env_size_t nbits,
87 intg32* const dst);
88
89 /// result = a / val
90 void env_c_image_div_scalar(const intg32* const a,
91 const env_size_t sz,
92 intg32 val,
93 intg32* const dst);
94
95 /// result += a / val
96 void env_c_image_div_scalar_accum(const intg32* const a,
97 const env_size_t sz,
98 intg32 val,
99 intg32* const dst);
100
101 /// result = a - b
102 void env_c_image_minus_image(const intg32* const a,
103 const intg32* const b,
104 const env_size_t sz,
105 intg32* const dst);
106
107#ifdef __cplusplus
108}
109#endif
void env_c_lowpass_9_y_fewbits_optim(const intg32 *src, const env_size_t w, const env_size_t h, intg32 *dst)
Like env_c_lowpass_9_y_fewbits() but uses optimized filter coefficients.
void env_c_get_min_max(const intg32 *src, const env_size_t sz, intg32 *mini, intg32 *maxi)
Get min and max values.
void env_c_lowpass_9_x_fewbits_optim(const intg32 *src, const env_size_t w, const env_size_t h, intg32 *dst)
Like env_c_lowpass_9_x_fewbits() but uses optimized filter coefficients.
void env_c_luminance_from_byte(const struct env_rgb_pixel *const src, const env_size_t sz, const env_size_t nbits, intg32 *const dst)
get the luminance with nbits of precision of the input image
void env_c_inplace_normalize(intg32 *dst, const env_size_t sz, const intg32 nmin, const intg32 nmax, intg32 *actualmin, intg32 *actualmax, intg32 rangeThresh)
void env_c_lowpass_5_x_dec_x_fewbits_optim(const intg32 *src, const env_size_t w, const env_size_t h, intg32 *dst, const env_size_t w2)
void env_c_inplace_rectify(intg32 *dst, const env_size_t sz)
Saturate values < 0.
void env_c_lowpass_5_y_dec_y_fewbits_optim(const intg32 *src, const env_size_t w, const env_size_t h, intg32 *dst, const env_size_t h2)
void env_c_image_div_scalar_accum(const intg32 *const a, const env_size_t sz, intg32 val, intg32 *const dst)
result += a / val
void env_c_image_div_scalar(const intg32 *const a, const env_size_t sz, intg32 val, intg32 *const dst)
result = a / val
void env_c_image_minus_image(const intg32 *const a, const intg32 *const b, const env_size_t sz, intg32 *const dst)
result = a - b
ENV_INTG32_TYPE intg32
32-bit signed integer
Definition env_types.h:52
unsigned long env_size_t
Definition env_types.h:71
RGB pixel class.
Definition env_types.h:75