RECTANGULARIZE TOOL

20190730 15:01:04
When taking photos of paintings or other rectangular objects, or of buildings, it is often the case that you can't take the photo from directly in front of the center of the object due to height of the object, reflections off of its surface, intervening objects, etc. The resulting photo shows a quadrilateral rather than a rectangle. You may then want to turn the quadrilateral object in the photo into a rectangle and crop it to make it more presentable. This could be done semiautomatically as follows: The user would click of 4 arbitrary points on the photo (the perceived corners of the object) which will become the corners of the rectangle. For purposes of description I will consider these points to be numbered 1,2,3,4, and be chosen going in a circular fashion around the object. The transformation would be exactly like the current Free Transform tool. The new rectangle position and corners would be defined as follows. The center of the rectangle would be at the intersection of the lines connecting points 1 & 3 with 2& 4. The length of the top and bottom of the rectangle would be the average of the distances between the lowest 2 points and the highest 2 points, say, points 1&2, with 3 & 4. The length of the sides of the rectangle would be the average of the distances between the left 2 points and the right 2 points. Perhaps, 1& 4 and 2&3. Given that the lengths of 4 sides and the center position are known, the rectangle is totally defined. After choosing the 4 corners of the original quadrilateral, the user would have to invoke the transform from the menu bar or by using a shortcut key combination. The Free Transform would be from the originally chosen 4 points to the calculated rectangle corners. If this tool already exists, I would like to know where it is. Otherwise, I would like the implementation of such a tool to be considered.
0