#include <cv.h>
Go to the source code of this file.
Functions |
static int | edge_pair (IplImage *im, int sum[], int _a[2], int _b[2], int _c[2], int _d[2]) |
int | stat_triangle (IplImage *im, int pts[3][2], float avg[3]) |
Function Documentation
static int edge_pair |
( |
IplImage * |
im, |
|
|
int |
sum[], |
|
|
int |
_a[2], |
|
|
int |
_b[2], |
|
|
int |
_c[2], |
|
|
int |
_d[2] |
|
) |
| |
|
static |
int stat_triangle |
( |
IplImage * |
im, |
|
|
int |
pts[3][2], |
|
|
float |
avg[3] |
|
) |
| |
Compute the average color over a triangle.
- Parameters
-
im | the input image. Must be 8 bits unsigned (IPL_DEPTH_8U). The color channels can be RGB, BGR or gray levels. |
pts | image plane coordinates of the 3 vertices. Clipping is handled correctly. |
avg | result average. avg[0] is either red or gray level. avg[1] and avg[2] are either green and blue or -1. If no pixel is read because the triangle is completely outside the image, the average values is set to -1. Otherwise, it is a value between 0 and 255. |
- Returns
- the function returns the number of pixels averaged.
Definition at line 114 of file tri.cpp.
References edge_pair(), and no_clipping.
Referenced by LightCollector::averageImage().
Variable Documentation
const bool no_clipping = false |
|
static |