JeVoisBase  1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
Loading...
Searching...
No Matches
env_image_ops.h File Reference
Include dependency graph for env_image_ops.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define INTMAXNORMMIN   ((intg32) 0)
 
#define INTMAXNORMMAX   ((intg32) 32768)
 

Functions

void env_dec_xy (const struct env_image *src, struct env_image *result)
 Decimate in X and Y (take one every 'factor' pixels).
 
void env_dec_x (const struct env_image *src, struct env_image *result)
 Decimate in X (take one every 'factor' pixels).
 
void env_dec_y (const struct env_image *src, struct env_image *result)
 Decimate in Y (take one every 'factor' pixels).
 
void env_lowpass_5_x_dec_x (const struct env_image *src, const struct env_math *imath, struct env_image *result)
 
void env_lowpass_5_y_dec_y (const struct env_image *src, const struct env_math *imath, struct env_image *result)
 
void env_lowpass_9_x (const struct env_image *src, const struct env_math *imath, struct env_image *result)
 
void env_lowpass_9_y (const struct env_image *src, const struct env_math *imath, struct env_image *result)
 
void env_lowpass_9 (const struct env_image *src, const struct env_math *imath, struct env_image *result)
 
void env_quad_energy (const struct env_image *img1, const struct env_image *img2, struct env_image *result)
 
void env_steerable_filter (const struct env_image *src, const intg32 kxnumer, const intg32 kynumer, const env_size_t kdenombits, const struct env_math *imath, struct env_image *result)
 
void env_attenuate_borders_inplace (struct env_image *a, env_size_t size)
 
void env_pyr_build_hipass_9 (const struct env_image *image, env_size_t firstlevel, const struct env_math *imath, struct env_pyr *result)
 
void env_pyr_build_steerable_from_hipass_9 (const struct env_pyr *hipass, const intg32 kxnumer, const intg32 kynumer, const env_size_t kdenombits, const struct env_math *imath, struct env_pyr *result)
 
void env_pyr_build_lowpass_5 (const struct env_image *image, env_size_t firstlevel, const struct env_math *imath, struct env_pyr *result)
 Wrapper for _cpu or _cuda version.
 
void env_pyr_build_lowpass_5_cpu (const struct env_image *image, env_size_t firstlevel, const struct env_math *imath, struct env_pyr *result)
 _cpu version implemented here, see CUDA/env_cuda.h for GPU version
 
void env_downsize_9_inplace (struct env_image *src, const env_size_t depth, const struct env_math *imath)
 
void env_rescale (const struct env_image *src, struct env_image *result)
 
void env_max_normalize_inplace (struct env_image *src, intg32 min, intg32 max, enum env_maxnorm_type typ, const intg32 rangeThresh)
 
void env_max_normalize_none_inplace (struct env_image *src, intg32 min, intg32 max, const intg32 rangeThresh)
 
void env_max_normalize_std_inplace (struct env_image *src, intg32 min, intg32 max, const intg32 rangeThresh)
 
void env_center_surround (const struct env_image *center, const struct env_image *surround, const int absol, struct env_image *result)
 
void env_get_rgby (const struct env_rgb_pixel *const src, const env_size_t sz, struct env_image *rg, struct env_image *by, const intg32 thresh, const env_size_t inputbits)
 Compute R-G and B-Y opponent color maps.
 
void env_merge_range (const struct env_image *src, intg32 *mi, intg32 *ma)
 Update the range [mi,ma] to include the range of values in src.
 
void env_rescale_range_inplace (struct env_image *src, const intg32 mi, const intg32 ma)
 rescale the src image to a [0..255] result
 
void env_grid_average (const struct env_image *src, unsigned char *dest, unsigned int bitshift, env_size_t nx, env_size_t ny)
 Compute average values in each tile of a grid.
 
void env_shift_clean (const struct env_image *srcImg, const env_ssize_t dx, const env_ssize_t dy, struct env_image *result)
 Shift an image by (dx, dy), without wraparound.
 
void env_shift_image (const struct env_image *srcImg, const env_ssize_t dxnumer, const env_ssize_t dynumer, const env_size_t denombits, struct env_image *result)
 

Detailed Description

Fixed-point integer math versions of some of our floating-point image functions

Definition in file env_image_ops.h.

Macro Definition Documentation

◆ INTMAXNORMMAX

#define INTMAXNORMMAX   ((intg32) 32768)

Definition at line 48 of file env_image_ops.h.

◆ INTMAXNORMMIN

#define INTMAXNORMMIN   ((intg32) 0)

Definition at line 47 of file env_image_ops.h.

Function Documentation

◆ env_attenuate_borders_inplace()

void env_attenuate_borders_inplace ( struct env_image a,
env_size_t  size 
)

◆ env_center_surround()

void env_center_surround ( const struct env_image center,
const struct env_image surround,
const int  absol,
struct env_image result 
)

◆ env_dec_x()

void env_dec_x ( const struct env_image src,
struct env_image result 
)

Decimate in X (take one every 'factor' pixels).

Definition at line 86 of file env_image_ops.c.

References env_image::dims, ENV_ASSERT, env_img_copy_src_dst(), env_img_resize_dims(), env_dims::h, and env_dims::w.

Referenced by env_dec_xy(), and env_downsize_9_inplace().

◆ env_dec_xy()

void env_dec_xy ( const struct env_image src,
struct env_image result 
)

Decimate in X and Y (take one every 'factor' pixels).

Definition at line 45 of file env_image_ops.c.

References env_image::dims, env_dec_x(), env_dec_y(), env_img_copy_src_dst(), env_img_resize_dims(), env_dims::h, and env_dims::w.

Referenced by env_pyr_build_hipass_9().

◆ env_dec_y()

void env_dec_y ( const struct env_image src,
struct env_image result 
)

