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

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -