嗨,我想繪製一個攝像頭飼料一些透明的形狀。打開CV addWeighted錯誤
我遇到錯誤輸入參數的大小不匹配。我檢查我的代碼並且無法識別故障
double alpha = 0.8;
Mat polarize(480, 640, CV_8UC4);
Size s = webcam.size();
double rows = s.height;
double cols = s.width;
std::cout << "Webcam R " << rows << " C " << cols << std::endl;
s = shape.size();
rows = s.height;
cols = s.width;
std::cout << "Shape R " << rows << " C " << cols << std::endl;
addWeighted(shape, alpha, webcam, 1.0 - alpha, 0.0, polarize); // Error Here
我已檢查Mat形狀和Mat網絡攝像頭是同一行和列。有什麼我錯過了嗎?
Mat polarize(webcam.size(),webcam.type()); // not CV_8UC4 – berak 2014-10-01 08:28:31
@berak嗨,我已經嘗試了建議,但錯誤仍然存在 – sean 2014-10-01 08:56:39