I'm using adaptive thresholding to track gradual shifts in background luminance, but I'm having some problems. Presence of dark edges in some areas can throw off the detection of lighter edges. IOW, if a more subtle edge is normally detected properly, adding a more pronounced edge nearby can shift the threshold so the less pronounced edge is no longer detected. This is especially troublesome when lighter and darker edges meet in some places.
Is there any way to influence the threshold levels? It seems like this could be corrected if I could push the threshold downward slightly.