Bsoft function
img_RGB2gray
Source:
src/img/img_colour.c
Description:
Converts an image from RGB (red-green-blue) to gray scale.
Algorithm:
The key variable that is changed is the number channels, going from
three for RGB images to one for gray scale.
The new gray scale value is just the average of the three RGB values.
Arguments:
| Bimage* p | image (replaced by new image).
|
Returns:
int error code.
Prototype:
int img_RGB2gray(Bimage* p)
Functions used:
balloc
bfree
gettypesize
Other objects included:
struct Bimage
Generated by bdoc.pl on Mon Jun 15 11:47:25 2009
Back to the Bsoft home