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
Post a Comment