chili-epfl / chilitags

Robust Fiducial Markers for Augmented Reality And Robotics
http://chili.epfl.ch/software
123 stars 57 forks source link

SIGSEGV on tags appearing in frame #15

Closed racamirko closed 10 years ago

racamirko commented 10 years ago

I'm getting sigsegv on tags appearing in ReadBits::run(), line 95. It appears with one and with more tags in input.

System: Ubuntu 13.10 x64, OpenCV 2.4.5 chilitags compiled with debug flags, but the problem originally occurred without them.

racamirko commented 10 years ago

Just to clear up "tags appearing" = tag is touching the edge of the border of the frame and/or is partially outside the frame.

racamirko commented 10 years ago

And more data... it seems that the tTransformedSamplePoint on sigsegv has a negative coordinate (i.e. y = -1172.18066 )

racamirko commented 10 years ago

Temporary solution:

cv::Rect tImageArea = cv::Rect(cv::Point(0,0), cv::Size(tInputRoi.cols, tInputRoi.rows));
    for (auto& tTransformedSamplePoint : tTransformedSamplePoints) {
        if( tImageArea.contains(tTransformedSamplePoint)  )
            *tSampleData++ = tInputRoi.at(tTransformedSamplePoint);
        else
            *tSampleData++ = 0; // dummy data
    }
qbonnard commented 10 years ago

A wild user appears! User uses bug report! It's very effective!

It looks like one of the bugs that are fixed in the neverending refactoring, e.g. this one or maybe this one.

Sorry that the refactoring takes so long, I blame the Christmas break. How urgent is it to fix the bug ? Can it wait the merge of the refactoring (hopefully next week), or do you want me to bring the fixes to the master branch ?

FYI: the negative coordinates usually happen when the detected quadrilateral is concave, which does not suit well the perspective deformation estimation... Most likely, the concave quadrilateral is just noise anyway, so your fix should not create false negatives.

severin-lemaignan commented 10 years ago

@racamirko Would it be possible to provide an image that triggers the bug? or is it +- random?

racamirko commented 10 years ago

@severin-lemaignan It's random (I'm using camera for samples). @qbonnard I switched to the big-refactoring branch and I'll continue from there. I'll report if I run into any more problems, or close the bug if it doesn't appear :)

severin-lemaignan commented 10 years ago

@racamirko Did you run again into the bug, or can we close the issue?

racamirko commented 10 years ago

@severin-lemaignan Sorry, forgot about it. I haven't used it in a while (other tasks).

severin-lemaignan commented 10 years ago

Fine. Feel free to re-open if the bug reappears.