JeVoisBase  1.3
JeVois Smart Embedded Machine Vision Toolkit Base Modules
Share this page:
env_image_ops.c File Reference
Include dependency graph for env_image_ops.c:

Go to the source code of this file.

Functions

void env_dec_xy (const struct env_image *src, struct env_image *result)
 Decimate in X and Y (take one every 'factor' pixels). More...
 
void env_dec_x (const struct env_image *src, struct env_image *result)
 Decimate in X (take one every 'factor' pixels). More...
 
void env_dec_y (const struct env_image *src, struct env_image *result)
 Decimate in Y (take one every 'factor' pixels). More...
 
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 *source, const struct env_math *imath, struct env_image *result)
 
void env_lowpass_9_y (const struct env_image *source, 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 *out)
 
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. More...
 
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, const intg32 mi, const intg32 ma, const enum env_maxnorm_type normtyp, const intg32 rangeThresh)
 
void env_max_normalize_none_inplace (struct env_image *src, const intg32 nmi, const intg32 nma, const intg32 rangeThresh)
 
void env_max_normalize_std_inplace (struct env_image *src, const intg32 nmi, const intg32 nma, 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. More...
 
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. More...
 
void env_rescale_range_inplace (struct env_image *src, const intg32 mi, const intg32 ma)
 rescale the src image to a [0..255] result More...
 
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. More...
 
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. More...
 
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)
 

Function Documentation

void env_attenuate_borders_inplace ( struct env_image a,
env_size_t  size 
)
void env_center_surround ( const struct env_image center,
const struct env_image surround,
const int  absol,
struct env_image result 
)
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().

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().

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().

void env_downsize_9_inplace ( struct env_image src,
const env_size_t  depth,
const struct env_math imath 
)
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().

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.

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 ( const struct env_image src,
const struct env_math imath,
struct env_image result 
)
void env_lowpass_9_x ( const struct env_image source,
const struct env_math imath,
struct env_image result 
)
void env_lowpass_9_y ( const struct env_image source,
const struct env_math imath,
struct env_image result 
)
void env_max_normalize_inplace ( struct env_image src,
const intg32  mi,
const intg32  ma,
const enum env_maxnorm_type  normtyp,
const intg32  rangeThresh 
)
void env_max_normalize_none_inplace ( struct env_image src,
const intg32  nmi,
const intg32  nma,
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().

void env_max_normalize_std_inplace ( struct env_image src,
const intg32  nmi,
const intg32  nma,
const intg32  rangeThresh 
)
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.

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_lowpass_5 ( 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 out 
)
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_image::dims, ENV_ABS, and ENV_ASSERT.

Referenced by env_steerable_filter().

void env_rescale ( const struct env_image src,
struct env_image result 
)
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.

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, env_dims::h, and env_dims::w.

Referenced by 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 
)
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 
)