Subversion Repositories seema-scanner

Rev

Rev 121 | Rev 167 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 121 Rev 122
Line 148... Line 148...
148
 
148
 
149
        labelLeft = labelRight;
149
        labelLeft = labelRight;
150
        labelRight = data[col];
150
        labelRight = data[col];
151
 
151
 
152
        // labels need to be non-background, and differ in exactly one bit
152
        // labels need to be non-background, and differ in exactly one bit
153
        if(labelLeft != -1 && labelRight != -1 && countBits(labelLeft^labelRight) == 1){
153
        if(labelLeft != -1 && labelRight != -1 && (grayToBinary(labelRight) == grayToBinary(labelLeft)+1)){
154
            int orderingRelation = (labelLeft << Nbits) + labelRight;
154
            int orderingRelation = (labelLeft << Nbits) + labelRight;
155
            // store left label column
155
            // store left label column
156
            edges.push_back(cv::Vec4i(col-1, labelLeft, labelRight, orderingRelation));
156
            edges.push_back(cv::Vec4i(col-1, labelLeft, labelRight, orderingRelation));
157
        }
157
        }
158
    }
158
    }