ofxCvGrayscaleImage
This represents an OpenCV friendly image in grayscale, i.e. without any color data. This is useful because many of the image processing and analysis routines in OpenCV (or OF for that matter) don't require color information. Less information to sort through means faster image analysis and faster applications. You can convert an ofxCvColorImage to an ofxCvGrayscaleImage using the = operator like so:
grayscaleImg = colorImg;
A common routine that you'll see is something like the following:
colorImg.setFromPixels(vidGrabber.getPixels());
grayImage = colorImg; // convert our color image to a grayscale image
The ofxCvGrayscaleImage can then be passed to a ofxCvContourFinder instance for contour and blob detection.
contourFinder.findContours(grayscaleImage, 5, (340*240)/4, 4, false, true);
absDiff( ... )
void absDiff(ofxCvGrayscaleImage &mom)Makes a diff of the current image and the mom image. This alters the pixels of the ofxCvGrayscaleImage instance.
current.absDiff(incoming);
The below image shows how the diff process operates:

absDiff( ... )
void absDiff(ofxCvGrayscaleImage &mom, ofxCvGrayscaleImage &dad)Sets the pixels of the images ofxCvGrayscaleImage instance to a diff of the &mom and &dad instance.

adaptiveThreshold( ... )
void adaptiveThreshold(int blockSize, int offset=0, bool invert=false, bool gauss=false)Increases the contrast of the image by blocks, the larger the block, the larger the area that is thresholded at one time. Invert flips the values of the image, making black into white and vice versa. gauss determines whether the image is to be thresholded usinga Gaussian method or simply a plain thresholding. Below you can see the result of using adaptive threshold with two different values.
left.adaptiveThreshold(20);
right.adaptiveThreshold(50);

allocatePixels( ... )
void allocatePixels(int w, int h)allocateTexture( )
void allocateTexture()blurHeavily( )
void blurHeavily()Blurs the image using a pre-determine blur amount.
brightnessContrast( ... )
void brightnessContrast(float brightness, float contrast)Sets the brightness and contrast of an image.
contrastStretch( )
void contrastStretch()This increases the contrast of the image remapping the brightest points in the image to white and the darkest points in the image to black. Generally on a ofxCvGrayscaleImage it isn't particularly noticeable, though it can have a large effect mathematically.
convertToRange( ... )
void convertToRange(float min, float max)Maps the pixels of an image to the min and max range passed in.
colors.setFromPixels(grabber.getPixels());
first = colors; // will leave unaltered
second = colors; // change it
second.convertToRange(100, 140); // super low contrast

dilate_3x3( )
void dilate_3x3()erode_3x3( )
void erode_3x3()init( )
void init()ofxCvGrayscaleImage( )
ofxCvGrayscaleImage()Constructor.
ofxCvGrayscaleImage( ... )
ofxCvGrayscaleImage(const ofxCvGrayscaleImage &mom)Copy constructor, allows you copy one ofxCvGrayscaleImage into another.
operator=( ... )
void operator=(const ofPixels &_pixels)Copies a IplImage into a ofxCvGrayscaleImage using the = symbol.
grayImage = iplImage; // make sure that the dimensions and ROI match
operator=( ... )
void operator=(const ofxCvGrayscaleImage &mom)Copies one ofxCvGrayscaleImage to another ofxCvGrayscaleImage using the = symbol.
imageOne = imageTwo; // make sure that the dimensions and ROI match
operator=( ... )
void operator=(const ofxCvColorImage &mom)Copies a ofxCvColorImage into a ofxCvGrayscaleImage using the = symbol.
grayImage = colorImage; // make sure that the dimensions and ROI match
operator=( ... )
void operator=(const ofxCvFloatImage &mom)Copies a ofxCvFloatImage into a ofxCvGrayscaleImage using the = symbol.
grayImage = floatColorImage; // make sure that the dimensions and ROI match
operator=( ... )
void operator=(const ofxCvShortImage &mom)Copies a ofxCvShortImage into a ofxCvGrayscaleImage using the = symbol.
grayImage = shortColorImage; // make sure that the dimensions and ROI match
operator=( ... )
void operator=(const int *mom)resize( ... )
void resize(int w, int h)Resizes the image to the w, h passed in.
scaleIntoMe( ... )
void scaleIntoMe(ofxCvImage &mom, int interpolationMethod)Scales the image passed in to be the size of the current image,
ofxCvImage first;
first.allocate(640, 480);
ofxCvImage second;
second.allocate(320, 240);
second.scaleIntoMe(first); // first is now 320,240
set( ... )
void set(float value)Set all the pixels in the image to the float value passed in. This is useful for blanking or filling an image quickly. the values are 1.0 to 255.0.
setFromColorImage( ... )
void setFromColorImage(ofxCvColorImage &mom)Sets the grayscale image from an ofxCvColorImage.
setFromFloatImage( ... )
void setFromFloatImage(ofxCvFloatImage &mom)Sets the grayscale image from an ofxCvFloatImage.
setFromPixels( ... )
void setFromPixels(const unsigned char *_pixels, int w, int h)Set all the pixels in a ofxCvGrayscaleImage from a pointer to an array of unsigned char values, using the w and h parameters to determine the dimensions of the image. The array is assumed to contain grayscale values.
setRoiFromPixels( ... )
void setRoiFromPixels(const unsigned char *_pixels, int w, int h)This allows you to set the ROI on the image from an ofPixels instance. Region of Interest is a rectangular area in an image, to segment object for further processing. Once the ROI is defined, OpenCV functions will operate on the ROI, reducing the number of pixels that the operation will examine.
threshold( ... )
void threshold(int value, bool invert=false)Increases the contrast of the image. The value is the threshold level applied to the image, for instance:
altered.threshold(30); // super high contrast

~ofxCvGrayscaleImage( )
~ofxCvGrayscaleImage()Destructor.