Changeset 17850 for trunk


Ignore:
Timestamp:
05/14/14 09:24:46 (10 years ago)
Author:
tbretz
Message:
To avoid unification with each and every single pixel around the main Island, in case it has a long time spread, only idlands with more than one pixel are considered.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mimage/MImgCleanTime.cc

    r17833 r17850  
    176176            continue;
    177177
     178        const Island &I1 = fIslands[idx1];
     179        const Island &I2 = fIslands[idx2];
     180
    178181        // FIXME: Put a limit on count? Put a limit on size?
    179         if ((fIslands[idx1].min<fIslands[idx2].min || fIslands[idx1].min>fIslands[idx2].max) &&
    180             (fIslands[idx1].max<fIslands[idx2].min || fIslands[idx1].max>fIslands[idx2].max) &&
    181             (fIslands[idx2].min<fIslands[idx1].min || fIslands[idx2].min>fIslands[idx1].max) &&
    182             (fIslands[idx2].max<fIslands[idx1].min || fIslands[idx2].max>fIslands[idx1].max))
     182        // The ideal cut would be to allow that a single
     183        // pixel still can connect two clusters
     184        if (I1.count==1 || I1.count==1)
     185            continue;
     186
     187        if (I1.max<I2.min || I2.max<I1.min)
    183188            continue;
    184189
    185190        // Combine both islands
    186         fIslands[idx1] += fIslands[idx2];
     191        I1 += I2;
    187192
    188193        // Remove idx2 from the list
Note: See TracChangeset for help on using the changeset viewer.