Working with ofxCv images
The main object of computer vision is the image. So before diving into image processing and analysis, we should learn how to work with OpenCV-related images freely. We will consider images of classes ofxCvColorImage
, ofxCvGrayscaleImage
, ofxCvFloatImage
, and ofxCvShortImage
. These class names have the prefix ofxCv
, so we will call them ofxCv images. To be precise, we will assume that we have these image objects:
ofxCvColorImage image, image2; //Color images ofxCvGrayscaleImage grayImage, grayImage2; //Grayscale images ofxCvFloatImage floatImage; //Float-type image ofxCvShortImage shortImage; //Image with "unsigned short" pixels
It is convenient to group functions and operations into several groups.
Image initializing
You always need to initialize an image before using it for the first time. Let us look at a few functions used to initialize images:
The
allocate( w, h )
function initializes the image with widthw
and heighth
pixels...