Now we begin to learn the methods of processing video. Values of pixels in the current video frame can be read in a way similar to the one in
ofImage, using access to its pixel array data:
unsigned char *getPixels()
Also, here is the
getPixelRef() method, which returns a reference to a pixel array of the current frame, represented by a special class
Note that the
ofImage class has
getPixelRef() too and can be used in a similar way.
It is easy to get the pixel color using
pixels.getColor( x, y ), which returns the
ofColor value of
pixel ( x,y ). Compared to directly working with pixels data using
getPixels(), it is a relatively slow operation, but is more simple and convenient. Note,
ofPixels has useful ...