Question

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.

Was it helpful?

Solution

Just try the code

     cvSetZero(whiteImg);
     cvNot(whiteImg,whiteImg);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top