Ask Your Question

fawadButt's profile - activity

2016-08-10 04:23:43 -0600 asked a question Color Circle Tracking

hi, i m trying to track red circle from cam. i find and draw circle but problem is detecting is not stable , if camera and object both are still detecting circles position continuously fluctuate . plz guide me how to detect perfectly.here is my code

cvtColor(imgOriginal, imgHSV, CV_BGR2HSV);

    inRange(imgHSV, Scalar(lowerH1, lowerS1, lowerV1), Scalar(upperH1, upperS1, upperV1),imgThreshHigh);

    inRange(imgHSV, Scalar(lowerH2, lowerS2, lowerV2), Scalar(upperH2, upperS2, upperV2), imgThreshLow);

    add(imgThreshLow, imgThreshHigh, imgThresh);

    GaussianBlur(imgThresh, imgThresh, Size(3, 3), 0);

    Mat structuringElement = getStructuringElement(MORPH_RECT,Size(3, 3));

    dilate(imgThresh, imgThresh, structuringElement);
    erode(imgThresh, imgThresh, structuringElement);

// fill circles vector with all circles in processed image
    HoughCircles(imgThresh,
                    v3fCircles,
                    CV_HOUGH_GRADIENT,  
                    2,                                  
        imgThresh.rows / 4,             
        cannyThreshold*2,                           
        cannyThreshold,                                 
        minR,                                   
        maxR);
2016-07-12 02:50:26 -0600 asked a question detecting circle with Came

hi,, i m trying to detect circle with camera. i write a complete code. its detect color and circle shape in frame and draw outline circle its working fine .. but my round object is movable when i draw outline on moving object its result is not fine. system trying to draw differences size circle. i want to get average value of detecting circle.... its my function: => p_seqCircles = cvHoughCircles(p_imgErode, p_strStorage, CV_HOUGH_GRADIENT, 2, 1000, 100, 90, 40, 100);