Decimate in Y (take one every 'factor' pixels).

Definition at line 115 of file env_image_ops.c.

References env_image::dims, ENV_ASSERT, env_img_copy_src_dst(), env_img_resize_dims(), env_dims::h, and env_dims::w.

Referenced by env_dec_xy(), and env_downsize_9_inplace().

◆ env_downsize_9_inplace()

void env_downsize_9_inplace ( struct env_image src,
const env_size_t  depth,
const struct env_math imath 
)

◆ env_get_rgby()

void env_get_rgby ( const struct env_rgb_pixel *const  src,
const env_size_t  sz,
struct env_image rg,
struct env_image by,
const intg32  thresh,
const env_size_t  inputbits 
)

Compute R-G and B-Y opponent color maps.

Definition at line 819 of file env_image_ops.c.

References ENV_ABS, and ENV_ASSERT.

Referenced by env_chan_color().

◆ env_grid_average()

void env_grid_average ( const struct env_image src,
unsigned char *  dest,
unsigned int  bitshift,
env_size_t  nx,
env_size_t  ny 
)

Compute average values in each tile of a grid.

dest should have enough memory allocated to contain one byte per grid tile. bitshift is a rightward bit shift that will be applied to the average intg32 value to convert it to byte. If image width or height is not an exact multiple of nx or ny, tile size will be rounded down and some pixels may be skipped between tiles, but tile locations will remain as accurate as possible. Note that here we assume positive values and clamp if negative, this is because the default saliency channels take the absolute value when computing center-surround.

Definition at line 931 of file env_image_ops.c.

References env_image::dims, ENV_ASSERT, env_dims::h, and env_dims::w.

◆ env_lowpass_5_x_dec_x()

void env_lowpass_5_x_dec_x ( const struct env_image src,
const struct env_math imath,
struct env_image result 
)

◆ env_lowpass_5_y_dec_y()

void env_lowpass_5_y_dec_y ( const struct env_image src,
const struct env_math imath,
struct env_image result 
)

◆ env_lowpass_9()

void env_lowpass_9 ( const struct env_image src,
const struct env_math imath,
struct env_image result 
)

◆ env_lowpass_9_x()

void env_lowpass_9_x ( const struct env_image src,
const struct env_math imath,
struct env_image result 
)

◆ env_lowpass_9_y()

void env_lowpass_9_y ( const struct env_image src,
const struct env_math imath,
struct env_image result 
)

◆ env_max_normalize_inplace()

◆ env_max_normalize_none_inplace()

void env_max_normalize_none_inplace ( struct env_image src,
intg32  min,
intg32  max,
const intg32  rangeThresh 
)

Definition at line 672 of file env_image_ops.c.

References env_c_inplace_normalize(), and env_c_inplace_rectify().

Referenced by env_max_normalize_inplace().

◆ env_max_normalize_std_inplace()

void env_max_normalize_std_inplace ( struct env_image src,
intg32  min,
intg32  max,
const intg32  rangeThresh 
)

◆ env_merge_range()

void env_merge_range ( const struct env_image src,
intg32 mi,
intg32 ma 
)

Update the range [mi,ma] to include the range of values in src.

Definition at line 883 of file env_image_ops.c.

◆ env_pyr_build_hipass_9()

void env_pyr_build_hipass_9 ( const struct env_image image,
env_size_t  firstlevel,
const struct env_math imath,
struct env_pyr result 
)

◆ env_pyr_build_lowpass_5()

void env_pyr_build_lowpass_5 ( const struct env_image image,
env_size_t  firstlevel,
const struct env_math imath,
struct env_pyr result 
)

◆ env_pyr_build_lowpass_5_cpu()

void env_pyr_build_lowpass_5_cpu ( const struct env_image image,
env_size_t  firstlevel,
const struct env_math imath,
struct env_pyr result 
)

_cpu version implemented here, see CUDA/env_cuda.h for GPU version

◆ env_pyr_build_steerable_from_hipass_9()

void env_pyr_build_steerable_from_hipass_9 ( const struct env_pyr hipass,
const intg32  kxnumer,
const intg32  kynumer,
const env_size_t  kdenombits,
const struct env_math imath,
struct env_pyr result 
)

◆ env_quad_energy()

void env_quad_energy ( const struct env_image img1,
const struct env_image img2,
struct env_image result 
)

Definition at line 320 of file env_image_ops.c.

References ENV_ABS, and ENV_ASSERT.

Referenced by env_steerable_filter().

◆ env_rescale()

void env_rescale ( const struct env_image src,
struct env_image result 
)

◆ env_rescale_range_inplace()

void env_rescale_range_inplace ( struct env_image src,
const intg32  mi,
const intg32  ma 
)

rescale the src image to a [0..255] result

Definition at line 903 of file env_image_ops.c.

References ENV_ASSERT, and INTG32_MAX.

◆ env_shift_clean()

void env_shift_clean ( const struct env_image srcImg,
const env_ssize_t  dx,
const env_ssize_t  dy,
struct env_image result 
)

Shift an image by (dx, dy), without wraparound.

Definition at line 969 of file env_image_ops.c.

References env_image::dims, ENV_ABS, ENV_ASSERT, env_img_make_empty(), ENV_MAX, ENV_MIN, h, env_dims::h, and env_dims::w.

Referenced by env_shift_image().

◆ env_shift_image()

void env_shift_image ( const struct env_image srcImg,
const env_ssize_t  dxnumer,
const env_ssize_t  dynumer,
const env_size_t  denombits,
struct env_image result 
)

◆ env_steerable_filter()

void env_steerable_filter ( const struct env_image src,
const intg32  kxnumer,
const intg32  kynumer,
const env_size_t  kdenombits,
const struct env_math imath,
struct env_image result 
)