fixed the coordinates bugs, added complete and threshold object counting