Ask Your Question

hudixt's profile - activity

2016-07-13 11:02:01 -0500 commented answer How to detect weather the circle is green or black...

FindContour can't detect the shapes properly i am using equalizeHist too. What can i do, please help?

2016-07-13 08:39:31 -0500 commented answer How to detect weather the circle is green or black...

oh..... SO I HAVE TO JUST COMPARE IT WITH MY SCALAR THEN.... thEN I AM ALL SET

2016-07-13 07:55:05 -0500 commented answer How to detect weather the circle is green or black...

I didn't understood this part "Then you can use basic averages for each contour to assess it's colour.". Can you please elaborate? Sorry i am a newbie in image processing

2016-07-13 05:36:36 -0500 asked a question How to detect weather the circle is green or black...

I have currently made an image that consists of black and green dots..... I made a print of it and then clicked it with my camera..... After that i made a program to scan this image in opencv. Here is the image:- image description

This is the code
        image = imread("ImageTryse.jpg", 1); // Read the image
    cv::resize(image, image, Size(800, 800), 0, 0, cv::INTER_CUBIC);
    Mat image_gray = IncreaseContrast(image);
    cvtColor(image_gray, image_gray, CV_BGR2GRAY);
    vector<vec3f> circles1;
    HoughCircles(image_gray, circles1, CV_HOUGH_GRADIENT, 2, 10, 100, 22, 10, 17);

I am able to scan circles with this code and run a loop through each of them.... But now i want to know weather the circle is green or black.... I don't know how i can do that.... I tried converting it to hsv but it was showing different colors on the side having light..... Please help me to solve this problem....

2016-07-13 05:11:09 -0500 received badge  Critic (source)
2016-07-13 05:11:06 -0500 received badge  Supporter (source)