Ask Your Question

cvZero fucntion for c++ api

asked 2014-01-13 02:06:50 -0500

sandwish gravatar image

I want to set all the pixel values of an image to zero. I know this can be done using cvZero function in the c api. But I am using the c++ api. Please suggest me an alternative. Thanks in advance.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2014-01-13 03:22:10 -0500

Vladislav Vinogradov gravatar image

Use setTo method:

edit flag offensive delete link more


Thanx a lot!

sandwish gravatar imagesandwish ( 2014-01-14 00:22:38 -0500 )edit

answered 2014-01-13 03:30:52 -0500

Mat zero=Mat::zeros(Size(100,100),CV_8UC1);

edit flag offensive delete link more

Question Tools


Asked: 2014-01-13 02:06:50 -0500

Seen: 4,940 times

Last updated: Jan 13 '14