Changing vectors to pass-by-reference in rectangle_detection