go straight when optimal point is on the boarder of the img