Left images are made with original edge weights. Right images used the lookup table from histogram matching.
new weight = a (E) + b (S) E: abs( edge weight (from lookup table)- middle-weight) S: region size (E ) (E + 0.25 S) (E + 0.5 S) (E + 0.75 S) (closest color)Set all the regions to 0 (could be also FLT_MIN) except the source that should be set to FLT_MAX. Set priority to largest on top. recolor the popped region, then For each neighbor of popped region (up): alt = min( (up->colordist , neighbor->edgeweight) and we have condition for each neighbor of popped region(up): if( alt > neighbor-> colordist ) neighbor-> colordist = alt. neighbor-> parent = up if neighbor not visited push to Q EuclideanCMC |
Categories |