|
bazar
1.3.1
|

Go to the source code of this file.
Classes | |
| struct | Hdr |
Functions | |
| int | stat_triangle (IplImage *im, int pts[3][2], float avg[3]) |
| int stat_triangle | ( | IplImage * | im, |
| int | pts[3][2], | ||
| float | avg[3] | ||
| ) |
Compute the average color over a triangle.
| 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. |
Definition at line 114 of file tri.cpp.
References edge_pair(), and no_clipping.
Referenced by LightCollector::averageImage().
1.8.1.2