1 | initial version |
My first reaction would be to ask why you would use the old C-style interface? If there is no specific reason, then please use the C++ interface, using Mat objects, which has a way larger support for the moment.
As to your problem, use the following commands
IplImage* img;
cvSet(img, cvScalar(0,0,0));
2 | No.2 Revision |
My first reaction would be to ask why you would use the old C-style interface? If there is no specific reason, then please use the C++ interface, using Mat objects, which has a way larger support for the moment.
As to your problem, use the following commands
IplImage* img;
cvSet(img, cvScalar(0,0,0));
Which could be used for setting every possible value. However it can be done even more easily:
IplImage* img;
cvZero(img, cvScalar(0,0,0));
3 | No.3 Revision |
My first reaction would be to ask why you would use the old C-style interface? If there is no specific reason, then please use the C++ interface, using Mat objects, which has a way larger support for the moment.
As to your problem, use the following commands
IplImage* img;
cvSet(img, cvScalar(0,0,0));
Which could be used for setting every possible value. However it can be done even more easily:
IplImage* img;
cvZero(img, cvScalar(0,0,0));
cvZero(img);