#31
|
|||
|
|||
Re: A Geometry/Perspective Question
I think there are two issues that are causing confusion on this:
1) Do you want to know the point in 3D space? If so, then there is not enough info 2) When you say "using only the 3 points", do you mean only those - as in we are blind and someone just tells us "you have a parallelogram and here are three of the points of it - what is the 4th point?" - OR do you mean it as "I have this photo, I know 3 of the points and the rest of the data is unsure or unknown, but you can see the lines of what we are looking at - where is the 4th point?" Assuming that this is a shape with straight sides and that we can look at them in this photo and see where the sides are leading towards from the existing points, then it is definitely feasible to find the fourth point. But as the people who are saying you can't do it - if you want the position in 3D space, or if you want it without being able to see the photo and only want to know the 4th only being given those points - then no, you can't do it. Assuming that it is the first case - you have this picture (say you are doing it programatically and looking at the bitmap - so you have access to the pixels - or doing it via Photoshop, same thing in the end) and you want to know with the photo data and the points being the only fixed data from the photo, you should be able to get the bottom right corner using basic SAT math. Bisect the figure and then start determining lengths of lines - from there you can get angles, and then once you have enough data you can get the lengths of the right and bottom lines, and then you can determine where the hidden point is. There is going to be some error in that due to the fact that this is dealing with pixels - there is no such thing as 2.4 pixels in a bitmapped image - so you have to do a bit of rounding. But that is as exact as you get at that resolution - for better accuracy, use an image at a higher resolution (and without compression - something like a raw bitmap or a tiff). (See linked photo here - the yellow lines are if you just follow the slope and extend it out, where the lines intersect. The red lines are for the necessary equations on the math side if you go that route, and the blue is the final answer - if you look closely near the yellow line guesstimates, you will see that there is a red dot which represents the actual point - which is not to far off from those yellow guesses) If you want me to show the work to get there, then speak up - but it should be fairly obvious - just simple trig. If you don't have the visual cues, then you can't do that since you don't know where the lower slope will go. |
#32
|
|||
|
|||
Re: A Geometry/Perspective Question
[ QUOTE ]
I think there are two issues that are causing confusion on this: 1) Do you want to know the point in 3D space? [/ QUOTE ] No. We're looking for pixel coordinates in the image. [ QUOTE ] 2) When you say "using only the 3 points", do you mean only those - as in we are blind and someone just tells us "you have a parallelogram and here are three of the points of it - what is the 4th point?" - OR do you mean it as "I have this photo, I know 3 of the points and the rest of the data is unsure or unknown, but you can see the lines of what we are looking at - where is the 4th point?" [/ QUOTE ] You're going for the former, although the shape isn't guaranteed to be a parallelogram in the image. We do know it's a rectangle before it's photographed, so assuming the camera lens isn't doing anything fancy we can assume the projected rectangle will still be a quadrilateral. From an earlier post in this thread: gaming_mouse: [ QUOTE ] we can easily solve it by getting the equations for the right hand edge and bottom edge, and solving for their intersection point. So the answer cannot depend on where the eye-level is. wheather or not we can solve it with ONLY the three corner points and the aspect ratio (the ratio of width to height) is the open question. My gut still tells me this is possible, but I don't know.... [/ QUOTE ] (back to your post) [ QUOTE ] If you don't have the visual cues, then you can't do that since you don't know where the lower slope will go. [/ QUOTE ] Yup. |
#33
|
|||
|
|||
Re: A Geometry/Perspective Question
If you don't have the visual cues, then you can't do that since you don't know where the lower slope will go.
Yup. So are there only two possible solutions then.... In that case, I'd still like to see a solution, as we will also know wheather or not the screen is angles back or forward in most cases. |
#34
|
|||
|
|||
Re: A Geometry/Perspective Question
[ QUOTE ]
guaranteed to be a parallelogram in the imag [/ QUOTE ] Yeah, that was the wrong word - should have been "rhomboid" - sorry. Clearly not only can't I read, I can't write either. |
#35
|
|||
|
|||
Re: A Geometry/Perspective Question
It's not even guaranteed to be a rhomboid. It could possibly be a quadrilateral where the left and right edges converge to one vanishing point, and the top and bottom edges converge to another, with no two sides being parallel.
|
#36
|
|||
|
|||
Re: A Geometry/Perspective Question
Your question is ambiguous. It is unclear what you are assuming is given about the image. The field of view is relevant. If this is fixed, there should be a 0-dimensional space of possible locations of the 4th corner. As you let this vary, you get a 1-dimensional space of possible locations for the 4th point.
To make this intuitive, think of how things look in a cropped photo or a zoom lens: There is almost no perspective, so any rectangle will be projected to something close to a parallelogram. (Objects in front do not look much larger than objects in the back.) By contrast, a rectangle filling most of the field of vision (with no zoom) may be distorted to be far from a parallelogram. It also matters if the image might be off-center. The coordinate system you used does not have its origin at the center of the picture, and assuming the camera is over (0,0) will give the wrong location for the 4th corner. |
|
|