BRL-CAD
Loading...
Searching...
No Matches
filters.h
Go to the documentation of this file.
1/* F I L T E R S . H
2 * BRL-CAD
3 *
4 * Copyright (c) 2011-2026 United States Government as represented by
5 * the U.S. Army Research Laboratory.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * version 2.1 as published by the Free Software Foundation.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this file; see the file named COPYING for more
18 * information.
19 */
20/** @addtogroup icv_filters
21 *
22 * @brief
23 * Routines for image filtering.
24 *
25 * This is done mainly using the convolution of images. Both Gray Scale and RGB
26 * images are taken care of.
27 *
28 */
29
30#ifndef ICV_FILTERS_H
31#define ICV_FILTERS_H
32
33#include "common.h"
34#include "icv/defines.h"
35
37
38/** @{ */
39/** @file icv/filters.h */
40
50
58
59/**
60 * Filters an image with the specified filter type. Basically
61 * convolves kernel with the image. Border samples are handled by
62 * clamping to the nearest valid edge pixel, which keeps normalized
63 * kernels normalized at image edges and on images smaller than the
64 * kernel. ICV_FILTER_NULL is a pass-through.
65 *
66 * @param img Image to be filtered.
67 * @param filter_type Type of filter to be used.
68 *
69 */
71
72
73/**
74 * Filters a set of three images with the specified filter type. Border
75 * samples are handled by clamping to the nearest valid edge pixel in each
76 * frame. Finds the resultant pixel with the help of neighboring pixels in
77 * all three images. ICV_FILTER3_NULL returns a copy of the current frame.
78 *
79 *
80 * @return Resultant image.
81 *
82 */
86 ICV_FILTER3 filter_type);
87
88/**
89 * @brief
90 * Fades an image in place.
91 *
92 * icv_fade will darken a pix by a certain fraction.
93 *
94 * @param img ICV Image to be faded.
95 * @param fraction should be between 0 to 1. Amount by which the image
96 * is needed to faded.
97 */
99
100/** @} */
101
103
104#endif /* ICV_FILTERS_H */
105
106/*
107 * Local Variables:
108 * tab-width: 8
109 * mode: C
110 * indent-tabs-mode: t
111 * c-file-style: "stroustrup"
112 * End:
113 * ex: shiftwidth=4 tabstop=8
114 */
Definition dvec.h:74
Header file for the BRL-CAD common definitions.
int icv_fade(icv_image_t *img, double fraction)
Fades an image in place.
ICV_FILTER
Definition filters.h:41
int icv_filter(icv_image_t *img, ICV_FILTER filter_type)
ICV_FILTER3
Definition filters.h:51
icv_image_t * icv_filter3(icv_image_t *old_img, icv_image_t *curr_img, icv_image_t *new_img, ICV_FILTER3 filter_type)
@ ICV_FILTER_BOXCAR_AVERAGE
Definition filters.h:48
@ ICV_FILTER_HORIZONTAL_GRAD
Definition filters.h:44
@ ICV_FILTER_LOW_PASS
Definition filters.h:42
@ ICV_FILTER_NULL
Definition filters.h:47
@ ICV_FILTER_VERTICAL_GRAD
Definition filters.h:45
@ ICV_FILTER_LAPLACIAN
Definition filters.h:43
@ ICV_FILTER_HIGH_PASS
Definition filters.h:46
@ ICV_FILTER3_ANIMATION_SMEAR
Definition filters.h:55
@ ICV_FILTER3_NULL
Definition filters.h:56
@ ICV_FILTER3_LOW_PASS
Definition filters.h:52
@ ICV_FILTER3_HIGH_PASS
Definition filters.h:53
@ ICV_FILTER3_BOXCAR_AVERAGE
Definition filters.h:54