I have a picture in which I'm looking for a rectangle (dotted in the picture below). This rectangle might, however, be rotated. Once I found that rectangle, I extract and, if necessary, rotate it so that it is properly aligned. I then try to locate a given point within that rotated rectangle (the X in the picture below, let's say it is at position (100/20)).
How do I now calculate the position of that point in terms of the original picture (e.g. (120/25))?
|----------------------------------------------------------|
| `......` - |
| `......` .` |
| `......` X - |
| `....```` .. |
| `....```` - |
| -`` `. |
| .. - |
| - `- |
| `. -` |
| - - |
| `- -` |
| - - |
| `- -` |
| -` ````...``` |
| - ````....``` |
| .` ````....``` |
| - ````....` |
| .. ```....` |
| ..` |
| |
| |
| |
|----------------------------------------------------------|