Ask Your Question

Srinivasan Natarajan's profile - activity

2015-03-30 02:15:57 -0600 commented answer Correct HSV InRange Values for 'Red' Objects

Thats a nice answer. I am gonna have a hard time translating it to java. :(

2015-03-20 05:28:41 -0600 asked a question Blob Detection in opencv Java.

Hi, I new to openCV. I am trying to implement tracking particular objects in a camera on android mobile. I trying out the procedure described in this link http://www.technical-recipes.com/2011/tracking-coloured-objects-in-video-using-opencv/.

Trying to implement the following method in Java. I cant figure out what equivalent method I need to use for CBlobResult(), Filter(), GetNumBlobs() and GetBlob() methods. Thanks in advance.

blobs = CBlobResult( imgThresh, NULL, 0 );    

    // Exclude white blobs smaller than the given value (10)    
    // The bigger the last parameter, the bigger the blobs need    
    // to be for inclusion    
    blobs.Filter( blobs,  
                  B_EXCLUDE,  
                  CBlobGetArea(),  
                  B_LESS,  
                  10 );           

    // Attach a bounding rectangle for each blob discovered  
    int num_blobs = blobs.GetNumBlobs();  

    for ( int i = 0; i < num_blobs; i++ )    
    {                 
        currentBlob = blobs.GetBlob( i );               
        cvRect = currentBlob->GetBoundingBox();  

        pt1.x = cvRect.x;  
        pt1.y = cvRect.y;  
        pt2.x = cvRect.x + cvRect.width;  
        pt2.y = cvRect.y + cvRect.height;  

        // Attach bounding rect to blob in orginal video input  
        cvRectangle( frame,  
                     pt1,   
                     pt2,  
                     cvScalar(0, 0, 0, 0),  
                     1,  
                     8,  
                     0 );  
    }
2015-03-20 05:19:22 -0600 received badge  Supporter (source)