Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create white Image using javacv

I want to create a white image having the dimensions of another IplImage. I know the function to create a black image .
this is the code :

       IplImage whiteImg = IplImage.create(sourceImage.width(),
            sourceImage.height(), IPL_DEPTH_8U, 1);
       cvSetZero(whiteImg);

I want to create from the sourceImage white image in the same dimensions;

Any help?

Thanks.

like image 906
0_0 Avatar asked Jul 12 '26 08:07

0_0


1 Answers

Just try the code

     cvSetZero(whiteImg);
     cvNot(whiteImg,whiteImg);
like image 171
Haris Avatar answered Jul 14 '26 05:07

Haris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!