UAV Path Planning for Object Observation with Quality Constraints: A Dynamic Programming Approach