Thursday, March 31, 2016

Progress Report Due: 3/20/16

Progress:

Focus/Problem:

We are still in the process of adding a circle detection feature into our code. Through this, we plan for our app's camera to mask circles within range, so that all objects outside the circle are not shown.

This is the portion of our code where the circle detection has been placed:
 /// Apply the Hough Transform to find the circles
        HoughCircles( src_gray, circles, CV_HOUGH_GRADIENT1, src_gray.rows/820010000 );
        
        forsize_t i = 0; i < circles.size(); i++ )
        {
            cv::Point center(cvRound(circles[i][0]), cvRound(circles[i][1]));
            int radius = cvRound(circles[i][2]);
            // circle center
            circle( image, center, 3Scalar(0,255,0), -180 );
            // circle outline
            circle( image, center, radius, Scalar(0,0,255), 380 );
            Mat canny_output;
            //int x;
           // int y;
           int xc = cvRound(circles[i][0]);
           int yc = cvRound(circles[i][1]);
            
             for (int x = xc-radius; x < x+radius; x ++)
                for (int y = yc-radius; y < y+radius; y ++){
                    if(x-(cvRound(circles[i][0])-(x-(cvRound(circles[i][0]))))+(y-(cvRound(circles[i][1])-(y-(cvRound(circles[i][1])))) < radius*radius))
               
                        {
                            vector<vector<cv::Point> > contours;
                            vector<Vec4i> hierarchy;
                            /// Detect edges using canny
                            Canny( image, canny_output, thresh, thresh*23 );
                            /// Find contours
                            findContours( canny_output, contours, hierarchy, CV_RETR_TREECV_CHAIN_APPROX_SIMPLEcv::Point(00) );
                            image=canny_output;


As of right now, Xcode has not provided us a particular issue that needs fixing. The code builds as successful, but it is not working properly upon opening the application on the iPad.


Target Items for the Upcoming Week:
We will need to search for the part in the code that is causing this glitch. We will also need to camera mask the circle so that the camera's focus is solely on the circle and what is inside of it. Particularly, we need to focus on is our "if" statement within our code. Since we have to write the "if" statement ourselves, we are currently conducting more research as to how we are supposed to solve this issue.

Equipments Required:
-Mac Laptops
-Mr. Lin's iPad & Chord
-Large circles to verify the app recognizes what we want it to recognize.

No comments:

Post a Comment