Today in class, the circle detection FINALLY started to work to our advantage. When we started working with circle detection, our goal was for our application's camera to detect circles within view and block out all other objects the camera sees. As of today, our application can do so! Although, we do have to fix minor errors (stabilizing the camera's focus on the circle for instance).
This is the portion of code that was altered in class today:
// if(Newimage.empty()){
cv::Mat mask = cv::Mat::zeros( image.rows, image.cols, CV_8UC1 );
circle( mask, center, radius, Scalar(225,205,205), -1, 8, 0 ); //-1 means filled
image.copyTo( dst, mask ); // copy values of img to dst if mask is > 0.
image=dst;
No comments:
Post a Comment