Ask Your Question

alexcerry's profile - activity

2017-06-05 04:55:36 -0600 commented question How to get Kinect Depth Image with OpenCV?
2017-06-02 04:30:09 -0600 received badge  Editor (source)
2017-06-02 04:29:35 -0600 answered a question Houghcircles not acting properly

Hi.

edit1:

I try to get correct result. But its take time to adjust the correct parameter by the way you can check this out.

edit2:

Now i think result almost correct. after using canny and gaussian blur.

    int main()
    {
        cv::Mat img = cv::Mat::zeros(480, 640, CV_8UC3);
        cv::circle(img, cv::Point(200, 200), 175, cv::Scalar(0XFF), 1);
    Mat gray;

    cvtColor(img, gray, CV_RGB2GRAY);

Canny(gray, gray, 0, 10);

GaussianBlur(gray, gray, Size(9, 9), 2, 2);
    std::vector<cv::Vec3f> circles;

    bool exit = false;

    Point global;

    for (int i = 1; i < 200; i++)
    {
        HoughCircles(gray, circles, CV_HOUGH_GRADIENT,1, 20,200, i);
        cout << i << endl;

        for (size_t j = 0; j < circles.size(); j++)
        {
            Point center(cvRound(circles[j][0]), cvRound(circles[j][1]));
            int rad = circles[j][2];
            if (center.x > 199 && center.x < 201 && circles.size() < 45 && rad > 174)
            {
                global = center;
                exit = true;
            }
        }
        if (exit == true)
        {
            break;
        }
    }


    if (global.x > 0)
    {
    // circle center
    circle(img, global, 3, Scalar(0, 255, 0), 5, 8, 0);
    // circle outline
    circle(img, global, 175, Scalar(0, 0, 255), 3, 8, 0);

    }

    imshow("jk", img);
    waitKey(0);

    return 0;


}
2017-06-01 23:58:52 -0600 commented answer ANN_MLP bad argument error

@berak Sir, My question where would i found good documentation about ANN_MLP opencv 2 or 3. And book? I tired to search about this. I cannot found any proper documentation. Thank you very much for good explanation about labels. what is the range of predict. if fparam1 and fparam2 is 1, 1. And do you have any email?