threshold is related to image brightness. param1 and 2 are fragment
specific. something something