protected void learnAmbiguousNegative ( Rectangle2D_F64 targetRegion ) { TldHelperFunctions . convertRegion ( targetRegion , targetRegion_I32 ) ; if ( detection . isSuccess ( ) ) { TldRegion best = detection . getBest ( ) ; // see if it found the correct solution double overlap = helper . computeOverlap ( best . rect , targetRegion_I32 ) ; if ( overlap <= config . overlapLower ) { template . addDescriptor ( false , best . rect ) ; // fern.learnFernNoise(false, best.rect ); } // mark all ambiguous regions as bad List < ImageRectangle > ambiguous = detection . getAmbiguousRegions ( ) ; for ( ImageRectangle r : ambiguous ) { overlap = helper . computeOverlap ( r , targetRegion_I32 ) ; if ( overlap <= config . overlapLower ) { fern . learnFernNoise ( false , r ) ; template . addDescriptor ( false , r ) ; } } } }
Mark regions which were local maximums and had high confidence as negative . These regions were candidates for the tracker but were not selected