Posts Tagged ‘initialize’

OpenCv IplImage how to clear or initialize the image to scalar

November 17, 2008 6 comments

just use the cvSet

e.g if img is the IplImage object pointer with 3 channels.

cvSet(img, cvScalar(0,0,0));

will set each and every pixel to zero.

Becarefull with theĀ  channels and cvScalar used.