Home > C++, ImageProcessing, OpenCv > OpenCv IplImage how to clear or initialize the image to scalar

OpenCv IplImage how to clear or initialize the image to scalar

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.

  1. No comments yet.
  1. No trackbacks yet.