How to fill OpenCV image with one solid color? -


how fill opencv image 1 solid color?

using opencv c api iplimage* img:

use cvset(): cvset(img, cv_rgb(redval,greenval,blueval));

using opencv c++ api cv::mat img, use either:

cv::mat::operator=(const scalar& s) in:

img = cv::scalar(redval,greenval,blueval); 

or the more general, mask supporting, cv::mat::setto():

img.setto(cv::scalar(redval,greenval,blueval)); 

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -