Update markerdetection function to work with a string.