inherited the object detection code and combined to the earlier code..modified cmakelist and others involving the change