add boundry treshold
add label threshold(count and depth)
fix depth swap bug
better parameter