BRL-CAD

Routines for image filtering. More...

Collaboration diagram for Image Filters:

Files

file  filters.h
 

Enumerations

enum  ICV_FILTER {
  ICV_FILTER_LOW_PASS , ICV_FILTER_LAPLACIAN , ICV_FILTER_HORIZONTAL_GRAD , ICV_FILTER_VERTICAL_GRAD ,
  ICV_FILTER_HIGH_PASS , ICV_FILTER_NULL , ICV_FILTER_BOXCAR_AVERAGE
}
 
enum  ICV_FILTER3 {
  ICV_FILTER3_LOW_PASS , ICV_FILTER3_HIGH_PASS , ICV_FILTER3_BOXCAR_AVERAGE , ICV_FILTER3_ANIMATION_SMEAR ,
  ICV_FILTER3_NULL
}
 

Functions

int icv_filter (icv_image_t *img, ICV_FILTER filter_type)
 
icv_image_ticv_filter3 (icv_image_t *old_img, icv_image_t *curr_img, icv_image_t *new_img, ICV_FILTER3 filter_type)
 
int icv_fade (icv_image_t *img, double fraction)
 Fades an image in place. More...
 

Detailed Description

Routines for image filtering.

This is done mainly using the convolution of images. Both Gray Scale and RGB images are taken care of.

Enumeration Type Documentation

◆ ICV_FILTER

enum ICV_FILTER
Enumerator
ICV_FILTER_LOW_PASS 
ICV_FILTER_LAPLACIAN 
ICV_FILTER_HORIZONTAL_GRAD 
ICV_FILTER_VERTICAL_GRAD 
ICV_FILTER_HIGH_PASS 
ICV_FILTER_NULL 
ICV_FILTER_BOXCAR_AVERAGE 

Definition at line 41 of file filters.h.

◆ ICV_FILTER3

Enumerator
ICV_FILTER3_LOW_PASS 
ICV_FILTER3_HIGH_PASS 
ICV_FILTER3_BOXCAR_AVERAGE 
ICV_FILTER3_ANIMATION_SMEAR 
ICV_FILTER3_NULL 

Definition at line 51 of file filters.h.

Function Documentation

◆ icv_filter()

int icv_filter ( icv_image_t img,
ICV_FILTER  filter_type 
)

Filters an image with the specified filter type. Basically convolves kernel with the image. Does zero_padding for outbound pixels.

Parameters
imgImage to be filtered.
filter_typeType of filter to be used.

◆ icv_filter3()

icv_image_t * icv_filter3 ( icv_image_t old_img,
icv_image_t curr_img,
icv_image_t new_img,
ICV_FILTER3  filter_type 
)

Filters a set of three image with the specified filter type. Does zero_padding for outbound pixels. Finds the resultant pixel with the help of neighboring pixels in all the three images.

Returns
Resultant image.

◆ icv_fade()

int icv_fade ( icv_image_t img,
double  fraction 
)

Fades an image in place.

icv_fade will darken a pix by a certain fraction.

Parameters
imgICV Image to be faded.
fractionshould be between 0 to 1. Amount by which the image is needed to faded.