Ask Your Question

pawelk's profile - activity

2017-04-20 12:59:15 -0600 received badge  Notable Question (source)
2016-01-22 14:46:40 -0600 received badge  Nice Question (source)
2014-09-16 10:30:23 -0600 received badge  Popular Question (source)
2013-06-08 11:04:40 -0600 received badge  Student (source)
2012-11-20 06:58:51 -0600 commented answer [Road signs detection] Filling conturs

That is EXACTLY what i needed. Thanks!

2012-11-20 06:58:07 -0600 received badge  Scholar (source)
2012-11-20 06:58:07 -0600 received badge  Supporter (source)
2012-11-20 06:58:04 -0600 received badge  Supporter (source)
2012-11-19 07:29:29 -0600 asked a question [Road signs detection] Filling conturs

Hi,

I am working on project with road signs detection. I have everything done and working so far, but I want to make it better. The biggest problem that that I have is filling conturs (see pictures below)

1) Normal frame

2) Blue pixels

3) Smooth

4) Filling contours

As you can see, contours on step 4 is much bigger than on step 3. Because of this after some more steps ROI is not set only on the road sign, but also on background (see next picture)

5) Detected sign

I am useing code:

cvFindContours(frame_blue_smoothed, storage, &contours, sizeof(CvContour), CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE);
cvZero(frame_blue_smoothed);
for( ; contours != 0; contours = contours ->h_next ) {
    if(fabs(cvContourArea(contours , CV_WHOLE_SEQ)) > g_blue_area_min) {
        cvDrawContours(frame_blue_smoothed, contours , cvScalarAll(255),cvScalarAll(255), -1, CV_FILLED);
    }

}

How do i set cvDrawContours or cvFindContours so that filled countours are the same size as smoothed image?

Thanks in advance for help.