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_GRADIENT, 1, src_gray.rows/8, 200, 100, 0, 0 );
        
        for( size_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, 3, Scalar(0,255,0), -1, 8, 0 );
            // circle outline
            circle( image, center, radius, Scalar(0,0,255), 3, 8, 0 );
            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*2, 3 );
                            /// Find contours
                            findContours( canny_output, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, cv::Point(0, 0) );
                            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.

Tuesday, March 22, 2016

Seminar (3/24 & 3/29) Abstract

We will be talking about the OpenCV function, "HoughCircles" and how it pertains to our project. We will inform our classmates on the essential function of HoughCircles and how the algorithm works to provide computer vision applications with circle detection. Additionally, we will briefly talk about our experience with HoughCircles and the difficulties we have encountered so far. We will briefly show how we have included the algorithm in our code. Our focus will mainly be placed on how the function will help us in developing our application in addition to explaining the algorithm to those unfamiliar to it. A draft of our first slide is shown below. 


Thursday, March 17, 2016

Progress Report Due: 3/13/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. By doing this, we can focus the app's camera on a smaller portion of the frame, making it easier to eventually recognize numbers and letters within the circles.

As of right now, the application has detected the circle and has found the circle's center. Although, it is very glitchy. The circle's outline and center will not remain steady.


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. While circle detection will be beneficial to us if it succeeds as we intend, if we can implement text recognition we can start working with VoiceOver (to relay the detected signs back to the app user). Eventually we will also need to incorporate the red color detection code (that succeeded earlier) with this code once completed, so that the app's camera can mask colors and detect circles simultaneously.

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

Progress Report Due: 3/6/16

Progress Report Due: 3/6/16

Progress:

Focus/Problem:

We are 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. By doing this, we can focus the app's camera on a smaller portion of the frame, making it easier to eventually recognize numbers and letters within the circles.

As of right now though, the app's camera only detects edges (detecting any edge within range).



Target Items for the Upcoming Week:
Further our implementation of circle detection in order to go back and direct our focus on text recognition. While circle detection will be beneficial to us if it succeeds as we intend, if we can implement text recognition we can start working with VoiceOver (to relay the detected signs back to the app user). Eventually we will also need to incorporate the red color detection code (that succeeded earlier) with this code once completed, so that the app's camera can mask colors and detect circles simultaneously.

Equipments Required:
-Mac Laptops
-Mr. Lin's iPad & Chord
-Large circles to verify the app recognizes what we want it to recognize. No red items are needed right now since we have temporarily removed the color detection code out of our own code, in order to focus on circle detection. Eventually we hope to tie these two codes together.

Monday, February 29, 2016

Progress Report Due: 2/28/16

Progress Report Due: 2/28/16

Progress:
Focus/Problem:
This week Mr. Lin introduced an online pamphlet to us that contains an algorithm for circle detection. After talking, we decided alongside Mr. Lin that since we've had difficulty with text recognition we will start with circle detection. Doing so will mask what the camera sees aside from the circles it detects. With our app being able to detect both color and circles, we are making the area in which the camera would be able to track text, hopefully easier to detect since the range in which it would be searching for text would be much smaller.
Target Items for the Upcoming Week:
Complete circle detection in order to go back and direct our focus on text recognition. While circle detection will be beneficial to us if it succeeds as we intend, if we can implement text recognition we can start working with VoiceOver (to relay the detected signs back to the app user).

Equipments Required: 
-Mac Laptops
-Mr. Lin's iPad & Chord
-Large numbers/ circles to verify the app recognizes what we want it to recognize (A variation of circles and numbers, some that are not red obviously, in order to make sure it's the text recognition that is detecting the numbers not just the red color recognition).

Progress Report Due 2/14/16

Progress Report Due: 2/14/16

Progress: 
Point of focus: While we have masked the camera's focus to see only the color red, we are trying to get the camera to recognize/track numbers and characters in order to further decipher between subway sign circles that have the same color yet stand for seperate trains (i.e. the 4,5,6 line is all in green yet the trains are different).
Problem:
Difficulties Encountered/Plans for the Coming Week
While searching for an optical character recognition software that enables recognition within coding, many of the softwares are only compatible with softwares like Tesseract, not XCode. We will have to detect the algorithms and alter them ourselves in order for them to suit our XCode platform.
-Tackle the way through which we want to recognize text (through altering an algorithm, finding contours, etc.)
Equipments Required: 
-Mac Laptops
-Mr. Lin's iPad & Chord
-Numbers/Text (some red, some not in order for us to verify it's the text recognition that is identifying the numbers not solely the red color detection).

Monday, February 8, 2016

Progress Report Due: 2/7/16

Progress Report Due: 2/7/16

Progress:
Tasks Accomplished:
Now that our app's camera can mask what it sees, in order to just see particular colors, we are now focused on finding factors of similar colored items that differ from one another; numbers. This past week Leslie successfully outlined objects of our app's camera, which is the first step in many number recognition algorithms. Over the weekend, Kate began a tutorial (http://docs.opencv.org/2.4.2/doc/tutorials/imgproc/shapedescriptors/find_contours/find_contours.html) for finding contours in OpenCV. "Finding contours" Is the first step in an algorithm she has chosen to follow for detecting numbers (http://stackoverflow.com/questions/10776398/extracting-numbers-from-an-image-using-opencv being one of the places such algorithm is found). 
Problem:
Difficulties Encountered/Plans for the Coming Week
As stated above, this past week Leslie successfully outlined objects of our app's camera, which is the first step in many number recognition algorithms. Although, this was done by taking out the masking of what our camera sees aside from the color red. In the coming week it is important we work on implementing both codes simultaneously into our app.
-Complete Number Recognition before break.
-Do more research on how our app plans to internally process the numbers it detects and how it plans to use such information.
Equipments Required: 
-Mac Laptops
-Mr. Lin's iPad & Chord
-Red Objects (Solo Cup, Subway Sign, etc.)