1 | initial version |
@thdrksdfthmn How come getting different outputs from same code and input is normal? If it is a channel issue, then it should always give the same ridiculous output.
2 | No.2 Revision |
@thdrksdfthmn How come getting different outputs from same code and input is normal? If it is a channel issue, then it should always give the same ridiculous output.
@berak I added maskedImage.zeros(frame.rows, frame.cols, CV_8UC3);
before copyTo()
however it did not solve the problem.
3 | No.3 Revision |
@thdrksdfthmn How come getting different outputs from same code and input is normal? If it is a channel issue, then it should always give the same ridiculous output.output. Besides, I put that if check and it passed there. So it does have 3 channels.
@berak I added maskedImage.zeros(frame.rows, frame.cols, CV_8UC3);
before copyTo()
however it did not solve the problem.
4 | No.4 Revision |
@thdrksdfthmn How come getting different outputs from same code and input is normal? If it is a channel issue, then it should always give the same ridiculous output. Besides, I put that if check and it passed there. So it does have 3 channels.
@berak You were right. I added populated the matrix with zeros before feeding into the maskedImage.zeros(frame.rows, frame.cols, CV_8UC3);
copyTo()
however function, and it did not solve the problem.worked. No ridiculous output anymore. Thanks.
Mat maskedImage = Mat::zeros(frame.rows, frame.cols, CV_8UC3);
frame.copyTo(maskedImage, mask);