• Matthew Self's avatar
    Make goodFeaturesToTrack() return deterministic results · 72672c29
    Matthew Self authored
    When using OCL, the results of goodFeaturesToTrack() vary slightly from
    run to run. This appears to be because the order of the results from
    the findCorners kernel depends on thread execution and the sorting
    function that is used at the end to rank the features only enforces are
    partial sort order.
    
    This does not materially impact the quality of the results, but it
    makes it hard to build regression tests and generally introduces noise
    into the system that should be avoided.
    
    An easy fix is to change the sort function to enforce a total sort on
    the features, even in cases where the match quality is exactly the same
    for two features.
    72672c29
featureselect.cpp 14.6 KB