Remove simplifyUserMask's Canny--- it was both very expensive and unused :D
authorAlyssa Rosenzweig <bobbybee@users.noreply.github.com>
Sun, 28 Jun 2015 21:42:22 +0000 (17:42 -0400)
committerAlyssa Rosenzweig <bobbybee@users.noreply.github.com>
Sun, 28 Jun 2015 21:42:22 +0000 (17:42 -0400)
src/CommodityTracking.cpp

index dc3be2d..1c3efd8 100644 (file)
@@ -124,18 +124,10 @@ namespace ct {
 
     // NOTE: may trash original mask. clone if preservation is needed
     cv::Mat simplifyUserMask(cv::Mat& mask, cv::Mat& frame, int minimumArclength) {
-        // prepare for Canny + contour detection
         cvtColor(mask, mask, CV_BGR2GRAY);
-
         vector<vector<Point> > contours;
         vector<Vec4i> hierarchy;
 
-        // extract edges using Canny
-        Mat edges;
-        Canny(mask, edges, 20, 20 * 3, 3);
-
-        cvtColor(edges, edges, CV_GRAY2BGR);
-
         // find contours, simplify and draw large contours to contourOut
         Mat contourOut = Mat::zeros(frame.size(), CV_8UC3);
         findContours(mask, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE);
This page took 0.022931 seconds and 4 git commands to generate.