Set up functions and constants for DetectObject