Creating a simple black image with opencv using cvcreateimage -


very basic question coming newbie in opencv. want create image every pixel set 0 (black). have used following code in main() function:

iplimage* imgscribble = cvcreateimage(cvsize(320, 240), 8, 3); 

and solid gray image, instead of black one.

thanks in advance !

what version of opencv using? mat,

mat image(320, 240, cv_8uc3, scalar(0,0,0)); 

Comments